1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
//// [interfaceExtendingClass2.ts]
class Foo {
x: string;
y() { }
get Z() {
return 1;
}
[x: string]: Object;
}
interface I2 extends Foo { // error
a: {
toString: () => {
return 1;
};
}
//// [interfaceExtendingClass2.js]
var Foo = /** @class */ (function () {
function Foo() {
}
Foo.prototype.y = function () { };
Object.defineProperty(Foo.prototype, "Z", {
get: function () {
return 1;
},
enumerable: true,
configurable: true
});
return Foo;
}());
return 1;
;
|