Instantiation expressions don't reject incompatible signatures in situations with mixed call and construct signatures #59319
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
instantiation expression signature applicable incompatible call construct class
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.6.0-dev.20240717#code/MYGwhgzhAEBiD29oG8C+BYAUFgLgTwAcBTaAFSIh2gF4UtpoAeU6IgDxyIDsATGLgK4BbAEZEATgD4AFGHEBzAFxkAlMtIBuetC5EA7kxbtOvGJXEBLLvJlylq5QnhbMqF1h5FQcksHhdKaE5KdQocFz8AqiscMC4cCzBOHhogsMYAIgzJFyA
π» Code
π Actual behavior
An error gets reported:
And the final type of
instantiated
is computed as:π Expected behavior
I'm not 100% sure but it feels like this type could be successfully instantiated to
{ new (arg: ""): Foo; }
. This is the only signature that matches the given type arguments.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: