29 lines
No EOL
881 B
Text
29 lines
No EOL
881 B
Text
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass2.ts (6 errors) ====
|
|
class Foo {
|
|
x: string;
|
|
y() { }
|
|
get Z() {
|
|
~
|
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return 1;
|
|
}
|
|
[x: string]: Object;
|
|
}
|
|
|
|
interface I2 extends Foo { // error
|
|
a: {
|
|
~~~~
|
|
toString: () => {
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'.
|
|
return 1;
|
|
~~~~~~
|
|
!!! Property or signature expected.
|
|
~~~~~~~~~
|
|
!!! 'return' statement has no containing function.
|
|
};
|
|
~
|
|
!!! Declaration or statement expected.
|
|
}
|
|
~
|
|
!!! Declaration or statement expected. |