TypeScript/tests/baselines/reference/interfaceSubtyping.js

20 lines
381 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [interfaceSubtyping.ts]
interface iface {
foo(): void;
}
class Camera implements iface{
constructor (public str: string) {
}
foo() { return "s"; }
}
//// [interfaceSubtyping.js]
var Camera = (function () {
function Camera(str) {
this.str = str;
}
Camera.prototype.foo = function () { return "s"; };
2014-07-13 01:04:16 +02:00
return Camera;
})();