Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -77,15 +77,15 @@ suite('AbstractKeybindingService', () => {
altKey: keybinding.altKey,
metaKey: keybinding.metaKey,
keyCode: keybinding.keyCode,
code: null
}, null);
code: null!
}, null!);
}
}
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null!;
let currentContextValue: IContext | null = null;
let executeCommandCalls: { commandId: string; args: any[]; }[] = null;
let showMessageCalls: { sev: Severity, message: any; }[] = null;
let executeCommandCalls: { commandId: string; args: any[]; }[] = null!;
let showMessageCalls: { sev: Severity, message: any; }[] = null!;
let statusMessageCalls: string[] | null = null;
let statusMessageCallsDisposed: string[] | null = null;
@@ -99,12 +99,12 @@ suite('AbstractKeybindingService', () => {
let contextKeyService: IContextKeyService = {
_serviceBrand: undefined,
dispose: undefined,
onDidChangeContext: undefined,
createKey: undefined,
contextMatchesRules: undefined,
getContextKeyValue: undefined,
createScoped: undefined,
dispose: undefined!,
onDidChangeContext: undefined!,
createKey: undefined!,
contextMatchesRules: undefined!,
getContextKeyValue: undefined!,
createScoped: undefined!,
getContext: (target: IContextKeyServiceTarget): any => {
return currentContextValue;
}
@@ -118,7 +118,7 @@ suite('AbstractKeybindingService', () => {
commandId: commandId,
args: args
});
return Promise.resolve(void 0);
return Promise.resolve(undefined);
}
};
@@ -147,12 +147,12 @@ suite('AbstractKeybindingService', () => {
let statusbarService: IStatusbarService = {
_serviceBrand: undefined,
addEntry: undefined,
addEntry: undefined!,
setStatusMessage: (message: string, autoDisposeAfter?: number, delayBy?: number): IDisposable => {
statusMessageCalls.push(message);
statusMessageCalls!.push(message);
return {
dispose: () => {
statusMessageCallsDisposed.push(message);
statusMessageCallsDisposed!.push(message);
}
};
}
@@ -166,15 +166,15 @@ suite('AbstractKeybindingService', () => {
teardown(() => {
currentContextValue = null;
executeCommandCalls = null;
showMessageCalls = null;
createTestKeybindingService = null;
executeCommandCalls = null!;
showMessageCalls = null!;
createTestKeybindingService = null!;
statusMessageCalls = null;
statusMessageCallsDisposed = null;
});
function kbItem(keybinding: number, command: string, when: ContextKeyExpr | null = null): ResolvedKeybindingItem {
const resolvedKeybinding = (keybinding !== 0 ? new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS) : null);
const resolvedKeybinding = (keybinding !== 0 ? new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS)!, OS) : null);
return new ResolvedKeybindingItem(
resolvedKeybinding,
command,
@@ -185,8 +185,8 @@ suite('AbstractKeybindingService', () => {
}
function toUsLabel(keybinding: number): string {
const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS);
return usResolvedKeybinding.getLabel();
const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS)!, OS);
return usResolvedKeybinding.getLabel()!;
}
test('issue #16498: chord mode is quit for invalid chords', () => {