TypeScript/tests/baselines/reference/interfaceSubtyping.js

20 lines
381 B
TypeScript

//// [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"; };
return Camera;
})();