File: statics.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (65 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download | duplicates (5)
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
//// [statics.ts]
module M {
    export class C {
        x: number;
        constructor(public c1: number, public c2: number, c3: number) {
            this.x = C.y+this.c1+this.c2+c3;
            this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub);
        }

        static priv=2;
        static pub=3;
        static y=C.priv;
        static f(n:number) {
            return "wow: "+(n+C.y+C.pub+C.priv);

        }        
    }
    var c=C.y;
    export function f() {
        var result="";
        result+=(c);
        result+=(new C(0,1,2).x);
        result+=(C.f(10));
        result+=(new C(5,10,20).g(C.y));
        return result;
    }
}

M.f();




//// [statics.js]
var M;
(function (M) {
    var C = /** @class */ (function () {
        function C(c1, c2, c3) {
            var _this = this;
            this.c1 = c1;
            this.c2 = c2;
            this.x = C.y + this.c1 + this.c2 + c3;
            this.g = function (v) { return C.f(_this.x + C.y + v + _this.c1 + _this.c2 + C.pub); };
        }
        C.f = function (n) {
            return "wow: " + (n + C.y + C.pub + C.priv);
        };
        C.priv = 2;
        C.pub = 3;
        C.y = C.priv;
        return C;
    }());
    M.C = C;
    var c = C.y;
    function f() {
        var result = "";
        result += (c);
        result += (new C(0, 1, 2).x);
        result += (C.f(10));
        result += (new C(5, 10, 20).g(C.y));
        return result;
    }
    M.f = f;
})(M || (M = {}));
M.f();