29 lines
No EOL
893 B
Text
29 lines
No EOL
893 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.
|
|
~~~~~~
|
|
!!! A 'return' statement can only be used within a function body.
|
|
};
|
|
~
|
|
!!! Declaration or statement expected.
|
|
}
|
|
~
|
|
!!! Declaration or statement expected. |