32 lines
No EOL
894 B
Text
32 lines
No EOL
894 B
Text
tests/cases/compiler/overloadsWithinClasses.ts(3,12): error TS2393: Duplicate function implementation.
|
|
tests/cases/compiler/overloadsWithinClasses.ts(5,12): error TS2393: Duplicate function implementation.
|
|
|
|
|
|
==== tests/cases/compiler/overloadsWithinClasses.ts (2 errors) ====
|
|
class foo {
|
|
|
|
static fnOverload( ) {}
|
|
~~~~~~~~~~
|
|
!!! error TS2393: Duplicate function implementation.
|
|
|
|
static fnOverload(foo: string){ } // error
|
|
~~~~~~~~~~
|
|
!!! error TS2393: Duplicate function implementation.
|
|
|
|
}
|
|
|
|
class bar {
|
|
|
|
static fnOverload( );
|
|
|
|
static fnOverload(foo?: string){ } // no error
|
|
|
|
}
|
|
|
|
class X {
|
|
public attr(name:string):string;
|
|
public attr(name:string, value:string):X;
|
|
public attr(first:any, second?:any):any {
|
|
}
|
|
}
|
|
|