-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority
Milestone
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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority