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
Search Terms: type parameter same merging constraint
Code
// Error: "All declarations of 'A' must have identical type parameters."interfaceA<T>{}interfaceA<Textendsstring>{}// No errorinterfaceB<Textendsstring>{}interfaceB<T>{}
Expected behavior: Same for A and B.
Actual behavior: Different behavior for A and B as indicated.
I noticed this while trying to understand the code of areTypeParametersIdentical for another project. The problem is that getConstraintDeclaration always looks at the first declaration.
The text was updated successfully, but these errors were encountered:
Now I read #20883 and it sounds like the order dependence was an intentional decision made late in the process and not documented in the original issue.
TypeScript Version: master (618da24)
Search Terms: type parameter same merging constraint
Code
Expected behavior: Same for A and B.
Actual behavior: Different behavior for A and B as indicated.
Playground Link: link
Related Issues: #20018
I noticed this while trying to understand the code of
areTypeParametersIdentical
for another project. The problem is thatgetConstraintDeclaration
always looks at the first declaration.The text was updated successfully, but these errors were encountered: