47 lines
No EOL
2.1 KiB
Text
47 lines
No EOL
2.1 KiB
Text
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'.
|
|
Property 'y' is missing in type 'Bar'.
|
|
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'.
|
|
Property 'x' is missing in type 'Bar2'.
|
|
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'.
|
|
Property 'x' is private in type 'I' but not in type 'Bar3'.
|
|
tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts(21,7): error TS2420: Class 'Bar4' incorrectly implements interface 'I'.
|
|
Types have separate declarations of a private property 'x'.
|
|
|
|
|
|
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts (4 errors) ====
|
|
class Foo {
|
|
private x: string;
|
|
}
|
|
|
|
interface I extends Foo {
|
|
y: number;
|
|
}
|
|
|
|
class Bar implements I { // error
|
|
~~~
|
|
!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Property 'y' is missing in type 'Bar'.
|
|
}
|
|
|
|
class Bar2 implements I { // error
|
|
~~~~
|
|
!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Property 'x' is missing in type 'Bar2'.
|
|
y: number;
|
|
}
|
|
|
|
class Bar3 implements I { // error
|
|
~~~~
|
|
!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Property 'x' is private in type 'I' but not in type 'Bar3'.
|
|
x: string;
|
|
y: number;
|
|
}
|
|
|
|
class Bar4 implements I { // error
|
|
~~~~
|
|
!!! error TS2420: Class 'Bar4' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Types have separate declarations of a private property 'x'.
|
|
private x: string;
|
|
y: number;
|
|
} |