Files
tsgo/testdata/baselines/reference/submodule/compiler/callOverloads3.errors.txt

35 lines
1.5 KiB
Plaintext

callOverloads3.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient.
callOverloads3.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration.
callOverloads3.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient.
callOverloads3.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'.
==== callOverloads3.ts (4 errors) ====
function Foo():Foo; // error
~~~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class.
function Foo(s:string):Foo; // error
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
~~~
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class.
class Foo { // error
~~~
!!! error TS2813: Class declaration cannot implement overload list for 'Foo'.
!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class.
bar1() { /*WScript.Echo("bar1");*/ }
constructor(x: any) {
// WScript.Echo("Constructor function has executed");
}
}
//class Foo(s: String);
var f1 = new Foo("hey");
f1.bar1();
Foo();
Foo("s");