chore(deps): bump typescript from 4.1.5 to 4.2.3 (#3196)

* chore(deps): bump typescript from 4.1.5 to 4.2.3

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.5...v4.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

* hack types

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
dependabot[bot] 2021-03-07 15:52:59 +01:00 committed by GitHub
parent 420703ba50
commit 862c065e33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 17 deletions

View file

@ -532,18 +532,22 @@ class App extends React.Component<ExcalidrawProps, AppState> {
}
this.setState(
(state) => ({
...actionResult.appState,
editingElement:
editingElement || actionResult.appState?.editingElement || null,
width: state.width,
height: state.height,
offsetTop: state.offsetTop,
offsetLeft: state.offsetLeft,
viewModeEnabled,
zenModeEnabled,
gridSize,
}),
(state) => {
// using Object.assign instead of spread to fool TS 4.2.2+ into
// regarding the resulting type as not containing undefined
// (which the following expression will never contain)
return Object.assign(actionResult.appState || {}, {
editingElement:
editingElement || actionResult.appState?.editingElement || null,
width: state.width,
height: state.height,
offsetTop: state.offsetTop,
offsetLeft: state.offsetLeft,
viewModeEnabled,
zenModeEnabled,
gridSize,
});
},
() => {
if (actionResult.syncHistory) {
history.setCurrentState(