File: privateNamesAndStaticMethods%28target%3Desnext%29.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (95 lines) | stat: -rw-r--r-- 1,718 bytes parent folder | download | duplicates (6)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
=== tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts ===
class A {
>A : A

    static #foo(a: number) {}
>#foo : (a: number) => void
>a : number

    static async #bar(a: number) {}
>#bar : (a: number) => Promise<void>
>a : number

    static async *#baz(a: number) {
>#baz : (a: number) => AsyncGenerator<never, number, unknown>
>a : number

        return 3;
>3 : 3
    }
    static #_quux: number;
>#_quux : number

    static get #quux (): number {
>#quux : number

        return this.#_quux;
>this.#_quux : number
>this : typeof A
    }
    static set #quux (val: number) {
>#quux : number
>val : number

        this.#_quux = val;
>this.#_quux = val : number
>this.#_quux : number
>this : typeof A
>val : number
    }
    constructor () {
        A.#foo(30);
>A.#foo(30) : void
>A.#foo : (a: number) => void
>A : typeof A
>30 : 30

        A.#bar(30);
>A.#bar(30) : Promise<void>
>A.#bar : (a: number) => Promise<void>
>A : typeof A
>30 : 30

        A.#bar(30);
>A.#bar(30) : Promise<void>
>A.#bar : (a: number) => Promise<void>
>A : typeof A
>30 : 30

        A.#quux = A.#quux + 1;
>A.#quux = A.#quux + 1 : number
>A.#quux : number
>A : typeof A
>A.#quux + 1 : number
>A.#quux : number
>A : typeof A
>1 : 1

        A.#quux++;
>A.#quux++ : number
>A.#quux : number
>A : typeof A
 }
}

class B extends A {
>B : B
>A : A

    static #foo(a: string) {}
>#foo : (a: string) => void
>a : string

    constructor () {
        super();
>super() : void
>super : typeof A

        B.#foo("str");
>B.#foo("str") : void
>B.#foo : (a: string) => void
>B : typeof B
>"str" : "str"
    }
}