Closed
Description
2@rc
Given:
export type Bar<X, Y> = () => [X, Y];
export type Foo<Y> = Bar<any, Y>;
export const y = (x: Foo<string>) => 1
If I compile this with "declaration": true
", the generated declaration file looks like:
export declare type Bar<X, Y> = () => [X, Y];
export declare type Foo<Y> = Bar<any, Y>;
export declare const y: (x: Bar<string>) => number;
Notice that the typings for y
are incorrect: the parameter x
should be of type Foo<string>
which is an alias for Bar<any, string>
, however it is incorrectly typed as Bar<string>
. The first generic to Bar
has gone missing.