mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
15 lines
235 B
JavaScript
15 lines
235 B
JavaScript
class Cl {
|
|
*#foo() {
|
|
yield 2;
|
|
return 3;
|
|
}
|
|
|
|
test() {
|
|
return this.#foo();
|
|
}
|
|
}
|
|
|
|
const val = new Cl().test();
|
|
expect(val.next()).toEqual({ value: 2, done: false });
|
|
expect(val.next()).toEqual({ value: 3, done: true });
|