TypeScript/tests/baselines/reference/hidingConstructSignatures.js
2014-07-12 17:30:19 -07:00

36 lines
475 B
JavaScript

//// [hidingConstructSignatures.ts]
interface C {
(a: string): string;
}
interface D extends C {
new (a: string): number; // Should be ok
}
interface E {
new (a: string): {};
}
interface F extends E {
new (a: string): string;
}
var d: D;
d(""); // string
new d(""); // should be number
var f: F;
new f(""); // string
var e: E;
new e(""); // {}
//// [hidingConstructSignatures.js]
var d;
d("");
new d("");
var f;
new f("");
var e;
new e("");