Open ajafff opened 5 years ago
This issue is actually not limited to type display in quick info.
The generated declaration file (when exporting listBox
) also contains these invalid references and therefore causes type errors for consumers.
This looks related to #31605. Maybe it's fixed by #31544
TypeScript Version: 3.4.0-dev.20190313
Search Terms:
Code
Expected behavior:
Propagated type parameters should be renamed if a different type with the same name is used in the constraint or initializer of any other propagated type parameter.
For example:
<T extends T1, T2 extends T1>
.Actual behavior:
Hovering over
listBox
displaysconst listBox: <T extends T1, T1 extends T1>(a: [T, T1]) => [T[], {value: T1;}]
Note the
T1 extends T1
andT extends T1
whereT1
refers to something completely different.This is not limited to renamed type parameters. Hovering over
listBox
in the following code displays circular type parameter constraints (<T extends V, V extends T>
) without any renaming going on: