TypeScript does not infer equivalence of generic type arguments, TS2322 for equivalent types #35679
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
TypeScript Version: 3.7.2 or nightly
Search Terms: generic constrained type parameter error, error TS2322
Code: Consider the following example:
Actual behaviour: This yields the following error message on the line where I try to assign
nt
totest2
:Expected behaviour: Should have no error.
Background: This error message is correctly shown on something like this:
However, in the above example
NewType
should be the same asTProps
no matter howTProps
is instantiated.Playground Link: TS Playground
Related issues:
#29049
The text was updated successfully, but these errors were encountered: