Closed
Description
Building VSCode with TS 2.4, we're seeing about 10 errors in async functions around TPromise
:
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts(136,47): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts(136,47): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
Type 'TPromise<T | PromiseLike<T>>' is not assignable to type 'PromiseLike<T>'.
Types of property 'then' are incompatible.
Type '{ <U>(success?: (value: T | PromiseLike<T>) => TPromise<U>, error?: (err: any) => TPromise<U>, pr...' is not assignable to type '<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, on...'.
Types of parameters 'success' and 'onfulfilled' are incompatible.
Types of parameters 'value' and 'value' are incompatible.
Type 'T | PromiseLike<T>' is not assignable to type 'T'.
Type 'PromiseLike<T>' is not assignable to type 'T'.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts(119,29): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts(153,38): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts(429,29): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts(447,29): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts(303,28): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/platform/extensionManagement/node/extensionGalleryService.ts(358,44): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
[16:17:43] Error: /Users/matb/projects/vscode/src/vs/workbench/electron-browser/extensionHost.ts(355,118): Type 'typeof TPromise' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
Steps to reproduce
- Using VScode insiders.
- Clone vscode code base
- Run
./scripts/npm install
- Open vscode codebase in vscode
- Open effected file
- Ensure that TS 2.4.1 is active in your workspace by looking in the lower right status bar for the TS version number