mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
614 B
TypeScript
34 lines
614 B
TypeScript
//// [tests/cases/compiler/callOverloads4.ts] ////
|
|
|
|
//// [callOverloads4.ts]
|
|
function Foo():Foo; // error
|
|
function Foo(s:string):Foo; // error
|
|
class Foo { // error
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
constructor(s: string);
|
|
constructor(x: any) {
|
|
// WScript.Echo("Constructor function has executed");
|
|
}
|
|
}
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
|
|
f1.bar1();
|
|
Foo();
|
|
Foo("s");
|
|
|
|
|
|
//// [callOverloads4.js]
|
|
"use strict";
|
|
class Foo {
|
|
bar1() { }
|
|
constructor(x) {
|
|
// WScript.Echo("Constructor function has executed");
|
|
}
|
|
}
|
|
var f1 = new Foo("hey");
|
|
f1.bar1();
|
|
Foo();
|
|
Foo("s");
|