2014-07-13 01:04:16 +02:00
|
|
|
//// [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) {
|
|
|
|
}
|
2014-08-16 00:49:09 +02:00
|
|
|
bar(Foo); // Error, but should be allowed
|