Closed
Description
TypeScript Version: 2.0.10 (broken since 2.0.2).
Code
export type Foo<A, B> = A | B;
export type Bar<T> = Foo<number, T>;
export const f = <T>(bar: Bar<T>) => {
return true;
};
Expected behavior:
tsc --declaration bar.ts
should emit the following bar.d.ts
:
export declare type Foo<A, B> = A | B;
export declare type Bar<T> = Foo<number, T>;
export declare const f: <T>(bar: Bar<T>) => boolean;
NB: 2.0.0 emits <T>(bar: number | T) => boolean
, which is acceptable too.
Actual behavior:
export declare type Foo<A, B> = A | B;
export declare type Bar<T> = Foo<number, T>;
export declare const f: <T>(bar: Foo<T>) => boolean;
// TS2314: Generic type 'Foo' requires 2 type argument(s).
Metadata
Metadata
Assignees
Labels
No labels