Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

TS2430: Interface 'Thenable<TYPE>' incorrectly extends interface 'PromiseLike<TYPE>'. #14

Closed
teppeis opened this issue Dec 9, 2018 · 2 comments

Comments

@teppeis
Copy link
Owner

teppeis commented Dec 9, 2018

all.d.ts(2189,13): error TS2430: Interface 'Thenable<TYPE>' incorrectly extends interface 'PromiseLike<TYPE>'.
  Types of property 'then' are incompatible.
    Type '<RESULT>(opt_onFulfilled?: ((a: TYPE) => RESULT | Thenable<RESULT>) | null | undefined, opt_onRejected?: ((a: any) => any) | null | undefined) => Thenable<RESULT>' is not assignable to type '<TResult1 = TYPE, TResult2 = never>(onfulfilled?: ((value: TYPE) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => PromiseLike<...>'.
      Type 'Thenable<TResult1 | PromiseLike<TResult1>>' is not assignable to type 'PromiseLike<TResult1 | TResult2>'.
        Types of property 'then' are incompatible.
          Type '<RESULT>(opt_onFulfilled?: ((a: TResult1 | PromiseLike<TResult1>) => RESULT | Thenable<RESULT>) | null | undefined, opt_onRejected?: ((a: any) => any) | null | undefined) => Thenable<RESULT>' is not assignable to type '<TResult1 = TResult1 | TResult2, TResult2 = never>(onfulfilled?: ((value: TResult1 | TResult2) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => PromiseLike<...>'.
            Types of parameters 'opt_onFulfilled' and 'onfulfilled' are incompatible.
              Types of parameters 'value' and 'a' are incompatible.
                Type 'TResult1 | PromiseLike<TResult1>' is not assignable to type 'TResult1 | TResult2'.
                  Type 'PromiseLike<TResult1>' is not assignable to type 'TResult1 | TResult2'.
                    Type 'PromiseLike<TResult1>' is not assignable to type 'TResult2'.
@teppeis
Copy link
Owner Author

teppeis commented Jan 14, 2019

angular/clutz#830

@teppeis
Copy link
Owner Author

teppeis commented Jan 19, 2019

24d2e28

@teppeis teppeis closed this as completed Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant