TypeScript/tests/baselines/reference/interfaceExtendingClass2.errors.txt
2014-07-12 17:30:19 -07:00

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.