mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
66 lines
3.6 KiB
Plaintext
66 lines
3.6 KiB
Plaintext
implementingAnInterfaceExtendingClassWithPrivates.ts(2,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'.
|
|
Type 'Bar' is missing the following properties from type 'I': y, x
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'.
|
|
Property 'x' is missing in type 'Bar2' but required in type 'I'.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(13,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'.
|
|
Property 'x' is private in type 'I' but not in type 'Bar3'.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(17,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(18,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(21,7): error TS2420: Class 'Bar4' incorrectly implements interface 'I'.
|
|
Types have separate declarations of a private property 'x'.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(22,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
implementingAnInterfaceExtendingClassWithPrivates.ts(23,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
|
|
|
|
==== implementingAnInterfaceExtendingClassWithPrivates.ts (10 errors) ====
|
|
class Foo {
|
|
private x: string;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
interface I extends Foo {
|
|
y: number;
|
|
}
|
|
|
|
class Bar implements I { // error
|
|
~~~
|
|
!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Type 'Bar' is missing the following properties from type 'I': y, x
|
|
}
|
|
|
|
class Bar2 implements I { // error
|
|
~~~~
|
|
!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Property 'x' is missing in type 'Bar2' but required in type 'I'.
|
|
!!! related TS2728 implementingAnInterfaceExtendingClassWithPrivates.ts:2:13: 'x' is declared here.
|
|
y: number;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
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;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
y: number;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
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;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
y: number;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
} |