You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sandbox
With "lib": ["es5", "es2015.promise"], error fails to compile with the message:
Property 'finally' is missing in type 'Promise<void>' but required in type 'Promise<void>'.
Sandbox
With "lib": ["es5", "es2015.promise", "es2018.promise"], error fails to compile with the message:
Type 'Promise<void>' is not assignable to type 'import("/sandbox/node_modules/es6-promise/es6-promise").Promise<void>'.
Types of property 'catch' are incompatible.
Type '<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<void | TResult>' is not assignable to type '<U>(onRejected?: (error: any) => U | Thenable<U>) => Promise<U>'.
Type 'Promise<void | U>' is not assignable to type 'Promise<U>'.
Types of property 'then' are incompatible.
Type '<TResult1 = void | U, TResult2 = never>(onfulfilled?: (value: void | U) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>' is not assignable to type '{ <U>(onFulfilled?: (value: U) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Promise<U>; <U>(onFulfilled?: (value: U) => U | Thenable<U>, onRejected?: (error: any) => void): Promise<...>; }'.
Types of parameters 'onfulfilled' and 'onFulfilled' are incompatible.
Types of parameters 'value' and 'value' are incompatible.
Type 'void | U' is not assignable to type 'U'.
Type 'void' is not assignable to type 'U'.
Sandbox
Using es6 (or newer) in place of es5 above gives the same message for error, but adds another failure for error2 with the message:
Property '[Symbol.toStringTag]' is missing in type 'Promise<void>' but required in type 'Promise<void>'
The error2 message was brought up in #300, which was closed without a fix.
It's really frustrating working with libraries that use es6-promise and export the type in their signatures, because you need to wrap the promises or cast away all type safety.
Are there any TypeScript lib configurations that are compatible with this library's typings, or are there any plans to update the definitions to be compatible?
The text was updated successfully, but these errors were encountered:
Sandbox
With
"lib": ["es5", "es2015.promise"]
,error
fails to compile with the message:Sandbox
With
"lib": ["es5", "es2015.promise", "es2018.promise"]
,error
fails to compile with the message:Sandbox
Using
es6
(or newer) in place ofes5
above gives the same message forerror
, but adds another failure forerror2
with the message:The
error2
message was brought up in #300, which was closed without a fix.It's really frustrating working with libraries that use
es6-promise
and export the type in their signatures, because you need to wrap the promises or cast away all type safety.Are there any TypeScript lib configurations that are compatible with this library's typings, or are there any plans to update the definitions to be compatible?
The text was updated successfully, but these errors were encountered: