TypeScript/tests/baselines/reference/interfaceExtendingClass2.errors.txt
2014-07-23 12:07:46 -07:00

29 lines
893 B
Plaintext

==== 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.