strictNullChecks for macLinuxKeyboardMapper (#65426)
* strictNullChecks for macLinuxKeyboardMapper * Fix strict null check for assertResolveUserBinding * Add commapull/65941/head
parent
3e7bb120c7
commit
dfa7259c2d
|
@ -808,10 +808,11 @@
|
|||
"./vs/workbench/services/title/common/titleService.ts",
|
||||
"./vs/workbench/services/workspace/common/workspaceEditing.ts",
|
||||
"./vs/workbench/test/common/editor/editorOptions.test.ts",
|
||||
"./vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts",
|
||||
"./vs/workbench/test/common/notifications.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHostTypes.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/mock.ts"
|
||||
],
|
||||
],
|
||||
"exclude": [
|
||||
"./typings/require-monaco.d.ts"
|
||||
]
|
||||
|
|
|
@ -34,8 +34,8 @@ function toIResolvedKeybinding(kb: ResolvedKeybinding): IResolvedKeybinding {
|
|||
};
|
||||
}
|
||||
|
||||
export function assertResolveKeybinding(mapper: IKeyboardMapper, keybinding: Keybinding, expected: IResolvedKeybinding[]): void {
|
||||
let actual: IResolvedKeybinding[] = mapper.resolveKeybinding(keybinding).map(toIResolvedKeybinding);
|
||||
export function assertResolveKeybinding(mapper: IKeyboardMapper, keybinding: Keybinding | null, expected: IResolvedKeybinding[]): void {
|
||||
let actual: IResolvedKeybinding[] = mapper.resolveKeybinding(keybinding!).map(toIResolvedKeybinding);
|
||||
assert.deepEqual(actual, expected);
|
||||
}
|
||||
|
||||
|
|
|
@ -1224,7 +1224,7 @@ suite('keyboardMapper', () => {
|
|||
test('issue #24064: NumLock/NumPad keys stopped working in 1.11 on Linux', () => {
|
||||
let mapper = new MacLinuxKeyboardMapper(false, {}, OperatingSystem.Linux);
|
||||
|
||||
function assertNumpadKeyboardEvent(keyCode: KeyCode, code: string, label: string, electronAccelerator: string, userSettingsLabel: string, dispatch: string): void {
|
||||
function assertNumpadKeyboardEvent(keyCode: KeyCode, code: string, label: string, electronAccelerator: string | null, userSettingsLabel: string, dispatch: string): void {
|
||||
assertResolveKeyboardEvent(
|
||||
mapper,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue