-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic checking error #18387
Comments
#16368 is about generic signatures, and i do not see any generic signatures in the code sample in the OP. so please share some context on what is failing, what is the error that is reported, and why do you believe the error is incorrect. Before #16368, when generic signatures where compared, all generic parameters were erased to |
Sorry forgot to include the errors. I updated the OP.
#16368 introduced the compilation flag |
here is a simpler repro: //type CollectionClass = typeof Collection;
type CollectionClass = { new <M extends Model>(): Collection<M> };
type UserCollectionClass = { new(): Collection<User> };
declare let a: CollectionClass;
declare let u: UserCollectionClass;
a = u; // User is not assignable to M the check here is telling you that you are replacing a generic function (constructor function for |
OK I see, thanks for the explanation. |
I think #16368 broke this code for me:
If I provide the
--noStrictGenericChecks
flag, it compiles without any complaints. Can I correct this without using the flag?The text was updated successfully, but these errors were encountered: