24 lines
420 B
TypeScript
24 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;
|