File: awaitAndYieldInProperty.js

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (45 lines) | stat: -rw-r--r-- 1,044 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//// [awaitAndYieldInProperty.ts]
async function* test(x: Promise<string>) {
    class C {
        [await x] = await x;
        static [await x] = await x;

        [yield 1] = yield 2;
        static [yield 3] = yield 4;
    }

    return class {
        [await x] = await x;
        static [await x] = await x;

        [yield 1] = yield 2;
        static [yield 3] = yield 4;
    }
}

//// [awaitAndYieldInProperty.js]
async function* test(x) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j;
    class C {
        constructor() {
            this[_a] = await x;
            this[_c] = yield 2;
        }
    }
    _a = await x, _b = await x, _c = yield 1, _d = yield 3;
    C[_b] = await x;
    C[_d] = yield 4;
    return _j = class {
            constructor() {
                this[_e] = await x;
                this[_g] = yield 2;
            }
        },
        _e = await x,
        _f = await x,
        _g = yield 1,
        _h = yield 3,
        _j[_f] = await x,
        _j[_h] = yield 4,
        _j;
}