TypeScript/tests/baselines/reference/overloadOnGenericArity.types
2015-04-15 16:44:20 -07:00

17 lines
376 B
Plaintext

=== tests/cases/compiler/overloadOnGenericArity.ts ===
interface Test {
>Test : Test
then<U>(p: string): string;
>then : { <U>(p: string): string; (p: string): Date; }
>U : U
>p : string
then(p: string): Date; // Error: Overloads cannot differ only by return type
>then : { <U>(p: string): string; (p: string): Date; }
>p : string
>Date : Date
}