From: microsoft/vscode#16819
TypeScript Version: 2.1.4-insiders.20161206
Code
interfaceCompletionItem{a(): number;}functionfunc(item: CompletionItem): Promise<CompletionItem>{consttemp: Promise<any>=nullreturnPromise.resolve('abc').then(service=>{returntemp;});}Expected behavior:
No errors.
Actual behavior:
Error:
Type 'Promise<string>' is not assignable to type 'Promise<CompletionItem>'.
Type 'string' is not assignable to type 'CompletionItem'.
I believe the error comes from then selecting the incorrect overload during compilation. Changing the type to Promise.resolve(3) changes the error message to Type Promise<number> is not...
From: microsoft/vscode#16819
TypeScript Version: 2.1.4-insiders.20161206
Code
Expected behavior:
No errors.
Actual behavior:
Error:
I believe the error comes from
thenselecting the incorrect overload during compilation. Changing the type toPromise.resolve(3)changes the error message toType Promise<number> is not...