提交 113733ce 编写于 作者: M Matt Bierner

Fix strict null errors in terminalColorRegistry

上级 3eed1486
......@@ -792,7 +792,8 @@
"./vs/workbench/services/title/common/titleService.ts",
"./vs/workbench/services/workspace/common/workspaceEditing.ts",
"./vs/workbench/test/common/editor/editorOptions.test.ts",
"./vs/workbench/test/electron-browser/api/mock.ts"
"./vs/workbench/test/electron-browser/api/mock.ts",
"./vs/workbench/parts/terminal/test/electron-browser/terminalColorRegistry.test.ts"
],
"exclude": [
"./typings/require-monaco.d.ts"
......
......@@ -18,7 +18,7 @@ function getMockTheme(type: ThemeType): ITheme {
selector: '',
label: '',
type: type,
getColor: (colorId: ColorIdentifier): Color => themingRegistry.resolveDefaultColor(colorId, theme),
getColor: (colorId: ColorIdentifier) => themingRegistry.resolveDefaultColor(colorId, theme),
defines: () => true
};
return theme;
......@@ -28,7 +28,7 @@ suite('Workbench - TerminalColorRegistry', () => {
test('hc colors', function () {
let theme = getMockTheme('hc');
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId), true));
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId)!, true));
assert.deepEqual(colors, [
'#000000',
......@@ -53,7 +53,7 @@ suite('Workbench - TerminalColorRegistry', () => {
test('light colors', function () {
let theme = getMockTheme('light');
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId), true));
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId)!, true));
assert.deepEqual(colors, [
'#000000',
......@@ -78,7 +78,7 @@ suite('Workbench - TerminalColorRegistry', () => {
test('dark colors', function () {
let theme = getMockTheme('dark');
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId), true));
let colors = ansiColorIdentifiers.map(colorId => Color.Format.CSS.formatHexA(theme.getColor(colorId)!, true));
assert.deepEqual(colors, [
'#000000',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册