diff --git a/src/vs/base/test/browser/ui/tree/indexTreeModel.test.ts b/src/vs/base/test/browser/ui/tree/indexTreeModel.test.ts index a33ee63ed9b..c8fd9474688 100644 --- a/src/vs/base/test/browser/ui/tree/indexTreeModel.test.ts +++ b/src/vs/base/test/browser/ui/tree/indexTreeModel.test.ts @@ -325,12 +325,18 @@ suite('IndexTreeModel', () => { assert.strictEqual(list[1].collapsible, false); model.splice([0, 0], 1, [], options); - assert.strictEqual(list[0].collapsible, false); - assert.strictEqual(list[1], undefined); + { + const [first, second] = list; + assert.strictEqual(first.collapsible, false); + assert.strictEqual(second, undefined); + } model.splice([0, 0], 0, [{ element: 1 }], options); - assert.strictEqual(list[0].collapsible, true); - assert.strictEqual(list[1].collapsible, false); + { + const [first, second] = list; + assert.strictEqual(first.collapsible, true); + assert.strictEqual(second.collapsible, false); + } })); test('expand', () => withSmartSplice(options => { diff --git a/src/vs/editor/test/common/model/tokensStore.test.ts b/src/vs/editor/test/common/model/tokensStore.test.ts index e883d551ea8..8e3a5c26aa9 100644 --- a/src/vs/editor/test/common/model/tokensStore.test.ts +++ b/src/vs/editor/test/common/model/tokensStore.test.ts @@ -8,13 +8,13 @@ import { MultilineTokens2, SparseEncodedTokens, TokensStore2 } from 'vs/editor/c import { Range } from 'vs/editor/common/core/range'; import { TextModel } from 'vs/editor/common/model/textModel'; import { IIdentifiedSingleEditOperation } from 'vs/editor/common/model'; -import { MetadataConsts, TokenMetadata, FontStyle } from 'vs/editor/common/modes'; +import { MetadataConsts, TokenMetadata, FontStyle, ColorId } from 'vs/editor/common/modes'; import { createTextModel } from 'vs/editor/test/common/editorTestUtils'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; suite('TokensStore', () => { - const SEMANTIC_COLOR = 5; + const SEMANTIC_COLOR: ColorId = 5; function parseTokensState(state: string[]): { text: string; tokens: MultilineTokens2; } { let text: string[] = []; diff --git a/src/vs/platform/markers/test/common/markerService.test.ts b/src/vs/platform/markers/test/common/markerService.test.ts index fbf2630db09..3869d3f623c 100644 --- a/src/vs/platform/markers/test/common/markerService.test.ts +++ b/src/vs/platform/markers/test/common/markerService.test.ts @@ -189,7 +189,7 @@ suite('Marker Service', () => { endLineNumber: 1, endColumn: 5, message: 'test', - severity: 0, + severity: 0 as MarkerSeverity, source: 'me' }; let service = new markerService.MarkerService(); diff --git a/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts b/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts index 1806bf9617d..05e0ddc7764 100644 --- a/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts +++ b/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts @@ -341,7 +341,7 @@ export class LinuxExternalTerminalService implements IExternalTerminalService { /** * tries to turn OS errors into more meaningful error messages */ -function improveError(err: Error): Error { +function improveError(err: Error & { errno?: string, path?: string }): Error { if ('errno' in err && err['errno'] === 'ENOENT' && 'path' in err && typeof err['path'] === 'string') { return new Error(nls.localize('ext.term.app.not.found', "can't find terminal application '{0}'", err['path'])); }