File: autoAccessor3%28target%3Des2022%29.js

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (26 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
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
//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] ////

//// [autoAccessor3.ts]
class C1 {
    accessor "w": any;
    accessor "x" = 1;
    static accessor "y": any;
    static accessor "z" = 2;
}


//// [autoAccessor3.js]
class C1 {
    #_a_accessor_storage;
    get "w"() { return this.#_a_accessor_storage; }
    set "w"(value) { this.#_a_accessor_storage = value; }
    #_b_accessor_storage = 1;
    get "x"() { return this.#_b_accessor_storage; }
    set "x"(value) { this.#_b_accessor_storage = value; }
    static #_c_accessor_storage;
    static get "y"() { return C1.#_c_accessor_storage; }
    static set "y"(value) { C1.#_c_accessor_storage = value; }
    static #_d_accessor_storage = 2;
    static get "z"() { return C1.#_d_accessor_storage; }
    static set "z"(value) { C1.#_d_accessor_storage = value; }
}