File: parameterPropertyInConstructorWithPrologues.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 (198 lines) | stat: -rw-r--r-- 4,357 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
//// [parameterPropertyInConstructorWithPrologues.ts]
// https://github.com/microsoft/TypeScript/issues/48671

class C {}

class Foo1 {
  constructor(private A: string) {
    "ngInject1";
  }
}

class Foo2 {
  constructor(private A: string, private B: string) {
    "ngInject1";
    "ngInject2";
  }
}

class Foo3 {
  constructor(private A: string, private B: string, private C: string) {
    "ngInject1";
    "ngInject2";
  }
}

class Foo4 {
  constructor(private A: string) {
    "ngInject1";
    console.log("hi");
  }
}

class Foo5 {
  constructor(private A: string, private B: string) {
    "ngInject1";
    "ngInject2";
    console.log("hi");
  }
}

class Foo6 {
  constructor(private A: string, private B: string, private C: string) {
    "ngInject1";
    "ngInject2";
    console.log("hi");
  }
}

class Foo7 extends C {
  constructor(
    private member: boolean,
  ) {
    "ngInject1";
    super();
    console.log("hi");
  }
}

class Foo8 extends C {
  constructor(
    private member: boolean,
  ) {
    "ngInject1";
    super();
    this.m();
    console.log("hi");
  }

  m() {}
}

class Foo9 extends C {
  constructor() {
    "ngInject1";
    "ngInject2";
    super();
    this.m();
    console.log("hi");
  }

  m() {}
}


//// [parameterPropertyInConstructorWithPrologues.js]
// https://github.com/microsoft/TypeScript/issues/48671
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var C = /** @class */ (function () {
    function C() {
    }
    return C;
}());
var Foo1 = /** @class */ (function () {
    function Foo1(A) {
        "ngInject1";
        this.A = A;
    }
    return Foo1;
}());
var Foo2 = /** @class */ (function () {
    function Foo2(A, B) {
        "ngInject1";
        "ngInject2";
        this.A = A;
        this.B = B;
    }
    return Foo2;
}());
var Foo3 = /** @class */ (function () {
    function Foo3(A, B, C) {
        "ngInject1";
        "ngInject2";
        this.A = A;
        this.B = B;
        this.C = C;
    }
    return Foo3;
}());
var Foo4 = /** @class */ (function () {
    function Foo4(A) {
        "ngInject1";
        this.A = A;
        console.log("hi");
    }
    return Foo4;
}());
var Foo5 = /** @class */ (function () {
    function Foo5(A, B) {
        "ngInject1";
        "ngInject2";
        this.A = A;
        this.B = B;
        console.log("hi");
    }
    return Foo5;
}());
var Foo6 = /** @class */ (function () {
    function Foo6(A, B, C) {
        "ngInject1";
        "ngInject2";
        this.A = A;
        this.B = B;
        this.C = C;
        console.log("hi");
    }
    return Foo6;
}());
var Foo7 = /** @class */ (function (_super) {
    __extends(Foo7, _super);
    function Foo7(member) {
        "ngInject1";
        var _this = _super.call(this) || this;
        _this.member = member;
        console.log("hi");
        return _this;
    }
    return Foo7;
}(C));
var Foo8 = /** @class */ (function (_super) {
    __extends(Foo8, _super);
    function Foo8(member) {
        "ngInject1";
        var _this = _super.call(this) || this;
        _this.member = member;
        _this.m();
        console.log("hi");
        return _this;
    }
    Foo8.prototype.m = function () { };
    return Foo8;
}(C));
var Foo9 = /** @class */ (function (_super) {
    __extends(Foo9, _super);
    function Foo9() {
        "ngInject1";
        "ngInject2";
        var _this = _super.call(this) || this;
        _this.m();
        console.log("hi");
        return _this;
    }
    Foo9.prototype.m = function () { };
    return Foo9;
}(C));