TypeScript/tests/baselines/reference/newOnInstanceSymbol.js
2014-08-15 15:49:09 -07:00

14 lines
267 B
TypeScript

//// [newOnInstanceSymbol.ts]
class C {}
var x = new C(); // should be ok
new x(); // should error
//// [newOnInstanceSymbol.js]
var C = (function () {
function C() {
}
return C;
})();
var x = new C(); // should be ok
new x(); // should error