* Private Static Class Fields Implementation * Redo testing without class transform for static private * Add a call() test for private static * Use Object.defineProperty in loose mode
16 lines
217 B
JavaScript
16 lines
217 B
JavaScript
class Foo {
|
|
static #bar;
|
|
|
|
static test() {
|
|
return Foo.#bar;
|
|
}
|
|
|
|
test() {
|
|
return Foo.#bar;
|
|
}
|
|
}
|
|
|
|
expect("bar" in Foo).toBe(false);
|
|
expect(Foo.test()).toBe(undefined);
|
|
expect(Foo.test()).toBe(undefined);
|