mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
//// [tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts] ////
|
|
|
|
=== interfaceExtendingClassWithPrivates.ts ===
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithPrivates.ts, 0, 0))
|
|
|
|
private x!: string;
|
|
>x : Symbol(Foo.x, Decl(interfaceExtendingClassWithPrivates.ts, 0, 11))
|
|
}
|
|
|
|
interface I extends Foo { // error
|
|
>I : Symbol(I, Decl(interfaceExtendingClassWithPrivates.ts, 2, 1))
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithPrivates.ts, 0, 0))
|
|
|
|
x: string;
|
|
>x : Symbol(I.x, Decl(interfaceExtendingClassWithPrivates.ts, 4, 25))
|
|
}
|
|
|
|
interface I2 extends Foo {
|
|
>I2 : Symbol(I2, Decl(interfaceExtendingClassWithPrivates.ts, 6, 1))
|
|
>Foo : Symbol(Foo, Decl(interfaceExtendingClassWithPrivates.ts, 0, 0))
|
|
|
|
y: string;
|
|
>y : Symbol(I2.y, Decl(interfaceExtendingClassWithPrivates.ts, 8, 26))
|
|
}
|
|
|
|
declare var i: I2;
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithPrivates.ts, 12, 11))
|
|
>I2 : Symbol(I2, Decl(interfaceExtendingClassWithPrivates.ts, 6, 1))
|
|
|
|
var r = i.y;
|
|
>r : Symbol(r, Decl(interfaceExtendingClassWithPrivates.ts, 13, 3))
|
|
>i.y : Symbol(I2.y, Decl(interfaceExtendingClassWithPrivates.ts, 8, 26))
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithPrivates.ts, 12, 11))
|
|
>y : Symbol(I2.y, Decl(interfaceExtendingClassWithPrivates.ts, 8, 26))
|
|
|
|
var r2 = i.x; // error
|
|
>r2 : Symbol(r2, Decl(interfaceExtendingClassWithPrivates.ts, 14, 3))
|
|
>i.x : Symbol(Foo.x, Decl(interfaceExtendingClassWithPrivates.ts, 0, 11))
|
|
>i : Symbol(i, Decl(interfaceExtendingClassWithPrivates.ts, 12, 11))
|
|
>x : Symbol(Foo.x, Decl(interfaceExtendingClassWithPrivates.ts, 0, 11))
|
|
|