diff --git a/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts b/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts index 094a5d632d..2a040a1416 100644 --- a/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts +++ b/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts @@ -178,7 +178,7 @@ export class GestureMatcher implements PredecessorMatch< return this._isCancelled; } - private finalize(matched: boolean, cause: FulfillmentCause) { + private finalize(matched: boolean, cause: FulfillmentCause): MatchResult { if(this.publishedPromise.isFulfilled) { return this._result; } @@ -242,6 +242,13 @@ export class GestureMatcher implements PredecessorMatch< /* c8 ignore next 3 */ } catch(err) { this.publishedPromise.reject(err); + return { + matched: false, + action: { + type: 'none', + item: null + } + } } } diff --git a/common/web/gesture-recognizer/src/engine/touchEventEngine.ts b/common/web/gesture-recognizer/src/engine/touchEventEngine.ts index 0fe66c3ae5..2dcddffb09 100644 --- a/common/web/gesture-recognizer/src/engine/touchEventEngine.ts +++ b/common/web/gesture-recognizer/src/engine/touchEventEngine.ts @@ -227,6 +227,8 @@ export class TouchEventEngine extends InputEventEngi this.inputStartSignalMap.set(touchpoint, eventSignalPromise); return eventSignalPromise.corePromise; + } else { + return Promise.resolve(); } }); } diff --git a/common/web/input-processor/src/text/prediction/languageProcessor.ts b/common/web/input-processor/src/text/prediction/languageProcessor.ts index 85485f2273..19f5010806 100644 --- a/common/web/input-processor/src/text/prediction/languageProcessor.ts +++ b/common/web/input-processor/src/text/prediction/languageProcessor.ts @@ -167,6 +167,8 @@ export default class LanguageProcessor extends EventEmitter { if(validSuggestionState()) { return langProcessor.applySuggestion(suggestion, this.currentTarget, () => kbdProcessor.layerId); + } else { + return Promise.resolve(null); } } @@ -243,7 +245,7 @@ export default class PredictionContext extends EventEmitter { + private doTryRevert = (/*returnObj: {shouldSwallow: boolean}*/): void => { // Has the revert keystroke (BKSP) already been sent once since the last accept? if(this.doRevert) { // If so, clear the 'revert' option and start doing normal predictions again. diff --git a/common/web/keyboard-processor/src/text/keyboardProcessor.ts b/common/web/keyboard-processor/src/text/keyboardProcessor.ts index bdcf4e33a6..ac8bf53b00 100644 --- a/common/web/keyboard-processor/src/text/keyboardProcessor.ts +++ b/common/web/keyboard-processor/src/text/keyboardProcessor.ts @@ -443,7 +443,7 @@ export default class KeyboardProcessor extends EventEmitter { // Do not change layer unless needed (27/08/2015) if(id == activeLayer && keyEvent.device.formFactor != DeviceSpec.FormFactor.Desktop) { - return false; + return; } var idx=id; diff --git a/common/web/lm-worker/src/main/correction/context-tracker.ts b/common/web/lm-worker/src/main/correction/context-tracker.ts index b25f727440..2f15165e5e 100644 --- a/common/web/lm-worker/src/main/correction/context-tracker.ts +++ b/common/web/lm-worker/src/main/correction/context-tracker.ts @@ -413,7 +413,7 @@ export class ContextTracker extends CircularArray { There's already an implied whitespace to the left, so we conceptually merge the new whitespace with that one. */ - return state; + return; } else if(isBackspace) { // Consider backspace entry for this case? state.replaceTailForBackspace(finalToken, primaryInput.id); diff --git a/common/web/recorder/src/index.ts b/common/web/recorder/src/index.ts index c83112e9cb..f776dc1370 100644 --- a/common/web/recorder/src/index.ts +++ b/common/web/recorder/src/index.ts @@ -104,6 +104,8 @@ export abstract class RecordedKeystroke { return new RecordedPhysicalKeystroke(obj as RecordedPhysicalKeystroke); } else if(obj.type == "osk") { return new RecordedSyntheticKeystroke(obj as RecordedSyntheticKeystroke); + } else { + return null; } } diff --git a/web/src/tsconfig.dom.json b/web/src/tsconfig.dom.json index 47f2d25016..3c06cfbfbc 100644 --- a/web/src/tsconfig.dom.json +++ b/web/src/tsconfig.dom.json @@ -6,6 +6,8 @@ // TODO: These override ../tsconfig.base.json settings, and so should be removed if possible, // but existing code in web/ breaks some of these settings "noImplicitAny": false, - "strictFunctionTypes": false + "strictFunctionTypes": false, + "noImplicitReturns": false, + "strictNullChecks": false, } } \ No newline at end of file diff --git a/web/tsconfig.base.json b/web/tsconfig.base.json index aac6de4f32..e0ed00a89a 100644 --- a/web/tsconfig.base.json +++ b/web/tsconfig.base.json @@ -10,11 +10,6 @@ "lib": ["es6"], "target": "es5", - // TODO: These override ../tsconfig.base.json settings, and so should be removed if possible, - // but existing code in web/ breaks some of these settings - "noImplicitReturns": false, - "strictNullChecks": false, - // Other settings - declaration files, sourcemapping, and other miscellaneous bits. "allowJs": false, "declaration": true,