22 lines
723 B
Plaintext
22 lines
723 B
Plaintext
==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts (2 errors) ====
|
|
class Base {
|
|
private x: number;
|
|
}
|
|
|
|
interface Foo extends Base { // error
|
|
~~~
|
|
!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base':
|
|
!!! error TS2429: Private property 'x' cannot be reimplemented.
|
|
x: number;
|
|
}
|
|
|
|
class Base2<T> {
|
|
private x: T;
|
|
}
|
|
|
|
interface Foo2<T> extends Base2<T> { // error
|
|
~~~~
|
|
!!! error TS2429: Interface 'Foo2<T>' incorrectly extends interface 'Base2<T>':
|
|
!!! error TS2429: Private property 'x' cannot be reimplemented.
|
|
x: number;
|
|
} |