mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
494 B
TypeScript
30 lines
494 B
TypeScript
//// [tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts] ////
|
|
|
|
//// [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]
|
|
"use strict";
|
|
class Foo {
|
|
y() { }
|
|
get Z() {
|
|
return 1;
|
|
}
|
|
}
|
|
return 1;
|
|
;
|