6e77e2e810
Also got rid of the 'terminalMessages' concept.
26 lines
1 KiB
Plaintext
26 lines
1 KiB
Plaintext
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
|
|
Property 'x' is private in type 'Foo' but not in type 'I'.
|
|
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'.
|
|
|
|
|
|
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ====
|
|
class Foo {
|
|
private x: string;
|
|
}
|
|
|
|
interface I extends Foo { // error
|
|
~
|
|
!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
|
|
!!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I'.
|
|
x: string;
|
|
}
|
|
|
|
interface I2 extends Foo {
|
|
y: string;
|
|
}
|
|
|
|
var i: I2;
|
|
var r = i.y;
|
|
var r2 = i.x; // error
|
|
~~~
|
|
!!! error TS2341: Property 'x' is private and only accessible within class 'Foo'. |