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

25 lines
420 B
TypeScript

//// [staticInterfaceAssignmentCompat.ts]
class Shape {
static create(): Shape {
return new Shape();
}
}
interface ShapeFactory {
create(): Shape;
}
var x: ShapeFactory = Shape;
//// [staticInterfaceAssignmentCompat.js]
var Shape = (function () {
function Shape() {
}
Shape.create = function () {
return new Shape();
};
return Shape;
})();
var x = Shape;