Files
tsgo/testdata/baselines/reference/submodule/conformance/interfaceExtendingClass2.errors.txt

33 lines
1.3 KiB
Plaintext

interfaceExtendingClass2.ts(2,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
interfaceExtendingClass2.ts(11,5): error TS2411: Property 'a' of type '{ toString: () => {}; }' is not assignable to 'string' index type 'Object'.
interfaceExtendingClass2.ts(13,13): error TS1131: Property or signature expected.
interfaceExtendingClass2.ts(14,9): error TS1128: Declaration or statement expected.
interfaceExtendingClass2.ts(15,5): error TS1128: Declaration or statement expected.
==== interfaceExtendingClass2.ts (5 errors) ====
class Foo {
x: string;
~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
y() { }
get Z() {
return 1;
}
[x: string]: Object;
}
interface I2 extends Foo { // error
a: {
~
!!! error TS2411: Property 'a' of type '{ toString: () => {}; }' is not assignable to 'string' index type 'Object'.
toString: () => {
return 1;
~~~~~~
!!! error TS1131: Property or signature expected.
};
~
!!! error TS1128: Declaration or statement expected.
}
~
!!! error TS1128: Declaration or statement expected.