TypeScript/tests/baselines/reference/hidingConstructSignatures.js

36 lines
521 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [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(""); // string
new d(""); // should be number
2014-07-13 01:04:16 +02:00
var f;
new f(""); // string
2014-07-13 01:04:16 +02:00
var e;
new e(""); // {}