mirror of
https://github.com/swc-project/swc.git
synced 2024-12-03 00:54:25 +03:00
15 lines
202 B
TypeScript
15 lines
202 B
TypeScript
// @target: esnext, es2022, es2015
|
|
|
|
let getX;
|
|
class C {
|
|
#x = 1
|
|
constructor(x: number) {
|
|
this.#x = x;
|
|
}
|
|
|
|
static {
|
|
// getX has privileged access to #x
|
|
getX = (obj: C) => obj.#x;
|
|
}
|
|
}
|