TypeScript/tests/baselines/reference/overloadOnGenericArity.types

17 lines
376 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/overloadOnGenericArity.ts ===
interface Test {
>Test : Test
2014-08-15 23:33:16 +02:00
then<U>(p: string): string;
>then : { <U>(p: string): string; (p: string): Date; }
>U : U
>p : string
2014-08-15 23:33:16 +02:00
then(p: string): Date; // Error: Overloads cannot differ only by return type
>then : { <U>(p: string): string; (p: string): Date; }
>p : string
>Date : Date
2014-08-15 23:33:16 +02:00
}