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
typeConstructor<T=any,Aextendsany[]=any[]>=new(...a: A)=>T;functionCallbackInvokable<TextendsConstructor>(base: T){returnclassextendsbase{protectedinvoke(...args: any[]){}};}functionEventTargeted<TextendsConstructor>(base: T){// A event target should be callback-invoke-able.// Error: Type "{ new (...a: any[]): CallbackInvokable<T>.(Anonymous class); prototype: CallbackInvokable<any>.(Anonymous class); } & T" is not a constructor type.returnclassextendsCallbackInvokable(base){publicemit(...args: any[]){this.invoke(...args);// "invoke" doesn't exist on type (Anonymous Class).}};}classEmpty{};classTestextendsCallbackInvokable(Empty){};// OKclassResourceextendsEventTargeted(Empty){};// OK
Expected behavior:
No error reported.
Actual behavior:
Error reported, as commented above.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered:
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms:
Code
Expected behavior:
No error reported.
Actual behavior:
Error reported, as commented above.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: