mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
17 lines
207 B
TypeScript
17 lines
207 B
TypeScript
// @target: es6
|
|
|
|
class D {};
|
|
|
|
class C {
|
|
#x;
|
|
foo () {
|
|
const c = new C();
|
|
c.#x; // OK
|
|
const d: D = new C();
|
|
d.#x; // Error
|
|
}
|
|
}
|
|
interface C {
|
|
new (): D;
|
|
}
|