mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
35 lines
661 B
TypeScript
35 lines
661 B
TypeScript
// @strict: true
|
|
// @target: esnext, es2022
|
|
// @lib: esnext, es2022
|
|
// @useDefineForClassFields: false
|
|
|
|
class A {
|
|
static #foo(a: number) {}
|
|
static async #bar(a: number) {}
|
|
static async *#baz(a: number) {
|
|
return 3;
|
|
}
|
|
static #_quux: number;
|
|
static get #quux (): number {
|
|
return this.#_quux;
|
|
}
|
|
static set #quux (val: number) {
|
|
this.#_quux = val;
|
|
}
|
|
constructor () {
|
|
A.#foo(30);
|
|
A.#bar(30);
|
|
A.#bar(30);
|
|
A.#quux = A.#quux + 1;
|
|
A.#quux++;
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
static #foo(a: string) {}
|
|
constructor () {
|
|
super();
|
|
B.#foo("str");
|
|
}
|
|
}
|