2014-10-28 08:28:59 +01:00
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(5,11): error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
2014-09-18 02:05:45 +02:00
Property 'x' is private in type 'Foo' but not in type 'I'.
2014-09-19 15:37:55 +02:00
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts(15,10): error TS2341: Property 'x' is private and only accessible within class 'Foo'.
2014-09-12 22:35:07 +02:00
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts (2 errors) ====
class Foo {
private x: string;
}
interface I extends Foo { // error
~
2014-10-28 08:28:59 +01:00
!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
!!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I'.
2014-07-13 01:04:16 +02:00
x: string;
}
interface I2 extends Foo {
y: string;
}
var i: I2;
var r = i.y;
var r2 = i.x; // error
~~~
2014-09-19 15:37:55 +02:00
!!! error TS2341: Property 'x' is private and only accessible within class 'Foo'.