17 lines
306 B
JavaScript
17 lines
306 B
JavaScript
//// [assignmentCompatOnNew.ts]
|
|
class Foo{};
|
|
|
|
function bar(x: {new(): Foo;}){}
|
|
|
|
bar(Foo); // Error, but should be allowed
|
|
|
|
|
|
//// [assignmentCompatOnNew.js]
|
|
var Foo = (function () {
|
|
function Foo() {
|
|
}
|
|
return Foo;
|
|
})();
|
|
;
|
|
function bar(x) { }
|
|
bar(Foo); // Error, but should be allowed
|