mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
668 B
TypeScript
41 lines
668 B
TypeScript
//// [tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts] ////
|
|
|
|
//// [implementingAnInterfaceExtendingClassWithPrivates.ts]
|
|
class Foo {
|
|
private x: string;
|
|
}
|
|
|
|
interface I extends Foo {
|
|
y: number;
|
|
}
|
|
|
|
class Bar implements I { // error
|
|
}
|
|
|
|
class Bar2 implements I { // error
|
|
y: number;
|
|
}
|
|
|
|
class Bar3 implements I { // error
|
|
x: string;
|
|
y: number;
|
|
}
|
|
|
|
class Bar4 implements I { // error
|
|
private x: string;
|
|
y: number;
|
|
}
|
|
|
|
//// [implementingAnInterfaceExtendingClassWithPrivates.js]
|
|
"use strict";
|
|
class Foo {
|
|
}
|
|
class Bar {
|
|
}
|
|
class Bar2 {
|
|
}
|
|
class Bar3 {
|
|
}
|
|
class Bar4 {
|
|
}
|