16 lines
802 B
Text
16 lines
802 B
Text
=== tests/cases/compiler/overloadOnGenericArity.ts ===
|
|
interface Test {
|
|
>Test : Test, Symbol(Test,Decl(overloadOnGenericArity.ts,0,0))
|
|
|
|
then<U>(p: string): string;
|
|
>then : { <U>(p: string): string; (p: string): Date; }, Symbol(then,Decl(overloadOnGenericArity.ts,0,16),Decl(overloadOnGenericArity.ts,1,31))
|
|
>U : U, Symbol(U,Decl(overloadOnGenericArity.ts,1,9))
|
|
>p : string, Symbol(p,Decl(overloadOnGenericArity.ts,1,12))
|
|
|
|
then(p: string): Date; // Error: Overloads cannot differ only by return type
|
|
>then : { <U>(p: string): string; (p: string): Date; }, Symbol(then,Decl(overloadOnGenericArity.ts,0,16),Decl(overloadOnGenericArity.ts,1,31))
|
|
>p : string, Symbol(p,Decl(overloadOnGenericArity.ts,2,9))
|
|
>Date : Date, Symbol(Date,Decl(lib.d.ts,633,23),Decl(lib.d.ts,815,11))
|
|
}
|
|
|
|
|