mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
40 lines
616 B
TypeScript
40 lines
616 B
TypeScript
//// [tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts] ////
|
|
|
|
//// [mergedInterfacesWithInheritedPrivates.ts]
|
|
class C {
|
|
private x!: number;
|
|
}
|
|
|
|
interface A extends C {
|
|
y: string;
|
|
}
|
|
|
|
interface A {
|
|
z: string;
|
|
}
|
|
|
|
class D implements A { // error
|
|
private x!: number;
|
|
y!: string;
|
|
z!: string;
|
|
}
|
|
|
|
class E implements A { // error
|
|
x!: number;
|
|
y!: string;
|
|
z!: string;
|
|
}
|
|
|
|
declare var a: A;
|
|
var r = a.x; // error
|
|
|
|
//// [mergedInterfacesWithInheritedPrivates.js]
|
|
"use strict";
|
|
class C {
|
|
}
|
|
class D {
|
|
}
|
|
class E {
|
|
}
|
|
var r = a.x; // error
|