mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
19 lines
281 B
JavaScript
19 lines
281 B
JavaScript
class Foo {
|
|
static #foo = "foo";
|
|
#bar = "bar";
|
|
|
|
static test() {
|
|
return Foo.#foo;
|
|
}
|
|
|
|
test() {
|
|
return this.#bar;
|
|
}
|
|
}
|
|
|
|
const f = new Foo();
|
|
expect("foo" in Foo).toBe(false)
|
|
expect("bar" in f).toBe(false)
|
|
expect(Foo.test()).toBe("foo")
|
|
expect(f.test()).toBe("bar")
|