diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index 5a9778018f9..32867a775ba 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -132,6 +132,7 @@ "./vs/editor/common/modes/languageConfigurationRegistry.ts", "./vs/editor/common/modes/languageFeatureRegistry.ts", "./vs/editor/common/modes/languageSelector.ts", + "./vs/editor/common/modes/linkComputer.ts", "./vs/editor/common/modes/nullMode.ts", "./vs/editor/common/modes/supports.ts", "./vs/editor/common/modes/supports/characterPair.ts", diff --git a/src/vs/editor/browser/view/viewOutgoingEvents.ts b/src/vs/editor/browser/view/viewOutgoingEvents.ts index 64677c2485e..8a337c11bb4 100644 --- a/src/vs/editor/browser/view/viewOutgoingEvents.ts +++ b/src/vs/editor/browser/view/viewOutgoingEvents.ts @@ -19,18 +19,18 @@ export interface EventCallback { export class ViewOutgoingEvents extends Disposable { - public onDidScroll: EventCallback = null; - public onDidGainFocus: EventCallback = null; - public onDidLoseFocus: EventCallback = null; - public onKeyDown: EventCallback = null; - public onKeyUp: EventCallback = null; - public onContextMenu: EventCallback = null; - public onMouseMove: EventCallback = null; - public onMouseLeave: EventCallback = null; - public onMouseUp: EventCallback = null; - public onMouseDown: EventCallback = null; - public onMouseDrag: EventCallback = null; - public onMouseDrop: EventCallback = null; + public onDidScroll: EventCallback | null = null; + public onDidGainFocus: EventCallback | null = null; + public onDidLoseFocus: EventCallback | null = null; + public onKeyDown: EventCallback | null = null; + public onKeyUp: EventCallback | null = null; + public onContextMenu: EventCallback | null = null; + public onMouseMove: EventCallback | null = null; + public onMouseLeave: EventCallback | null = null; + public onMouseUp: EventCallback | null = null; + public onMouseDown: EventCallback | null = null; + public onMouseDrag: EventCallback | null = null; + public onMouseDrop: EventCallback | null = null; private _viewModel: IViewModel; diff --git a/src/vs/editor/common/modes/linkComputer.ts b/src/vs/editor/common/modes/linkComputer.ts index b7f8b2d29b0..dbf78a728d0 100644 --- a/src/vs/editor/common/modes/linkComputer.ts +++ b/src/vs/editor/common/modes/linkComputer.ts @@ -123,7 +123,7 @@ const enum CharacterClass { CannotEndIn = 2 } -let _classifier: CharacterClassifier = null; +let _classifier: CharacterClassifier | null = null; function getClassifier(): CharacterClassifier { if (_classifier === null) { _classifier = new CharacterClassifier(CharacterClass.None); diff --git a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts index f2e4e6f3754..e8b3ec85b60 100644 --- a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts +++ b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts @@ -56,7 +56,7 @@ suite('TokenizationSupport2Adapter', () => { } }; } - public readonly onThemeChange: Event = null; + public readonly onThemeChange: Event | null = null; } class MockState implements IState { diff --git a/src/vs/workbench/parts/debug/node/terminals.ts b/src/vs/workbench/parts/debug/node/terminals.ts index 854e25cbb5d..e6c648cff7b 100644 --- a/src/vs/workbench/parts/debug/node/terminals.ts +++ b/src/vs/workbench/parts/debug/node/terminals.ts @@ -29,7 +29,7 @@ export function getTerminalLauncher() { return terminalLauncher; } -let _DEFAULT_TERMINAL_LINUX_READY: TPromise = null; +let _DEFAULT_TERMINAL_LINUX_READY: TPromise | null = null; export function getDefaultTerminalLinuxReady(): TPromise { if (!_DEFAULT_TERMINAL_LINUX_READY) { _DEFAULT_TERMINAL_LINUX_READY = new Promise(c => { diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index b1a2371edca..b64af96857f 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -65,7 +65,7 @@ export abstract class EmmetEditorAction extends EditorAction { private static readonly emmetSupportedModes = ['html', 'css', 'xml', 'xsl', 'haml', 'jade', 'jsx', 'slim', 'scss', 'sass', 'less', 'stylus', 'styl', 'svg']; - private _lastGrammarContributions: TPromise = null; + private _lastGrammarContributions: TPromise | null = null; private _lastExtensionService: IExtensionService | null = null; private _withGrammarContributions(extensionService: IExtensionService): TPromise { if (this._lastExtensionService !== extensionService) { diff --git a/src/vs/workbench/parts/execution/electron-browser/terminal.ts b/src/vs/workbench/parts/execution/electron-browser/terminal.ts index a1dd21b7260..f08fd641f0a 100644 --- a/src/vs/workbench/parts/execution/electron-browser/terminal.ts +++ b/src/vs/workbench/parts/execution/electron-browser/terminal.ts @@ -6,7 +6,7 @@ import * as env from 'vs/base/common/platform'; import * as pfs from 'vs/base/node/pfs'; -let _DEFAULT_TERMINAL_LINUX_READY: Promise = null; +let _DEFAULT_TERMINAL_LINUX_READY: Promise | null = null; export function getDefaultTerminalLinuxReady(): Promise { if (!_DEFAULT_TERMINAL_LINUX_READY) { _DEFAULT_TERMINAL_LINUX_READY = new Promise(c => {