Conform more code to strictNullChecks
(#10374)
* Apply `strictNullChecks` to `src/components/views/room_settings/*` * Restore tsconfig.json * Conform more code to `strictNullChecks` * Iterate * Update matrix-widget-api * Conform more code to `strictNullChecks`
This commit is contained in:
parent
9c816bb720
commit
1c9ea423c9
44 changed files with 223 additions and 179 deletions
|
@ -47,7 +47,7 @@ export default class HistoryManager {
|
|||
this.removedSinceLastPush = false;
|
||||
}
|
||||
|
||||
private shouldPush(inputType: string, diff: IDiff): boolean {
|
||||
private shouldPush(inputType?: string, diff?: IDiff): boolean {
|
||||
// right now we can only push a step after
|
||||
// the input has been applied to the model,
|
||||
// so we can't push the state before something happened.
|
||||
|
@ -102,7 +102,7 @@ export default class HistoryManager {
|
|||
}
|
||||
|
||||
// needs to persist parts and caret position
|
||||
public tryPush(model: EditorModel, caret: Caret, inputType: string, diff: IDiff): boolean {
|
||||
public tryPush(model: EditorModel, caret: Caret, inputType?: string, diff?: IDiff): boolean {
|
||||
// ignore state restoration echos.
|
||||
// these respect the inputType values of the input event,
|
||||
// but are actually passed in from MessageEditor calling model.reset()
|
||||
|
|
|
@ -171,7 +171,7 @@ export default class EditorModel {
|
|||
this._autoComplete = null;
|
||||
this.autoCompletePartIdx = null;
|
||||
}
|
||||
this.updateCallback(caret, inputType);
|
||||
this.updateCallback?.(caret, inputType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue