Change:
Due to an oversight, does not enforce arguments or its return type. Fixing this exposes around 80 typings errors in our codebase that should be addressed To fix this issue in your code: , comment out the . (Do not check in this change. I will check in the change to the signature once all error have been fixed) look at the file assigned to you and fix the type error (you may need to restart the compile since we are changing such a core type) [x] — [x] — [x] — [x] — [x] — [x] — [x] — [ ] — [ ] — [ ] — [ ] — [x] — [x] — [x] — [x] — [x] — [x] — [ ] — [x] —

Discussion:
*--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; <ins> import { CancellationToken } from 'vs/base/common/cancellation'; </ins> import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; <ins> import { mock } from 'vs/base/test/common/mock'; </ins> import { Position } from 'vs/editor/common/core/position'; <ins> import { Range } from 'vs/editor/common/core/range'; </ins> import { CompletionContext, CompletionItem, CompletionItemKind, CompletionItemProvider, CompletionList, InlineCompletionTriggerKind, ProviderResult } from 'vs/editor/common/languages'; <del> import { createTextModel } from 'vs/editor/test/common/testTextModel'; </del> <ins> import { ITextModel } from 'vs/editor/common/model'; import { TextModel } from 'vs/editor/common/model/textModel'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; </ins> import { SuggestInlineCompletions } from 'vs/editor/contrib/suggest/browser/suggestInlineCompletions'; <ins> import { ISuggestMemoryService } from 'vs/editor/contrib/suggest/browser/suggestMemory'; </ins> import { createCodeEditorServices, instantiateTestCodeEditor, ITestCodeEditor } from 'vs/editor/test/browser/testCodeEditor'; <del> import { EditorOption } from 'vs/editor/common/config/editorOptions'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { ITextModel } from 'vs/editor/common/model'; import { Range } from 'vs/editor/common/core/range'; </del> <ins> import { createTextModel } from 'vs/editor/test/common/testTextModel'; </ins> import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; <del> import { ISuggestMemoryService } from 'vs/editor/contrib/suggest/browser/suggestMemory'; import { mock } from 'vs/base/test/common/mock'; import { TextModel } from 'vs/editor/common/model/textModel'; </del> import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';

test('Aggressive inline completions when typing within line #146948', async function () { <del> const completions: SuggestInlineCompletions = insta.createInstance(SuggestInlineCompletions, (id: EditorOption) => editor.getOption(id)); </del> <ins> const completions: SuggestInlineCompletions = insta.createInstance(SuggestInlineCompletions, (id) => editor.getOption(id)); </ins> { // (1,3), end of word -> suggestions

} } <del> createInstance(ctorOrDescriptor: any | SyncDescriptor<any>, ...rest: any[]): any; // Comment out this line to fix type issues </del> createInstance<T>(descriptor: SyncDescriptor0<T>): T; createInstance<Ctor extends new (...args: any[]) => any, R extends InstanceType<Ctor>>(ctor: Ctor, ...args: GetLeadingNonServiceArgs<ConstructorParameters<Ctor>>): R; createInstance(ctorOrDescriptor: any | SyncDescriptor<any>, ...rest: any[]): any {

} }); <del> const mtw: MainThreadWorkspace = instantiationService.createInstance(<any>MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </del> <ins> const mtw = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </ins> return mtw.$startFileSearch('foo', null, null, 10, new CancellationTokenSource().token); });

} }); <del> const mtw: MainThreadWorkspace = instantiationService.createInstance(<any>MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </del> <ins> const mtw = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </ins> return mtw.$startFileSearch('', null, null, 10, new CancellationTokenSource().token); });

} }); <del> const mtw: MainThreadWorkspace = instantiationService.createInstance(<any>MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </del> <ins> const mtw = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </ins> return mtw.$startFileSearch('', null, false, 10, new CancellationTokenSource().token); });

} }); <del> const mtw: MainThreadWorkspace = instantiationService.createInstance(<any>MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </del> <ins> const mtw = instantiationService.createInstance(MainThreadWorkspace, SingleProxyRPCProtocol({ $initializeWorkspace: () => { } })); </ins> return mtw.$startFileSearch('', null, 'exclude/**', 10, new CancellationTokenSource().token); }); });

} class TestTask extends CommonTask { <ins> constructor() { super('test', undefined, undefined, {}, {}, { kind: '', label: '' }); } </ins> protected getFolderId(): string | undefined { throw new Error('Method not implemented.'); }

audioCueService = new TestAudioCueService(); taskTerminalStatus = new TaskTerminalStatus(taskService as any, audioCueService as any); testTerminal = instantiationService.createInstance(TestTerminal) as any; <del> testTask = instantiationService.createInstance(TestTask); </del> <ins> testTask = instantiationService.createInstance(TestTask) as unknown as Task; </ins> problemCollector = instantiationService.createInstance(TestProblemCollector) as any; }); test('Should add failed status when there is an exit code on task end', async () => {