提交 a6ee1119 编写于 作者: M Matt Bierner

Fixing a few more strict null check errors

#60565
上级 a975e59e
...@@ -315,7 +315,9 @@ ...@@ -315,7 +315,9 @@
"./vs/platform/editor/common/editor.ts", "./vs/platform/editor/common/editor.ts",
"./vs/platform/environment/common/environment.ts", "./vs/platform/environment/common/environment.ts",
"./vs/platform/environment/node/argv.ts", "./vs/platform/environment/node/argv.ts",
"./vs/platform/extensionManagement/common/extensionEnablementService.ts",
"./vs/platform/extensionManagement/common/extensionManagement.ts", "./vs/platform/extensionManagement/common/extensionManagement.ts",
"./vs/platform/extensionManagement/common/extensionManagementUtil.ts",
"./vs/platform/extensionManagement/common/extensionNls.ts", "./vs/platform/extensionManagement/common/extensionNls.ts",
"./vs/platform/extensionManagement/node/extensionLifecycle.ts", "./vs/platform/extensionManagement/node/extensionLifecycle.ts",
"./vs/platform/extensionManagement/node/extensionManagementIpc.ts", "./vs/platform/extensionManagement/node/extensionManagementIpc.ts",
...@@ -371,6 +373,7 @@ ...@@ -371,6 +373,7 @@
"./vs/platform/telemetry/common/telemetryUtils.ts", "./vs/platform/telemetry/common/telemetryUtils.ts",
"./vs/platform/telemetry/node/telemetryNodeUtils.ts", "./vs/platform/telemetry/node/telemetryNodeUtils.ts",
"./vs/platform/theme/common/colorRegistry.ts", "./vs/platform/theme/common/colorRegistry.ts",
"./vs/platform/theme/common/styler.ts",
"./vs/platform/theme/common/themeService.ts", "./vs/platform/theme/common/themeService.ts",
"./vs/platform/theme/test/common/testThemeService.ts", "./vs/platform/theme/test/common/testThemeService.ts",
"./vs/platform/update/common/update.ts", "./vs/platform/update/common/update.ts",
...@@ -382,9 +385,12 @@ ...@@ -382,9 +385,12 @@
"./vs/platform/workspace/test/common/testWorkspace.ts", "./vs/platform/workspace/test/common/testWorkspace.ts",
"./vs/platform/workspaces/common/workspaces.ts", "./vs/platform/workspaces/common/workspaces.ts",
"./vs/platform/workspaces/node/workspaces.ts", "./vs/platform/workspaces/node/workspaces.ts",
"./vs/vscode.d.ts",
"./vs/vscode.proposed.d.ts",
"./vs/workbench/api/shared/tasks.ts", "./vs/workbench/api/shared/tasks.ts",
"./vs/workbench/browser/part.ts", "./vs/workbench/browser/part.ts",
"./vs/workbench/browser/parts/quickinput/quickInputUtils.ts", "./vs/workbench/browser/parts/quickinput/quickInputUtils.ts",
"./vs/workbench/browser/parts/quickopen/quickopen.ts",
"./vs/workbench/browser/parts/statusbar/statusbar.ts", "./vs/workbench/browser/parts/statusbar/statusbar.ts",
"./vs/workbench/common/activity.ts", "./vs/workbench/common/activity.ts",
"./vs/workbench/common/component.ts", "./vs/workbench/common/component.ts",
......
...@@ -98,7 +98,7 @@ export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): ...@@ -98,7 +98,7 @@ export function getGalleryExtensionTelemetryData(extension: IGalleryExtension):
publisherId: extension.publisherId, publisherId: extension.publisherId,
publisherName: extension.publisher, publisherName: extension.publisher,
publisherDisplayName: extension.publisherDisplayName, publisherDisplayName: extension.publisherDisplayName,
dependencies: extension.properties.dependencies.length > 0, dependencies: !!(extension.properties.dependencies && extension.properties.dependencies.length > 0),
...extension.telemetryData ...extension.telemetryData
}; };
} }
......
...@@ -9,10 +9,10 @@ import { IDisposable } from 'vs/base/common/lifecycle'; ...@@ -9,10 +9,10 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import { Color } from 'vs/base/common/color'; import { Color } from 'vs/base/common/color';
import { mixin } from 'vs/base/common/objects'; import { mixin } from 'vs/base/common/objects';
export type styleFn = (colors: { [name: string]: Color }) => void; export type styleFn = (colors: { [name: string]: Color | null }) => void;
export interface IStyleOverrides { export interface IStyleOverrides {
[color: string]: ColorIdentifier; [color: string]: ColorIdentifier | undefined;
} }
export interface IThemable { export interface IThemable {
...@@ -24,7 +24,7 @@ export interface IColorMapping { ...@@ -24,7 +24,7 @@ export interface IColorMapping {
} }
export interface IComputedStyles { export interface IComputedStyles {
[color: string]: Color; [color: string]: Color | null;
} }
export function computeStyles(theme: ITheme, styleMap: IColorMapping): IComputedStyles { export function computeStyles(theme: ITheme, styleMap: IColorMapping): IComputedStyles {
......
...@@ -23,7 +23,7 @@ export const QUICKOPEN_ACION_LABEL = nls.localize('quickOpen', "Go to File..."); ...@@ -23,7 +23,7 @@ export const QUICKOPEN_ACION_LABEL = nls.localize('quickOpen', "Go to File...");
CommandsRegistry.registerCommand(QUICKOPEN_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) { CommandsRegistry.registerCommand(QUICKOPEN_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) {
const quickOpenService = accessor.get(IQuickOpenService); const quickOpenService = accessor.get(IQuickOpenService);
return quickOpenService.show(typeof prefix === 'string' ? prefix : null).then(() => { return quickOpenService.show(typeof prefix === 'string' ? prefix : undefined).then(() => {
return void 0; return void 0;
}); });
}); });
...@@ -32,7 +32,7 @@ export const QUICKOPEN_FOCUS_SECONDARY_ACTION_ID = 'workbench.action.quickOpenPr ...@@ -32,7 +32,7 @@ export const QUICKOPEN_FOCUS_SECONDARY_ACTION_ID = 'workbench.action.quickOpenPr
CommandsRegistry.registerCommand(QUICKOPEN_FOCUS_SECONDARY_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) { CommandsRegistry.registerCommand(QUICKOPEN_FOCUS_SECONDARY_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) {
const quickOpenService = accessor.get(IQuickOpenService); const quickOpenService = accessor.get(IQuickOpenService);
return quickOpenService.show(null, { autoFocus: { autoFocusSecondEntry: true } }).then(() => { return quickOpenService.show(undefined, { autoFocus: { autoFocusSecondEntry: true } }).then(() => {
return void 0; return void 0;
}); });
}); });
...@@ -71,8 +71,8 @@ export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHan ...@@ -71,8 +71,8 @@ export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHan
const keys = keybindingService.lookupKeybindings(id); const keys = keybindingService.lookupKeybindings(id);
const quickNavigate = { keybindings: keys }; const quickNavigate = { keybindings: keys };
quickOpenService.navigate(next, quickNavigate); quickOpenService.navigate(!!next, quickNavigate);
quickInputService.navigate(next, quickNavigate); quickInputService.navigate(!!next, quickNavigate);
}; };
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册