File: thisInConstructorParameter2.js

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (43 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download | duplicates (3)
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
//// [thisInConstructorParameter2.ts]
class P {
    x = this;
    static y = this;

    constructor(public z = this, zz = this, zzz = (p = this) => this) {
        zzz = (p = this) => this;
    }

    foo(zz = this) { zz.x; }
    static bar(zz = this) { zz.y; }
}

//// [thisInConstructorParameter2.js]
var P = /** @class */ (function () {
    function P(z, zz, zzz) {
        if (z === void 0) { z = this; }
        if (zz === void 0) { zz = this; }
        if (zzz === void 0) { zzz = function (p) {
            if (p === void 0) { p = _this; }
            return _this;
        }; }
        var _this = this;
        this.z = z;
        this.x = this;
        zzz = function (p) {
            if (p === void 0) { p = _this; }
            return _this;
        };
    }
    P.prototype.foo = function (zz) {
        if (zz === void 0) { zz = this; }
        zz.x;
    };
    P.bar = function (zz) {
        if (zz === void 0) { zz = this; }
        zz.y;
    };
    var _a;
    _a = P;
    P.y = _a;
    return P;
}());