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

22 lines
395 B
JavaScript

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