typescript 4.8.0-dev.20220609 → 4.8.0-dev.20220612
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cs/diagnosticMessages.generated.json +9 -4
- package/lib/de/diagnosticMessages.generated.json +9 -4
- package/lib/es/diagnosticMessages.generated.json +9 -4
- package/lib/fr/diagnosticMessages.generated.json +9 -4
- package/lib/it/diagnosticMessages.generated.json +9 -4
- package/lib/ja/diagnosticMessages.generated.json +9 -4
- package/lib/ko/diagnosticMessages.generated.json +9 -4
- package/lib/pl/diagnosticMessages.generated.json +9 -4
- package/lib/pt-br/diagnosticMessages.generated.json +9 -4
- package/lib/ru/diagnosticMessages.generated.json +9 -4
- package/lib/tr/diagnosticMessages.generated.json +9 -4
- package/lib/tsc.js +1111 -845
- package/lib/tsserver.js +2830 -1189
- package/lib/tsserverlibrary.d.ts +502 -101
- package/lib/tsserverlibrary.js +2802 -1188
- package/lib/typescript.d.ts +502 -101
- package/lib/typescript.js +2818 -1188
- package/lib/typescriptServices.d.ts +502 -101
- package/lib/typescriptServices.js +2818 -1188
- package/lib/typingsInstaller.js +1144 -992
- package/lib/zh-cn/diagnosticMessages.generated.json +9 -4
- package/lib/zh-tw/diagnosticMessages.generated.json +9 -4
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220612";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -234,8 +234,10 @@ var ts;
|
|
|
234
234
|
return true;
|
|
235
235
|
}
|
|
236
236
|
ts.every = every;
|
|
237
|
-
function find(array, predicate) {
|
|
238
|
-
|
|
237
|
+
function find(array, predicate, startIndex) {
|
|
238
|
+
if (array === undefined)
|
|
239
|
+
return undefined;
|
|
240
|
+
for (var i = startIndex !== null && startIndex !== void 0 ? startIndex : 0; i < array.length; i++) {
|
|
239
241
|
var value = array[i];
|
|
240
242
|
if (predicate(value, i)) {
|
|
241
243
|
return value;
|
|
@@ -244,8 +246,10 @@ var ts;
|
|
|
244
246
|
return undefined;
|
|
245
247
|
}
|
|
246
248
|
ts.find = find;
|
|
247
|
-
function findLast(array, predicate) {
|
|
248
|
-
|
|
249
|
+
function findLast(array, predicate, startIndex) {
|
|
250
|
+
if (array === undefined)
|
|
251
|
+
return undefined;
|
|
252
|
+
for (var i = startIndex !== null && startIndex !== void 0 ? startIndex : array.length - 1; i >= 0; i--) {
|
|
249
253
|
var value = array[i];
|
|
250
254
|
if (predicate(value, i)) {
|
|
251
255
|
return value;
|
|
@@ -255,7 +259,9 @@ var ts;
|
|
|
255
259
|
}
|
|
256
260
|
ts.findLast = findLast;
|
|
257
261
|
function findIndex(array, predicate, startIndex) {
|
|
258
|
-
|
|
262
|
+
if (array === undefined)
|
|
263
|
+
return -1;
|
|
264
|
+
for (var i = startIndex !== null && startIndex !== void 0 ? startIndex : 0; i < array.length; i++) {
|
|
259
265
|
if (predicate(array[i], i)) {
|
|
260
266
|
return i;
|
|
261
267
|
}
|
|
@@ -264,7 +270,9 @@ var ts;
|
|
|
264
270
|
}
|
|
265
271
|
ts.findIndex = findIndex;
|
|
266
272
|
function findLastIndex(array, predicate, startIndex) {
|
|
267
|
-
|
|
273
|
+
if (array === undefined)
|
|
274
|
+
return -1;
|
|
275
|
+
for (var i = startIndex !== null && startIndex !== void 0 ? startIndex : array.length - 1; i >= 0; i--) {
|
|
268
276
|
if (predicate(array[i], i)) {
|
|
269
277
|
return i;
|
|
270
278
|
}
|
|
@@ -970,7 +978,7 @@ var ts;
|
|
|
970
978
|
}
|
|
971
979
|
ts.elementAt = elementAt;
|
|
972
980
|
function firstOrUndefined(array) {
|
|
973
|
-
return array.length === 0 ? undefined : array[0];
|
|
981
|
+
return array === undefined || array.length === 0 ? undefined : array[0];
|
|
974
982
|
}
|
|
975
983
|
ts.firstOrUndefined = firstOrUndefined;
|
|
976
984
|
function first(array) {
|
|
@@ -979,7 +987,7 @@ var ts;
|
|
|
979
987
|
}
|
|
980
988
|
ts.first = first;
|
|
981
989
|
function lastOrUndefined(array) {
|
|
982
|
-
return array.length === 0 ? undefined : array[array.length - 1];
|
|
990
|
+
return array === undefined || array.length === 0 ? undefined : array[array.length - 1];
|
|
983
991
|
}
|
|
984
992
|
ts.lastOrUndefined = lastOrUndefined;
|
|
985
993
|
function last(array) {
|
|
@@ -2231,7 +2239,7 @@ var ts;
|
|
|
2231
2239
|
return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
|
|
2232
2240
|
}
|
|
2233
2241
|
if (isFlags) {
|
|
2234
|
-
var result =
|
|
2242
|
+
var result = [];
|
|
2235
2243
|
var remainingFlags = value;
|
|
2236
2244
|
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
|
|
2237
2245
|
var _a = members_1[_i], enumValue = _a[0], enumName = _a[1];
|
|
@@ -2239,12 +2247,12 @@ var ts;
|
|
|
2239
2247
|
break;
|
|
2240
2248
|
}
|
|
2241
2249
|
if (enumValue !== 0 && enumValue & value) {
|
|
2242
|
-
result
|
|
2250
|
+
result.push(enumName);
|
|
2243
2251
|
remainingFlags &= ~enumValue;
|
|
2244
2252
|
}
|
|
2245
2253
|
}
|
|
2246
2254
|
if (remainingFlags === 0) {
|
|
2247
|
-
return result;
|
|
2255
|
+
return result.join("|");
|
|
2248
2256
|
}
|
|
2249
2257
|
}
|
|
2250
2258
|
else {
|
|
@@ -2258,7 +2266,12 @@ var ts;
|
|
|
2258
2266
|
return value.toString();
|
|
2259
2267
|
}
|
|
2260
2268
|
Debug.formatEnum = formatEnum;
|
|
2269
|
+
var enumMemberCache = new ts.Map();
|
|
2261
2270
|
function getEnumMembers(enumObject) {
|
|
2271
|
+
var existing = enumMemberCache.get(enumObject);
|
|
2272
|
+
if (existing) {
|
|
2273
|
+
return existing;
|
|
2274
|
+
}
|
|
2262
2275
|
var result = [];
|
|
2263
2276
|
for (var name in enumObject) {
|
|
2264
2277
|
var value = enumObject[name];
|
|
@@ -2266,7 +2279,9 @@ var ts;
|
|
|
2266
2279
|
result.push([value, name]);
|
|
2267
2280
|
}
|
|
2268
2281
|
}
|
|
2269
|
-
|
|
2282
|
+
var sorted = ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
|
|
2283
|
+
enumMemberCache.set(enumObject, sorted);
|
|
2284
|
+
return sorted;
|
|
2270
2285
|
}
|
|
2271
2286
|
function formatSyntaxKind(kind) {
|
|
2272
2287
|
return formatEnum(kind, ts.SyntaxKind, false);
|
|
@@ -2604,6 +2619,7 @@ var ts;
|
|
|
2604
2619
|
warn ? createWarningDeprecation(name, errorAfter, since, options.message) :
|
|
2605
2620
|
ts.noop;
|
|
2606
2621
|
}
|
|
2622
|
+
Debug.createDeprecation = createDeprecation;
|
|
2607
2623
|
function wrapFunction(deprecation, func) {
|
|
2608
2624
|
return function () {
|
|
2609
2625
|
deprecation();
|
|
@@ -2611,7 +2627,8 @@ var ts;
|
|
|
2611
2627
|
};
|
|
2612
2628
|
}
|
|
2613
2629
|
function deprecate(func, options) {
|
|
2614
|
-
var
|
|
2630
|
+
var _a;
|
|
2631
|
+
var deprecation = createDeprecation((_a = options === null || options === void 0 ? void 0 : options.name) !== null && _a !== void 0 ? _a : getFunctionName(func), options);
|
|
2615
2632
|
return wrapFunction(deprecation, func);
|
|
2616
2633
|
}
|
|
2617
2634
|
Debug.deprecate = deprecate;
|
|
@@ -9601,6 +9618,18 @@ var ts;
|
|
|
9601
9618
|
}
|
|
9602
9619
|
}
|
|
9603
9620
|
ts.getAssignedName = getAssignedName;
|
|
9621
|
+
function getDecorators(node) {
|
|
9622
|
+
if (ts.hasDecorators(node)) {
|
|
9623
|
+
return ts.filter(node.modifiers, ts.isDecorator);
|
|
9624
|
+
}
|
|
9625
|
+
}
|
|
9626
|
+
ts.getDecorators = getDecorators;
|
|
9627
|
+
function getModifiers(node) {
|
|
9628
|
+
if (ts.hasSyntacticModifier(node, 125951)) {
|
|
9629
|
+
return ts.filter(node.modifiers, isModifier);
|
|
9630
|
+
}
|
|
9631
|
+
}
|
|
9632
|
+
ts.getModifiers = getModifiers;
|
|
9604
9633
|
function getJSDocParameterTagsWorker(param, noCache) {
|
|
9605
9634
|
if (param.name) {
|
|
9606
9635
|
if (ts.isIdentifier(param.name)) {
|
|
@@ -9805,6 +9834,9 @@ var ts;
|
|
|
9805
9834
|
if (node.typeParameters) {
|
|
9806
9835
|
return node.typeParameters;
|
|
9807
9836
|
}
|
|
9837
|
+
if (ts.canHaveIllegalTypeParameters(node) && node.typeParameters) {
|
|
9838
|
+
return node.typeParameters;
|
|
9839
|
+
}
|
|
9808
9840
|
if (ts.isInJSFile(node)) {
|
|
9809
9841
|
var decls = ts.getJSDocTypeParameterDeclarations(node);
|
|
9810
9842
|
if (decls.length) {
|
|
@@ -10141,6 +10173,10 @@ var ts;
|
|
|
10141
10173
|
}
|
|
10142
10174
|
}
|
|
10143
10175
|
ts.isMethodOrAccessor = isMethodOrAccessor;
|
|
10176
|
+
function isModifierLike(node) {
|
|
10177
|
+
return isModifier(node) || ts.isDecorator(node);
|
|
10178
|
+
}
|
|
10179
|
+
ts.isModifierLike = isModifierLike;
|
|
10144
10180
|
function isTypeElement(node) {
|
|
10145
10181
|
var kind = node.kind;
|
|
10146
10182
|
return kind === 175
|
|
@@ -10664,7 +10700,6 @@ var ts;
|
|
|
10664
10700
|
case 254:
|
|
10665
10701
|
case 164:
|
|
10666
10702
|
case 203:
|
|
10667
|
-
case 166:
|
|
10668
10703
|
case 167:
|
|
10669
10704
|
case 296:
|
|
10670
10705
|
case 299:
|
|
@@ -11137,10 +11172,11 @@ var ts;
|
|
|
11137
11172
|
}
|
|
11138
11173
|
ts.getTokenPosOfNode = getTokenPosOfNode;
|
|
11139
11174
|
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
|
|
11140
|
-
|
|
11175
|
+
var lastDecorator = !nodeIsMissing(node) && ts.canHaveModifiers(node) ? ts.findLast(node.modifiers, ts.isDecorator) : undefined;
|
|
11176
|
+
if (!lastDecorator) {
|
|
11141
11177
|
return getTokenPosOfNode(node, sourceFile);
|
|
11142
11178
|
}
|
|
11143
|
-
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text,
|
|
11179
|
+
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);
|
|
11144
11180
|
}
|
|
11145
11181
|
ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode;
|
|
11146
11182
|
function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) {
|
|
@@ -12392,7 +12428,7 @@ var ts;
|
|
|
12392
12428
|
}
|
|
12393
12429
|
ts.nodeCanBeDecorated = nodeCanBeDecorated;
|
|
12394
12430
|
function nodeIsDecorated(node, parent, grandparent) {
|
|
12395
|
-
return node
|
|
12431
|
+
return hasDecorators(node)
|
|
12396
12432
|
&& nodeCanBeDecorated(node, parent, grandparent);
|
|
12397
12433
|
}
|
|
12398
12434
|
ts.nodeIsDecorated = nodeIsDecorated;
|
|
@@ -14738,6 +14774,10 @@ var ts;
|
|
|
14738
14774
|
return hasEffectiveModifier(node, 64);
|
|
14739
14775
|
}
|
|
14740
14776
|
ts.hasEffectiveReadonlyModifier = hasEffectiveReadonlyModifier;
|
|
14777
|
+
function hasDecorators(node) {
|
|
14778
|
+
return hasSyntacticModifier(node, 131072);
|
|
14779
|
+
}
|
|
14780
|
+
ts.hasDecorators = hasDecorators;
|
|
14741
14781
|
function getSelectedEffectiveModifierFlags(node, flags) {
|
|
14742
14782
|
return getEffectiveModifierFlags(node) & flags;
|
|
14743
14783
|
}
|
|
@@ -14795,7 +14835,7 @@ var ts;
|
|
|
14795
14835
|
}
|
|
14796
14836
|
ts.getEffectiveModifierFlagsNoCache = getEffectiveModifierFlagsNoCache;
|
|
14797
14837
|
function getSyntacticModifierFlagsNoCache(node) {
|
|
14798
|
-
var flags = modifiersToFlags(node.modifiers);
|
|
14838
|
+
var flags = ts.canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0;
|
|
14799
14839
|
if (node.flags & 4 || (node.kind === 79 && node.isInJSDocNamespace)) {
|
|
14800
14840
|
flags |= 1;
|
|
14801
14841
|
}
|
|
@@ -14829,6 +14869,7 @@ var ts;
|
|
|
14829
14869
|
case 159: return 16384;
|
|
14830
14870
|
case 101: return 32768;
|
|
14831
14871
|
case 144: return 65536;
|
|
14872
|
+
case 165: return 131072;
|
|
14832
14873
|
}
|
|
14833
14874
|
return 0;
|
|
14834
14875
|
}
|
|
@@ -15163,14 +15204,16 @@ var ts;
|
|
|
15163
15204
|
}
|
|
15164
15205
|
ts.moveRangePos = moveRangePos;
|
|
15165
15206
|
function moveRangePastDecorators(node) {
|
|
15166
|
-
|
|
15167
|
-
|
|
15207
|
+
var lastDecorator = ts.canHaveModifiers(node) ? ts.findLast(node.modifiers, ts.isDecorator) : undefined;
|
|
15208
|
+
return lastDecorator && !positionIsSynthesized(lastDecorator.end)
|
|
15209
|
+
? moveRangePos(node, lastDecorator.end)
|
|
15168
15210
|
: node;
|
|
15169
15211
|
}
|
|
15170
15212
|
ts.moveRangePastDecorators = moveRangePastDecorators;
|
|
15171
15213
|
function moveRangePastModifiers(node) {
|
|
15172
|
-
|
|
15173
|
-
|
|
15214
|
+
var lastModifier = ts.canHaveModifiers(node) ? ts.lastOrUndefined(node.modifiers) : undefined;
|
|
15215
|
+
return lastModifier && !positionIsSynthesized(lastModifier.end)
|
|
15216
|
+
? moveRangePos(node, lastModifier.end)
|
|
15174
15217
|
: moveRangePastDecorators(node);
|
|
15175
15218
|
}
|
|
15176
15219
|
ts.moveRangePastModifiers = moveRangePastModifiers;
|
|
@@ -16859,8 +16902,12 @@ var ts;
|
|
|
16859
16902
|
return node.parent.templateSpans;
|
|
16860
16903
|
case 233:
|
|
16861
16904
|
return node.parent.templateSpans;
|
|
16862
|
-
case 165:
|
|
16863
|
-
|
|
16905
|
+
case 165: {
|
|
16906
|
+
var parent_2 = node.parent;
|
|
16907
|
+
return ts.canHaveDecorators(parent_2) ? parent_2.modifiers :
|
|
16908
|
+
ts.canHaveIllegalDecorators(parent_2) ? parent_2.decorators :
|
|
16909
|
+
undefined;
|
|
16910
|
+
}
|
|
16864
16911
|
case 291:
|
|
16865
16912
|
return node.parent.heritageClauses;
|
|
16866
16913
|
}
|
|
@@ -18039,23 +18086,22 @@ var ts;
|
|
|
18039
18086
|
function createBaseNode(kind) {
|
|
18040
18087
|
return baseFactory.createBaseNode(kind);
|
|
18041
18088
|
}
|
|
18042
|
-
function createBaseDeclaration(kind
|
|
18089
|
+
function createBaseDeclaration(kind) {
|
|
18043
18090
|
var node = createBaseNode(kind);
|
|
18044
|
-
node.decorators = asNodeArray(decorators);
|
|
18045
|
-
node.modifiers = asNodeArray(modifiers);
|
|
18046
|
-
node.transformFlags |=
|
|
18047
|
-
propagateChildrenFlags(node.decorators) |
|
|
18048
|
-
propagateChildrenFlags(node.modifiers);
|
|
18049
18091
|
node.symbol = undefined;
|
|
18050
18092
|
node.localSymbol = undefined;
|
|
18051
18093
|
node.locals = undefined;
|
|
18052
18094
|
node.nextContainer = undefined;
|
|
18053
18095
|
return node;
|
|
18054
18096
|
}
|
|
18055
|
-
function createBaseNamedDeclaration(kind,
|
|
18056
|
-
var node = createBaseDeclaration(kind
|
|
18097
|
+
function createBaseNamedDeclaration(kind, modifiers, name) {
|
|
18098
|
+
var node = createBaseDeclaration(kind);
|
|
18057
18099
|
name = asName(name);
|
|
18058
18100
|
node.name = name;
|
|
18101
|
+
if (ts.canHaveModifiers(node)) {
|
|
18102
|
+
node.modifiers = asNodeArray(modifiers);
|
|
18103
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers);
|
|
18104
|
+
}
|
|
18059
18105
|
if (name) {
|
|
18060
18106
|
switch (node.kind) {
|
|
18061
18107
|
case 169:
|
|
@@ -18074,16 +18120,16 @@ var ts;
|
|
|
18074
18120
|
}
|
|
18075
18121
|
return node;
|
|
18076
18122
|
}
|
|
18077
|
-
function createBaseGenericNamedDeclaration(kind,
|
|
18078
|
-
var node = createBaseNamedDeclaration(kind,
|
|
18123
|
+
function createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters) {
|
|
18124
|
+
var node = createBaseNamedDeclaration(kind, modifiers, name);
|
|
18079
18125
|
node.typeParameters = asNodeArray(typeParameters);
|
|
18080
18126
|
node.transformFlags |= propagateChildrenFlags(node.typeParameters);
|
|
18081
18127
|
if (typeParameters)
|
|
18082
18128
|
node.transformFlags |= 1;
|
|
18083
18129
|
return node;
|
|
18084
18130
|
}
|
|
18085
|
-
function createBaseSignatureDeclaration(kind,
|
|
18086
|
-
var node = createBaseGenericNamedDeclaration(kind,
|
|
18131
|
+
function createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type) {
|
|
18132
|
+
var node = createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters);
|
|
18087
18133
|
node.parameters = createNodeArray(parameters);
|
|
18088
18134
|
node.type = type;
|
|
18089
18135
|
node.transformFlags |=
|
|
@@ -18091,48 +18137,43 @@ var ts;
|
|
|
18091
18137
|
propagateChildFlags(node.type);
|
|
18092
18138
|
if (type)
|
|
18093
18139
|
node.transformFlags |= 1;
|
|
18140
|
+
node.typeArguments = undefined;
|
|
18094
18141
|
return node;
|
|
18095
18142
|
}
|
|
18096
|
-
function
|
|
18097
|
-
if (original
|
|
18143
|
+
function finishUpdateBaseSignatureDeclaration(updated, original) {
|
|
18144
|
+
if (updated !== original) {
|
|
18098
18145
|
updated.typeArguments = original.typeArguments;
|
|
18146
|
+
}
|
|
18099
18147
|
return update(updated, original);
|
|
18100
18148
|
}
|
|
18101
|
-
function createBaseFunctionLikeDeclaration(kind,
|
|
18102
|
-
var node = createBaseSignatureDeclaration(kind,
|
|
18149
|
+
function createBaseFunctionLikeDeclaration(kind, modifiers, name, typeParameters, parameters, type, body) {
|
|
18150
|
+
var node = createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type);
|
|
18103
18151
|
node.body = body;
|
|
18104
18152
|
node.transformFlags |= propagateChildFlags(node.body) & ~67108864;
|
|
18105
18153
|
if (!body)
|
|
18106
18154
|
node.transformFlags |= 1;
|
|
18107
18155
|
return node;
|
|
18108
18156
|
}
|
|
18109
|
-
function
|
|
18110
|
-
|
|
18111
|
-
updated.exclamationToken = original.exclamationToken;
|
|
18112
|
-
if (original.typeArguments)
|
|
18113
|
-
updated.typeArguments = original.typeArguments;
|
|
18114
|
-
return updateBaseSignatureDeclaration(updated, original);
|
|
18115
|
-
}
|
|
18116
|
-
function createBaseInterfaceOrClassLikeDeclaration(kind, decorators, modifiers, name, typeParameters, heritageClauses) {
|
|
18117
|
-
var node = createBaseGenericNamedDeclaration(kind, decorators, modifiers, name, typeParameters);
|
|
18157
|
+
function createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses) {
|
|
18158
|
+
var node = createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters);
|
|
18118
18159
|
node.heritageClauses = asNodeArray(heritageClauses);
|
|
18119
18160
|
node.transformFlags |= propagateChildrenFlags(node.heritageClauses);
|
|
18120
18161
|
return node;
|
|
18121
18162
|
}
|
|
18122
|
-
function createBaseClassLikeDeclaration(kind,
|
|
18123
|
-
var node = createBaseInterfaceOrClassLikeDeclaration(kind,
|
|
18163
|
+
function createBaseClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses, members) {
|
|
18164
|
+
var node = createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses);
|
|
18124
18165
|
node.members = createNodeArray(members);
|
|
18125
18166
|
node.transformFlags |= propagateChildrenFlags(node.members);
|
|
18126
18167
|
return node;
|
|
18127
18168
|
}
|
|
18128
|
-
function createBaseBindingLikeDeclaration(kind,
|
|
18129
|
-
var node = createBaseNamedDeclaration(kind,
|
|
18169
|
+
function createBaseBindingLikeDeclaration(kind, modifiers, name, initializer) {
|
|
18170
|
+
var node = createBaseNamedDeclaration(kind, modifiers, name);
|
|
18130
18171
|
node.initializer = initializer;
|
|
18131
18172
|
node.transformFlags |= propagateChildFlags(node.initializer);
|
|
18132
18173
|
return node;
|
|
18133
18174
|
}
|
|
18134
|
-
function createBaseVariableLikeDeclaration(kind,
|
|
18135
|
-
var node = createBaseBindingLikeDeclaration(kind,
|
|
18175
|
+
function createBaseVariableLikeDeclaration(kind, modifiers, name, type, initializer) {
|
|
18176
|
+
var node = createBaseBindingLikeDeclaration(kind, modifiers, name, initializer);
|
|
18136
18177
|
node.type = type;
|
|
18137
18178
|
node.transformFlags |= propagateChildFlags(type);
|
|
18138
18179
|
if (type)
|
|
@@ -18393,40 +18434,14 @@ var ts;
|
|
|
18393
18434
|
? update(createComputedPropertyName(expression), node)
|
|
18394
18435
|
: node;
|
|
18395
18436
|
}
|
|
18396
|
-
function createTypeParameterDeclaration(
|
|
18397
|
-
var name;
|
|
18398
|
-
var modifiers;
|
|
18399
|
-
var constraint;
|
|
18400
|
-
if (modifiersOrName === undefined || ts.isArray(modifiersOrName)) {
|
|
18401
|
-
modifiers = modifiersOrName;
|
|
18402
|
-
name = nameOrConstraint;
|
|
18403
|
-
constraint = constraintOrDefault;
|
|
18404
|
-
}
|
|
18405
|
-
else {
|
|
18406
|
-
modifiers = undefined;
|
|
18407
|
-
name = modifiersOrName;
|
|
18408
|
-
constraint = nameOrConstraint;
|
|
18409
|
-
}
|
|
18410
|
-
var node = createBaseNamedDeclaration(163, undefined, modifiers, name);
|
|
18437
|
+
function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) {
|
|
18438
|
+
var node = createBaseNamedDeclaration(163, modifiers, name);
|
|
18411
18439
|
node.constraint = constraint;
|
|
18412
18440
|
node.default = defaultType;
|
|
18413
18441
|
node.transformFlags = 1;
|
|
18414
18442
|
return node;
|
|
18415
18443
|
}
|
|
18416
|
-
function updateTypeParameterDeclaration(node,
|
|
18417
|
-
var name;
|
|
18418
|
-
var modifiers;
|
|
18419
|
-
var constraint;
|
|
18420
|
-
if (modifiersOrName === undefined || ts.isArray(modifiersOrName)) {
|
|
18421
|
-
modifiers = modifiersOrName;
|
|
18422
|
-
name = nameOrConstraint;
|
|
18423
|
-
constraint = constraintOrDefault;
|
|
18424
|
-
}
|
|
18425
|
-
else {
|
|
18426
|
-
modifiers = undefined;
|
|
18427
|
-
name = modifiersOrName;
|
|
18428
|
-
constraint = nameOrConstraint;
|
|
18429
|
-
}
|
|
18444
|
+
function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {
|
|
18430
18445
|
return node.modifiers !== modifiers
|
|
18431
18446
|
|| node.name !== name
|
|
18432
18447
|
|| node.constraint !== constraint
|
|
@@ -18434,8 +18449,8 @@ var ts;
|
|
|
18434
18449
|
? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node)
|
|
18435
18450
|
: node;
|
|
18436
18451
|
}
|
|
18437
|
-
function createParameterDeclaration(
|
|
18438
|
-
var node = createBaseVariableLikeDeclaration(164,
|
|
18452
|
+
function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
18453
|
+
var node = createBaseVariableLikeDeclaration(164, modifiers, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
18439
18454
|
node.dotDotDotToken = dotDotDotToken;
|
|
18440
18455
|
node.questionToken = questionToken;
|
|
18441
18456
|
if (ts.isThisIdentifier(node.name)) {
|
|
@@ -18454,15 +18469,14 @@ var ts;
|
|
|
18454
18469
|
}
|
|
18455
18470
|
return node;
|
|
18456
18471
|
}
|
|
18457
|
-
function updateParameterDeclaration(node,
|
|
18458
|
-
return node.
|
|
18459
|
-
|| node.modifiers !== modifiers
|
|
18472
|
+
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
18473
|
+
return node.modifiers !== modifiers
|
|
18460
18474
|
|| node.dotDotDotToken !== dotDotDotToken
|
|
18461
18475
|
|| node.name !== name
|
|
18462
18476
|
|| node.questionToken !== questionToken
|
|
18463
18477
|
|| node.type !== type
|
|
18464
18478
|
|| node.initializer !== initializer
|
|
18465
|
-
? update(createParameterDeclaration(
|
|
18479
|
+
? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node)
|
|
18466
18480
|
: node;
|
|
18467
18481
|
}
|
|
18468
18482
|
function createDecorator(expression) {
|
|
@@ -18481,10 +18495,11 @@ var ts;
|
|
|
18481
18495
|
: node;
|
|
18482
18496
|
}
|
|
18483
18497
|
function createPropertySignature(modifiers, name, questionToken, type) {
|
|
18484
|
-
var node = createBaseNamedDeclaration(166,
|
|
18498
|
+
var node = createBaseNamedDeclaration(166, modifiers, name);
|
|
18485
18499
|
node.type = type;
|
|
18486
18500
|
node.questionToken = questionToken;
|
|
18487
18501
|
node.transformFlags = 1;
|
|
18502
|
+
node.initializer = undefined;
|
|
18488
18503
|
return node;
|
|
18489
18504
|
}
|
|
18490
18505
|
function updatePropertySignature(node, modifiers, name, questionToken, type) {
|
|
@@ -18492,11 +18507,17 @@ var ts;
|
|
|
18492
18507
|
|| node.name !== name
|
|
18493
18508
|
|| node.questionToken !== questionToken
|
|
18494
18509
|
|| node.type !== type
|
|
18495
|
-
?
|
|
18510
|
+
? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node)
|
|
18496
18511
|
: node;
|
|
18497
18512
|
}
|
|
18498
|
-
function
|
|
18499
|
-
|
|
18513
|
+
function finishUpdatePropertySignature(updated, original) {
|
|
18514
|
+
if (updated !== original) {
|
|
18515
|
+
updated.initializer = original.initializer;
|
|
18516
|
+
}
|
|
18517
|
+
return update(updated, original);
|
|
18518
|
+
}
|
|
18519
|
+
function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
18520
|
+
var node = createBaseVariableLikeDeclaration(167, modifiers, name, type, initializer);
|
|
18500
18521
|
node.questionToken = questionOrExclamationToken && ts.isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
|
|
18501
18522
|
node.exclamationToken = questionOrExclamationToken && ts.isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
|
|
18502
18523
|
node.transformFlags |=
|
|
@@ -18511,19 +18532,18 @@ var ts;
|
|
|
18511
18532
|
}
|
|
18512
18533
|
return node;
|
|
18513
18534
|
}
|
|
18514
|
-
function updatePropertyDeclaration(node,
|
|
18515
|
-
return node.
|
|
18516
|
-
|| node.modifiers !== modifiers
|
|
18535
|
+
function updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
18536
|
+
return node.modifiers !== modifiers
|
|
18517
18537
|
|| node.name !== name
|
|
18518
18538
|
|| node.questionToken !== (questionOrExclamationToken !== undefined && ts.isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined)
|
|
18519
18539
|
|| node.exclamationToken !== (questionOrExclamationToken !== undefined && ts.isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined)
|
|
18520
18540
|
|| node.type !== type
|
|
18521
18541
|
|| node.initializer !== initializer
|
|
18522
|
-
? update(createPropertyDeclaration(
|
|
18542
|
+
? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node)
|
|
18523
18543
|
: node;
|
|
18524
18544
|
}
|
|
18525
18545
|
function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
18526
|
-
var node = createBaseSignatureDeclaration(168,
|
|
18546
|
+
var node = createBaseSignatureDeclaration(168, modifiers, name, typeParameters, parameters, type);
|
|
18527
18547
|
node.questionToken = questionToken;
|
|
18528
18548
|
node.transformFlags = 1;
|
|
18529
18549
|
return node;
|
|
@@ -18535,11 +18555,11 @@ var ts;
|
|
|
18535
18555
|
|| node.typeParameters !== typeParameters
|
|
18536
18556
|
|| node.parameters !== parameters
|
|
18537
18557
|
|| node.type !== type
|
|
18538
|
-
?
|
|
18558
|
+
? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node)
|
|
18539
18559
|
: node;
|
|
18540
18560
|
}
|
|
18541
|
-
function createMethodDeclaration(
|
|
18542
|
-
var node = createBaseFunctionLikeDeclaration(169,
|
|
18561
|
+
function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
18562
|
+
var node = createBaseFunctionLikeDeclaration(169, modifiers, name, typeParameters, parameters, type, body);
|
|
18543
18563
|
node.asteriskToken = asteriskToken;
|
|
18544
18564
|
node.questionToken = questionToken;
|
|
18545
18565
|
node.transformFlags |=
|
|
@@ -18560,11 +18580,11 @@ var ts;
|
|
|
18560
18580
|
else if (asteriskToken) {
|
|
18561
18581
|
node.transformFlags |= 2048;
|
|
18562
18582
|
}
|
|
18583
|
+
node.exclamationToken = undefined;
|
|
18563
18584
|
return node;
|
|
18564
18585
|
}
|
|
18565
|
-
function updateMethodDeclaration(node,
|
|
18566
|
-
return node.
|
|
18567
|
-
|| node.modifiers !== modifiers
|
|
18586
|
+
function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
18587
|
+
return node.modifiers !== modifiers
|
|
18568
18588
|
|| node.asteriskToken !== asteriskToken
|
|
18569
18589
|
|| node.name !== name
|
|
18570
18590
|
|| node.questionToken !== questionToken
|
|
@@ -18572,62 +18592,101 @@ var ts;
|
|
|
18572
18592
|
|| node.parameters !== parameters
|
|
18573
18593
|
|| node.type !== type
|
|
18574
18594
|
|| node.body !== body
|
|
18575
|
-
?
|
|
18595
|
+
? finishUpdateMethodDeclaration(createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
|
|
18576
18596
|
: node;
|
|
18577
18597
|
}
|
|
18578
|
-
function
|
|
18579
|
-
|
|
18598
|
+
function finishUpdateMethodDeclaration(updated, original) {
|
|
18599
|
+
if (updated !== original) {
|
|
18600
|
+
updated.exclamationToken = original.exclamationToken;
|
|
18601
|
+
}
|
|
18602
|
+
return update(updated, original);
|
|
18603
|
+
}
|
|
18604
|
+
function createClassStaticBlockDeclaration(body) {
|
|
18605
|
+
var node = createBaseGenericNamedDeclaration(170, undefined, undefined, undefined);
|
|
18580
18606
|
node.body = body;
|
|
18581
18607
|
node.transformFlags = propagateChildFlags(body) | 16777216;
|
|
18608
|
+
node.decorators = undefined;
|
|
18609
|
+
node.modifiers = undefined;
|
|
18582
18610
|
return node;
|
|
18583
18611
|
}
|
|
18584
|
-
function updateClassStaticBlockDeclaration(node,
|
|
18585
|
-
return node.
|
|
18586
|
-
|
|
18587
|
-
|| node.body !== body
|
|
18588
|
-
? update(createClassStaticBlockDeclaration(decorators, modifiers, body), node)
|
|
18612
|
+
function updateClassStaticBlockDeclaration(node, body) {
|
|
18613
|
+
return node.body !== body
|
|
18614
|
+
? finishUpdateClassStaticBlockDeclaration(createClassStaticBlockDeclaration(body), node)
|
|
18589
18615
|
: node;
|
|
18590
18616
|
}
|
|
18591
|
-
function
|
|
18592
|
-
|
|
18617
|
+
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
18618
|
+
if (updated !== original) {
|
|
18619
|
+
updated.decorators = original.decorators;
|
|
18620
|
+
updated.modifiers = original.modifiers;
|
|
18621
|
+
}
|
|
18622
|
+
return update(updated, original);
|
|
18623
|
+
}
|
|
18624
|
+
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
18625
|
+
var node = createBaseFunctionLikeDeclaration(171, modifiers, undefined, undefined, parameters, undefined, body);
|
|
18593
18626
|
node.transformFlags |= 1024;
|
|
18627
|
+
node.decorators = undefined;
|
|
18628
|
+
node.typeParameters = undefined;
|
|
18629
|
+
node.type = undefined;
|
|
18594
18630
|
return node;
|
|
18595
18631
|
}
|
|
18596
|
-
function updateConstructorDeclaration(node,
|
|
18597
|
-
return node.
|
|
18598
|
-
|| node.modifiers !== modifiers
|
|
18632
|
+
function updateConstructorDeclaration(node, modifiers, parameters, body) {
|
|
18633
|
+
return node.modifiers !== modifiers
|
|
18599
18634
|
|| node.parameters !== parameters
|
|
18600
18635
|
|| node.body !== body
|
|
18601
|
-
?
|
|
18636
|
+
? finishUpdateConstructorDeclaration(createConstructorDeclaration(modifiers, parameters, body), node)
|
|
18602
18637
|
: node;
|
|
18603
18638
|
}
|
|
18604
|
-
function
|
|
18605
|
-
|
|
18639
|
+
function finishUpdateConstructorDeclaration(updated, original) {
|
|
18640
|
+
if (updated !== original) {
|
|
18641
|
+
updated.decorators = original.decorators;
|
|
18642
|
+
updated.typeParameters = original.typeParameters;
|
|
18643
|
+
updated.type = original.type;
|
|
18644
|
+
}
|
|
18645
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18606
18646
|
}
|
|
18607
|
-
function
|
|
18608
|
-
|
|
18609
|
-
|
|
18647
|
+
function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {
|
|
18648
|
+
var node = createBaseFunctionLikeDeclaration(172, modifiers, name, undefined, parameters, type, body);
|
|
18649
|
+
node.typeParameters = undefined;
|
|
18650
|
+
return node;
|
|
18651
|
+
}
|
|
18652
|
+
function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) {
|
|
18653
|
+
return node.modifiers !== modifiers
|
|
18610
18654
|
|| node.name !== name
|
|
18611
18655
|
|| node.parameters !== parameters
|
|
18612
18656
|
|| node.type !== type
|
|
18613
18657
|
|| node.body !== body
|
|
18614
|
-
?
|
|
18658
|
+
? finishUpdateGetAccessorDeclaration(createGetAccessorDeclaration(modifiers, name, parameters, type, body), node)
|
|
18615
18659
|
: node;
|
|
18616
18660
|
}
|
|
18617
|
-
function
|
|
18618
|
-
|
|
18661
|
+
function finishUpdateGetAccessorDeclaration(updated, original) {
|
|
18662
|
+
if (updated !== original) {
|
|
18663
|
+
updated.typeParameters = original.typeParameters;
|
|
18664
|
+
}
|
|
18665
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18619
18666
|
}
|
|
18620
|
-
function
|
|
18621
|
-
|
|
18622
|
-
|
|
18667
|
+
function createSetAccessorDeclaration(modifiers, name, parameters, body) {
|
|
18668
|
+
var node = createBaseFunctionLikeDeclaration(173, modifiers, name, undefined, parameters, undefined, body);
|
|
18669
|
+
node.typeParameters = undefined;
|
|
18670
|
+
node.type = undefined;
|
|
18671
|
+
return node;
|
|
18672
|
+
}
|
|
18673
|
+
function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) {
|
|
18674
|
+
return node.modifiers !== modifiers
|
|
18623
18675
|
|| node.name !== name
|
|
18624
18676
|
|| node.parameters !== parameters
|
|
18625
18677
|
|| node.body !== body
|
|
18626
|
-
?
|
|
18678
|
+
? finishUpdateSetAccessorDeclaration(createSetAccessorDeclaration(modifiers, name, parameters, body), node)
|
|
18627
18679
|
: node;
|
|
18628
18680
|
}
|
|
18681
|
+
function finishUpdateSetAccessorDeclaration(updated, original) {
|
|
18682
|
+
if (updated !== original) {
|
|
18683
|
+
updated.typeParameters = original.typeParameters;
|
|
18684
|
+
updated.type = original.type;
|
|
18685
|
+
}
|
|
18686
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18687
|
+
}
|
|
18629
18688
|
function createCallSignature(typeParameters, parameters, type) {
|
|
18630
|
-
var node = createBaseSignatureDeclaration(174, undefined, undefined,
|
|
18689
|
+
var node = createBaseSignatureDeclaration(174, undefined, undefined, typeParameters, parameters, type);
|
|
18631
18690
|
node.transformFlags = 1;
|
|
18632
18691
|
return node;
|
|
18633
18692
|
}
|
|
@@ -18635,11 +18694,11 @@ var ts;
|
|
|
18635
18694
|
return node.typeParameters !== typeParameters
|
|
18636
18695
|
|| node.parameters !== parameters
|
|
18637
18696
|
|| node.type !== type
|
|
18638
|
-
?
|
|
18697
|
+
? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node)
|
|
18639
18698
|
: node;
|
|
18640
18699
|
}
|
|
18641
18700
|
function createConstructSignature(typeParameters, parameters, type) {
|
|
18642
|
-
var node = createBaseSignatureDeclaration(175, undefined, undefined,
|
|
18701
|
+
var node = createBaseSignatureDeclaration(175, undefined, undefined, typeParameters, parameters, type);
|
|
18643
18702
|
node.transformFlags = 1;
|
|
18644
18703
|
return node;
|
|
18645
18704
|
}
|
|
@@ -18647,20 +18706,19 @@ var ts;
|
|
|
18647
18706
|
return node.typeParameters !== typeParameters
|
|
18648
18707
|
|| node.parameters !== parameters
|
|
18649
18708
|
|| node.type !== type
|
|
18650
|
-
?
|
|
18709
|
+
? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node)
|
|
18651
18710
|
: node;
|
|
18652
18711
|
}
|
|
18653
|
-
function createIndexSignature(
|
|
18654
|
-
var node = createBaseSignatureDeclaration(176,
|
|
18712
|
+
function createIndexSignature(modifiers, parameters, type) {
|
|
18713
|
+
var node = createBaseSignatureDeclaration(176, modifiers, undefined, undefined, parameters, type);
|
|
18655
18714
|
node.transformFlags = 1;
|
|
18656
18715
|
return node;
|
|
18657
18716
|
}
|
|
18658
|
-
function updateIndexSignature(node,
|
|
18717
|
+
function updateIndexSignature(node, modifiers, parameters, type) {
|
|
18659
18718
|
return node.parameters !== parameters
|
|
18660
18719
|
|| node.type !== type
|
|
18661
|
-
|| node.decorators !== decorators
|
|
18662
18720
|
|| node.modifiers !== modifiers
|
|
18663
|
-
?
|
|
18721
|
+
? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node)
|
|
18664
18722
|
: node;
|
|
18665
18723
|
}
|
|
18666
18724
|
function createTemplateLiteralTypeSpan(type, literal) {
|
|
@@ -18708,17 +18766,24 @@ var ts;
|
|
|
18708
18766
|
: node;
|
|
18709
18767
|
}
|
|
18710
18768
|
function createFunctionTypeNode(typeParameters, parameters, type) {
|
|
18711
|
-
var node = createBaseSignatureDeclaration(179, undefined, undefined,
|
|
18769
|
+
var node = createBaseSignatureDeclaration(179, undefined, undefined, typeParameters, parameters, type);
|
|
18712
18770
|
node.transformFlags = 1;
|
|
18771
|
+
node.modifiers = undefined;
|
|
18713
18772
|
return node;
|
|
18714
18773
|
}
|
|
18715
18774
|
function updateFunctionTypeNode(node, typeParameters, parameters, type) {
|
|
18716
18775
|
return node.typeParameters !== typeParameters
|
|
18717
18776
|
|| node.parameters !== parameters
|
|
18718
18777
|
|| node.type !== type
|
|
18719
|
-
?
|
|
18778
|
+
? finishUpdateFunctionTypeNode(createFunctionTypeNode(typeParameters, parameters, type), node)
|
|
18720
18779
|
: node;
|
|
18721
18780
|
}
|
|
18781
|
+
function finishUpdateFunctionTypeNode(updated, original) {
|
|
18782
|
+
if (updated !== original) {
|
|
18783
|
+
updated.modifiers = original.modifiers;
|
|
18784
|
+
}
|
|
18785
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18786
|
+
}
|
|
18722
18787
|
function createConstructorTypeNode() {
|
|
18723
18788
|
var args = [];
|
|
18724
18789
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -18729,7 +18794,7 @@ var ts;
|
|
|
18729
18794
|
ts.Debug.fail("Incorrect number of arguments specified.");
|
|
18730
18795
|
}
|
|
18731
18796
|
function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
|
|
18732
|
-
var node = createBaseSignatureDeclaration(180,
|
|
18797
|
+
var node = createBaseSignatureDeclaration(180, modifiers, undefined, typeParameters, parameters, type);
|
|
18733
18798
|
node.transformFlags = 1;
|
|
18734
18799
|
return node;
|
|
18735
18800
|
}
|
|
@@ -18750,7 +18815,7 @@ var ts;
|
|
|
18750
18815
|
|| node.typeParameters !== typeParameters
|
|
18751
18816
|
|| node.parameters !== parameters
|
|
18752
18817
|
|| node.type !== type
|
|
18753
|
-
?
|
|
18818
|
+
? finishUpdateBaseSignatureDeclaration(createConstructorTypeNode(modifiers, typeParameters, parameters, type), node)
|
|
18754
18819
|
: node;
|
|
18755
18820
|
}
|
|
18756
18821
|
function updateConstructorTypeNode2(node, typeParameters, parameters, type) {
|
|
@@ -18905,33 +18970,25 @@ var ts;
|
|
|
18905
18970
|
? update(createTemplateLiteralType(head, templateSpans), node)
|
|
18906
18971
|
: node;
|
|
18907
18972
|
}
|
|
18908
|
-
function createImportTypeNode(argument,
|
|
18909
|
-
|
|
18910
|
-
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18911
|
-
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18912
|
-
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18913
|
-
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : false;
|
|
18973
|
+
function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf) {
|
|
18974
|
+
if (isTypeOf === void 0) { isTypeOf = false; }
|
|
18914
18975
|
var node = createBaseNode(200);
|
|
18915
18976
|
node.argument = argument;
|
|
18916
|
-
node.assertions =
|
|
18977
|
+
node.assertions = assertions;
|
|
18917
18978
|
node.qualifier = qualifier;
|
|
18918
18979
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
18919
18980
|
node.isTypeOf = isTypeOf;
|
|
18920
18981
|
node.transformFlags = 1;
|
|
18921
18982
|
return node;
|
|
18922
18983
|
}
|
|
18923
|
-
function updateImportTypeNode(node, argument,
|
|
18924
|
-
|
|
18925
|
-
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18926
|
-
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18927
|
-
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18928
|
-
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : node.isTypeOf;
|
|
18984
|
+
function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf) {
|
|
18985
|
+
if (isTypeOf === void 0) { isTypeOf = node.isTypeOf; }
|
|
18929
18986
|
return node.argument !== argument
|
|
18930
|
-
|| node.assertions !==
|
|
18987
|
+
|| node.assertions !== assertions
|
|
18931
18988
|
|| node.qualifier !== qualifier
|
|
18932
18989
|
|| node.typeArguments !== typeArguments
|
|
18933
18990
|
|| node.isTypeOf !== isTypeOf
|
|
18934
|
-
? update(createImportTypeNode(argument,
|
|
18991
|
+
? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node)
|
|
18935
18992
|
: node;
|
|
18936
18993
|
}
|
|
18937
18994
|
function createParenthesizedType(type) {
|
|
@@ -19043,7 +19100,7 @@ var ts;
|
|
|
19043
19100
|
: node;
|
|
19044
19101
|
}
|
|
19045
19102
|
function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
|
|
19046
|
-
var node = createBaseBindingLikeDeclaration(203, undefined,
|
|
19103
|
+
var node = createBaseBindingLikeDeclaration(203, undefined, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
19047
19104
|
node.propertyName = asName(propertyName);
|
|
19048
19105
|
node.dotDotDotToken = dotDotDotToken;
|
|
19049
19106
|
node.transformFlags |=
|
|
@@ -19323,7 +19380,7 @@ var ts;
|
|
|
19323
19380
|
: node;
|
|
19324
19381
|
}
|
|
19325
19382
|
function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
19326
|
-
var node = createBaseFunctionLikeDeclaration(213,
|
|
19383
|
+
var node = createBaseFunctionLikeDeclaration(213, modifiers, name, typeParameters, parameters, type, body);
|
|
19327
19384
|
node.asteriskToken = asteriskToken;
|
|
19328
19385
|
node.transformFlags |= propagateChildFlags(node.asteriskToken);
|
|
19329
19386
|
if (node.typeParameters) {
|
|
@@ -19350,11 +19407,11 @@ var ts;
|
|
|
19350
19407
|
|| node.parameters !== parameters
|
|
19351
19408
|
|| node.type !== type
|
|
19352
19409
|
|| node.body !== body
|
|
19353
|
-
?
|
|
19410
|
+
? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
|
|
19354
19411
|
: node;
|
|
19355
19412
|
}
|
|
19356
19413
|
function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
19357
|
-
var node = createBaseFunctionLikeDeclaration(214,
|
|
19414
|
+
var node = createBaseFunctionLikeDeclaration(214, modifiers, undefined, typeParameters, parameters, type, parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body));
|
|
19358
19415
|
node.equalsGreaterThanToken = equalsGreaterThanToken !== null && equalsGreaterThanToken !== void 0 ? equalsGreaterThanToken : createToken(38);
|
|
19359
19416
|
node.transformFlags |=
|
|
19360
19417
|
propagateChildFlags(node.equalsGreaterThanToken) |
|
|
@@ -19371,7 +19428,7 @@ var ts;
|
|
|
19371
19428
|
|| node.type !== type
|
|
19372
19429
|
|| node.equalsGreaterThanToken !== equalsGreaterThanToken
|
|
19373
19430
|
|| node.body !== body
|
|
19374
|
-
?
|
|
19431
|
+
? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node)
|
|
19375
19432
|
: node;
|
|
19376
19433
|
}
|
|
19377
19434
|
function createDeleteExpression(expression) {
|
|
@@ -19639,19 +19696,18 @@ var ts;
|
|
|
19639
19696
|
? update(createSpreadElement(expression), node)
|
|
19640
19697
|
: node;
|
|
19641
19698
|
}
|
|
19642
|
-
function createClassExpression(
|
|
19643
|
-
var node = createBaseClassLikeDeclaration(226,
|
|
19699
|
+
function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
|
|
19700
|
+
var node = createBaseClassLikeDeclaration(226, modifiers, name, typeParameters, heritageClauses, members);
|
|
19644
19701
|
node.transformFlags |= 1024;
|
|
19645
19702
|
return node;
|
|
19646
19703
|
}
|
|
19647
|
-
function updateClassExpression(node,
|
|
19648
|
-
return node.
|
|
19649
|
-
|| node.modifiers !== modifiers
|
|
19704
|
+
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
19705
|
+
return node.modifiers !== modifiers
|
|
19650
19706
|
|| node.name !== name
|
|
19651
19707
|
|| node.typeParameters !== typeParameters
|
|
19652
19708
|
|| node.heritageClauses !== heritageClauses
|
|
19653
19709
|
|| node.members !== members
|
|
19654
|
-
? update(createClassExpression(
|
|
19710
|
+
? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
19655
19711
|
: node;
|
|
19656
19712
|
}
|
|
19657
19713
|
function createOmittedExpression() {
|
|
@@ -19776,10 +19832,12 @@ var ts;
|
|
|
19776
19832
|
: node;
|
|
19777
19833
|
}
|
|
19778
19834
|
function createVariableStatement(modifiers, declarationList) {
|
|
19779
|
-
var node = createBaseDeclaration(237
|
|
19835
|
+
var node = createBaseDeclaration(237);
|
|
19836
|
+
node.modifiers = asNodeArray(modifiers);
|
|
19780
19837
|
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
|
|
19781
19838
|
node.transformFlags |=
|
|
19782
|
-
|
|
19839
|
+
propagateChildrenFlags(node.modifiers) |
|
|
19840
|
+
propagateChildFlags(node.declarationList);
|
|
19783
19841
|
if (ts.modifiersToFlags(node.modifiers) & 2) {
|
|
19784
19842
|
node.transformFlags = 1;
|
|
19785
19843
|
}
|
|
@@ -20034,7 +20092,7 @@ var ts;
|
|
|
20034
20092
|
return createBaseNode(253);
|
|
20035
20093
|
}
|
|
20036
20094
|
function createVariableDeclaration(name, exclamationToken, type, initializer) {
|
|
20037
|
-
var node = createBaseVariableLikeDeclaration(254, undefined,
|
|
20095
|
+
var node = createBaseVariableLikeDeclaration(254, undefined, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
20038
20096
|
node.exclamationToken = exclamationToken;
|
|
20039
20097
|
node.transformFlags |= propagateChildFlags(node.exclamationToken);
|
|
20040
20098
|
if (exclamationToken) {
|
|
@@ -20070,8 +20128,8 @@ var ts;
|
|
|
20070
20128
|
? update(createVariableDeclarationList(declarations, node.flags), node)
|
|
20071
20129
|
: node;
|
|
20072
20130
|
}
|
|
20073
|
-
function createFunctionDeclaration(
|
|
20074
|
-
var node = createBaseFunctionLikeDeclaration(256,
|
|
20131
|
+
function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
20132
|
+
var node = createBaseFunctionLikeDeclaration(256, modifiers, name, typeParameters, parameters, type, body);
|
|
20075
20133
|
node.asteriskToken = asteriskToken;
|
|
20076
20134
|
if (!node.body || ts.modifiersToFlags(node.modifiers) & 2) {
|
|
20077
20135
|
node.transformFlags = 1;
|
|
@@ -20092,22 +20150,28 @@ var ts;
|
|
|
20092
20150
|
node.transformFlags |= 2048;
|
|
20093
20151
|
}
|
|
20094
20152
|
}
|
|
20153
|
+
node.decorators = undefined;
|
|
20095
20154
|
return node;
|
|
20096
20155
|
}
|
|
20097
|
-
function updateFunctionDeclaration(node,
|
|
20098
|
-
return node.
|
|
20099
|
-
|| node.modifiers !== modifiers
|
|
20156
|
+
function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
20157
|
+
return node.modifiers !== modifiers
|
|
20100
20158
|
|| node.asteriskToken !== asteriskToken
|
|
20101
20159
|
|| node.name !== name
|
|
20102
20160
|
|| node.typeParameters !== typeParameters
|
|
20103
20161
|
|| node.parameters !== parameters
|
|
20104
20162
|
|| node.type !== type
|
|
20105
20163
|
|| node.body !== body
|
|
20106
|
-
?
|
|
20164
|
+
? finishUpdateFunctionDeclaration(createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
|
|
20107
20165
|
: node;
|
|
20108
20166
|
}
|
|
20109
|
-
function
|
|
20110
|
-
|
|
20167
|
+
function finishUpdateFunctionDeclaration(updated, original) {
|
|
20168
|
+
if (updated !== original) {
|
|
20169
|
+
updated.decorators = original.decorators;
|
|
20170
|
+
}
|
|
20171
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
20172
|
+
}
|
|
20173
|
+
function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
20174
|
+
var node = createBaseClassLikeDeclaration(257, modifiers, name, typeParameters, heritageClauses, members);
|
|
20111
20175
|
if (ts.modifiersToFlags(node.modifiers) & 2) {
|
|
20112
20176
|
node.transformFlags = 1;
|
|
20113
20177
|
}
|
|
@@ -20119,67 +20183,85 @@ var ts;
|
|
|
20119
20183
|
}
|
|
20120
20184
|
return node;
|
|
20121
20185
|
}
|
|
20122
|
-
function updateClassDeclaration(node,
|
|
20123
|
-
return node.
|
|
20124
|
-
|| node.modifiers !== modifiers
|
|
20186
|
+
function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
20187
|
+
return node.modifiers !== modifiers
|
|
20125
20188
|
|| node.name !== name
|
|
20126
20189
|
|| node.typeParameters !== typeParameters
|
|
20127
20190
|
|| node.heritageClauses !== heritageClauses
|
|
20128
20191
|
|| node.members !== members
|
|
20129
|
-
? update(createClassDeclaration(
|
|
20192
|
+
? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
20130
20193
|
: node;
|
|
20131
20194
|
}
|
|
20132
|
-
function createInterfaceDeclaration(
|
|
20133
|
-
var node = createBaseInterfaceOrClassLikeDeclaration(258,
|
|
20195
|
+
function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
20196
|
+
var node = createBaseInterfaceOrClassLikeDeclaration(258, modifiers, name, typeParameters, heritageClauses);
|
|
20134
20197
|
node.members = createNodeArray(members);
|
|
20135
20198
|
node.transformFlags = 1;
|
|
20199
|
+
node.decorators = undefined;
|
|
20136
20200
|
return node;
|
|
20137
20201
|
}
|
|
20138
|
-
function updateInterfaceDeclaration(node,
|
|
20139
|
-
return node.
|
|
20140
|
-
|| node.modifiers !== modifiers
|
|
20202
|
+
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
20203
|
+
return node.modifiers !== modifiers
|
|
20141
20204
|
|| node.name !== name
|
|
20142
20205
|
|| node.typeParameters !== typeParameters
|
|
20143
20206
|
|| node.heritageClauses !== heritageClauses
|
|
20144
20207
|
|| node.members !== members
|
|
20145
|
-
?
|
|
20208
|
+
? finishUpdateInterfaceDeclaration(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
20146
20209
|
: node;
|
|
20147
20210
|
}
|
|
20148
|
-
function
|
|
20149
|
-
|
|
20211
|
+
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
20212
|
+
if (updated !== original) {
|
|
20213
|
+
updated.decorators = original.decorators;
|
|
20214
|
+
}
|
|
20215
|
+
return update(updated, original);
|
|
20216
|
+
}
|
|
20217
|
+
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
20218
|
+
var node = createBaseGenericNamedDeclaration(259, modifiers, name, typeParameters);
|
|
20150
20219
|
node.type = type;
|
|
20151
20220
|
node.transformFlags = 1;
|
|
20221
|
+
node.decorators = undefined;
|
|
20152
20222
|
return node;
|
|
20153
20223
|
}
|
|
20154
|
-
function updateTypeAliasDeclaration(node,
|
|
20155
|
-
return node.
|
|
20156
|
-
|| node.modifiers !== modifiers
|
|
20224
|
+
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
20225
|
+
return node.modifiers !== modifiers
|
|
20157
20226
|
|| node.name !== name
|
|
20158
20227
|
|| node.typeParameters !== typeParameters
|
|
20159
20228
|
|| node.type !== type
|
|
20160
|
-
?
|
|
20229
|
+
? finishUpdateTypeAliasDeclaration(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node)
|
|
20161
20230
|
: node;
|
|
20162
20231
|
}
|
|
20163
|
-
function
|
|
20164
|
-
|
|
20232
|
+
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
20233
|
+
if (updated !== original) {
|
|
20234
|
+
updated.decorators = original.decorators;
|
|
20235
|
+
}
|
|
20236
|
+
return update(updated, original);
|
|
20237
|
+
}
|
|
20238
|
+
function createEnumDeclaration(modifiers, name, members) {
|
|
20239
|
+
var node = createBaseNamedDeclaration(260, modifiers, name);
|
|
20165
20240
|
node.members = createNodeArray(members);
|
|
20166
20241
|
node.transformFlags |=
|
|
20167
20242
|
propagateChildrenFlags(node.members) |
|
|
20168
20243
|
1;
|
|
20169
20244
|
node.transformFlags &= ~67108864;
|
|
20245
|
+
node.decorators = undefined;
|
|
20170
20246
|
return node;
|
|
20171
20247
|
}
|
|
20172
|
-
function updateEnumDeclaration(node,
|
|
20173
|
-
return node.
|
|
20174
|
-
|| node.modifiers !== modifiers
|
|
20248
|
+
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
20249
|
+
return node.modifiers !== modifiers
|
|
20175
20250
|
|| node.name !== name
|
|
20176
20251
|
|| node.members !== members
|
|
20177
|
-
?
|
|
20252
|
+
? finishUpdateEnumDeclaration(createEnumDeclaration(modifiers, name, members), node)
|
|
20178
20253
|
: node;
|
|
20179
20254
|
}
|
|
20180
|
-
function
|
|
20255
|
+
function finishUpdateEnumDeclaration(updated, original) {
|
|
20256
|
+
if (updated !== original) {
|
|
20257
|
+
updated.decorators = original.decorators;
|
|
20258
|
+
}
|
|
20259
|
+
return update(updated, original);
|
|
20260
|
+
}
|
|
20261
|
+
function createModuleDeclaration(modifiers, name, body, flags) {
|
|
20181
20262
|
if (flags === void 0) { flags = 0; }
|
|
20182
|
-
var node = createBaseDeclaration(261
|
|
20263
|
+
var node = createBaseDeclaration(261);
|
|
20264
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20183
20265
|
node.flags |= flags & (16 | 4 | 1024);
|
|
20184
20266
|
node.name = name;
|
|
20185
20267
|
node.body = body;
|
|
@@ -20188,21 +20270,28 @@ var ts;
|
|
|
20188
20270
|
}
|
|
20189
20271
|
else {
|
|
20190
20272
|
node.transformFlags |=
|
|
20191
|
-
|
|
20273
|
+
propagateChildrenFlags(node.modifiers) |
|
|
20274
|
+
propagateChildFlags(node.name) |
|
|
20192
20275
|
propagateChildFlags(node.body) |
|
|
20193
20276
|
1;
|
|
20194
20277
|
}
|
|
20195
20278
|
node.transformFlags &= ~67108864;
|
|
20279
|
+
node.decorators = undefined;
|
|
20196
20280
|
return node;
|
|
20197
20281
|
}
|
|
20198
|
-
function updateModuleDeclaration(node,
|
|
20199
|
-
return node.
|
|
20200
|
-
|| node.modifiers !== modifiers
|
|
20282
|
+
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
20283
|
+
return node.modifiers !== modifiers
|
|
20201
20284
|
|| node.name !== name
|
|
20202
20285
|
|| node.body !== body
|
|
20203
|
-
?
|
|
20286
|
+
? finishUpdateModuleDeclaration(createModuleDeclaration(modifiers, name, body, node.flags), node)
|
|
20204
20287
|
: node;
|
|
20205
20288
|
}
|
|
20289
|
+
function finishUpdateModuleDeclaration(updated, original) {
|
|
20290
|
+
if (updated !== original) {
|
|
20291
|
+
updated.decorators = original.decorators;
|
|
20292
|
+
}
|
|
20293
|
+
return update(updated, original);
|
|
20294
|
+
}
|
|
20206
20295
|
function createModuleBlock(statements) {
|
|
20207
20296
|
var node = createBaseNode(262);
|
|
20208
20297
|
node.statements = createNodeArray(statements);
|
|
@@ -20226,36 +20315,52 @@ var ts;
|
|
|
20226
20315
|
: node;
|
|
20227
20316
|
}
|
|
20228
20317
|
function createNamespaceExportDeclaration(name) {
|
|
20229
|
-
var node = createBaseNamedDeclaration(264, undefined,
|
|
20318
|
+
var node = createBaseNamedDeclaration(264, undefined, name);
|
|
20230
20319
|
node.transformFlags = 1;
|
|
20320
|
+
node.decorators = undefined;
|
|
20321
|
+
node.modifiers = undefined;
|
|
20231
20322
|
return node;
|
|
20232
20323
|
}
|
|
20233
20324
|
function updateNamespaceExportDeclaration(node, name) {
|
|
20234
20325
|
return node.name !== name
|
|
20235
|
-
?
|
|
20326
|
+
? finishUpdateNamespaceExportDeclaration(createNamespaceExportDeclaration(name), node)
|
|
20236
20327
|
: node;
|
|
20237
20328
|
}
|
|
20238
|
-
function
|
|
20239
|
-
|
|
20329
|
+
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
20330
|
+
if (updated !== original) {
|
|
20331
|
+
updated.decorators = original.decorators;
|
|
20332
|
+
updated.modifiers = original.modifiers;
|
|
20333
|
+
}
|
|
20334
|
+
return update(updated, original);
|
|
20335
|
+
}
|
|
20336
|
+
function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) {
|
|
20337
|
+
var node = createBaseNamedDeclaration(265, modifiers, name);
|
|
20240
20338
|
node.isTypeOnly = isTypeOnly;
|
|
20241
20339
|
node.moduleReference = moduleReference;
|
|
20242
20340
|
node.transformFlags |= propagateChildFlags(node.moduleReference);
|
|
20243
20341
|
if (!ts.isExternalModuleReference(node.moduleReference))
|
|
20244
20342
|
node.transformFlags |= 1;
|
|
20245
20343
|
node.transformFlags &= ~67108864;
|
|
20344
|
+
node.decorators = undefined;
|
|
20246
20345
|
return node;
|
|
20247
20346
|
}
|
|
20248
|
-
function updateImportEqualsDeclaration(node,
|
|
20249
|
-
return node.
|
|
20250
|
-
|| node.modifiers !== modifiers
|
|
20347
|
+
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
20348
|
+
return node.modifiers !== modifiers
|
|
20251
20349
|
|| node.isTypeOnly !== isTypeOnly
|
|
20252
20350
|
|| node.name !== name
|
|
20253
20351
|
|| node.moduleReference !== moduleReference
|
|
20254
|
-
?
|
|
20352
|
+
? finishUpdateImportEqualsDeclaration(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node)
|
|
20255
20353
|
: node;
|
|
20256
20354
|
}
|
|
20257
|
-
function
|
|
20258
|
-
|
|
20355
|
+
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
20356
|
+
if (updated !== original) {
|
|
20357
|
+
updated.decorators = original.decorators;
|
|
20358
|
+
}
|
|
20359
|
+
return update(updated, original);
|
|
20360
|
+
}
|
|
20361
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
20362
|
+
var node = createBaseDeclaration(266);
|
|
20363
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20259
20364
|
node.importClause = importClause;
|
|
20260
20365
|
node.moduleSpecifier = moduleSpecifier;
|
|
20261
20366
|
node.assertClause = assertClause;
|
|
@@ -20263,17 +20368,23 @@ var ts;
|
|
|
20263
20368
|
propagateChildFlags(node.importClause) |
|
|
20264
20369
|
propagateChildFlags(node.moduleSpecifier);
|
|
20265
20370
|
node.transformFlags &= ~67108864;
|
|
20371
|
+
node.decorators = undefined;
|
|
20266
20372
|
return node;
|
|
20267
20373
|
}
|
|
20268
|
-
function updateImportDeclaration(node,
|
|
20269
|
-
return node.
|
|
20270
|
-
|| node.modifiers !== modifiers
|
|
20374
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
20375
|
+
return node.modifiers !== modifiers
|
|
20271
20376
|
|| node.importClause !== importClause
|
|
20272
20377
|
|| node.moduleSpecifier !== moduleSpecifier
|
|
20273
20378
|
|| node.assertClause !== assertClause
|
|
20274
|
-
?
|
|
20379
|
+
? finishUpdateImportDeclaration(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node)
|
|
20275
20380
|
: node;
|
|
20276
20381
|
}
|
|
20382
|
+
function finishUpdateImportDeclaration(updated, original) {
|
|
20383
|
+
if (updated !== original) {
|
|
20384
|
+
updated.decorators = original.decorators;
|
|
20385
|
+
}
|
|
20386
|
+
return update(updated, original);
|
|
20387
|
+
}
|
|
20277
20388
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
20278
20389
|
var node = createBaseNode(267);
|
|
20279
20390
|
node.isTypeOnly = isTypeOnly;
|
|
@@ -20389,45 +20500,60 @@ var ts;
|
|
|
20389
20500
|
? update(createImportSpecifier(isTypeOnly, propertyName, name), node)
|
|
20390
20501
|
: node;
|
|
20391
20502
|
}
|
|
20392
|
-
function createExportAssignment(
|
|
20393
|
-
var node = createBaseDeclaration(271
|
|
20503
|
+
function createExportAssignment(modifiers, isExportEquals, expression) {
|
|
20504
|
+
var node = createBaseDeclaration(271);
|
|
20505
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20394
20506
|
node.isExportEquals = isExportEquals;
|
|
20395
20507
|
node.expression = isExportEquals
|
|
20396
20508
|
? parenthesizerRules().parenthesizeRightSideOfBinary(63, undefined, expression)
|
|
20397
20509
|
: parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
|
|
20398
|
-
node.transformFlags |= propagateChildFlags(node.expression);
|
|
20510
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
20399
20511
|
node.transformFlags &= ~67108864;
|
|
20512
|
+
node.decorators = undefined;
|
|
20400
20513
|
return node;
|
|
20401
20514
|
}
|
|
20402
|
-
function updateExportAssignment(node,
|
|
20403
|
-
return node.
|
|
20404
|
-
|| node.modifiers !== modifiers
|
|
20515
|
+
function updateExportAssignment(node, modifiers, expression) {
|
|
20516
|
+
return node.modifiers !== modifiers
|
|
20405
20517
|
|| node.expression !== expression
|
|
20406
|
-
?
|
|
20518
|
+
? finishUpdateExportAssignment(createExportAssignment(modifiers, node.isExportEquals, expression), node)
|
|
20407
20519
|
: node;
|
|
20408
20520
|
}
|
|
20409
|
-
function
|
|
20410
|
-
|
|
20521
|
+
function finishUpdateExportAssignment(updated, original) {
|
|
20522
|
+
if (updated !== original) {
|
|
20523
|
+
updated.decorators = original.decorators;
|
|
20524
|
+
}
|
|
20525
|
+
return update(updated, original);
|
|
20526
|
+
}
|
|
20527
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
20528
|
+
var node = createBaseDeclaration(272);
|
|
20529
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20411
20530
|
node.isTypeOnly = isTypeOnly;
|
|
20412
20531
|
node.exportClause = exportClause;
|
|
20413
20532
|
node.moduleSpecifier = moduleSpecifier;
|
|
20414
20533
|
node.assertClause = assertClause;
|
|
20415
20534
|
node.transformFlags |=
|
|
20416
|
-
|
|
20535
|
+
propagateChildrenFlags(node.modifiers) |
|
|
20536
|
+
propagateChildFlags(node.exportClause) |
|
|
20417
20537
|
propagateChildFlags(node.moduleSpecifier);
|
|
20418
20538
|
node.transformFlags &= ~67108864;
|
|
20539
|
+
node.decorators = undefined;
|
|
20419
20540
|
return node;
|
|
20420
20541
|
}
|
|
20421
|
-
function updateExportDeclaration(node,
|
|
20422
|
-
return node.
|
|
20423
|
-
|| node.modifiers !== modifiers
|
|
20542
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
20543
|
+
return node.modifiers !== modifiers
|
|
20424
20544
|
|| node.isTypeOnly !== isTypeOnly
|
|
20425
20545
|
|| node.exportClause !== exportClause
|
|
20426
20546
|
|| node.moduleSpecifier !== moduleSpecifier
|
|
20427
20547
|
|| node.assertClause !== assertClause
|
|
20428
|
-
?
|
|
20548
|
+
? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node)
|
|
20429
20549
|
: node;
|
|
20430
20550
|
}
|
|
20551
|
+
function finishUpdateExportDeclaration(updated, original) {
|
|
20552
|
+
if (updated !== original) {
|
|
20553
|
+
updated.decorators = original.decorators;
|
|
20554
|
+
}
|
|
20555
|
+
return update(updated, original);
|
|
20556
|
+
}
|
|
20431
20557
|
function createNamedExports(elements) {
|
|
20432
20558
|
var node = createBaseNode(273);
|
|
20433
20559
|
node.elements = createNodeArray(elements);
|
|
@@ -20459,7 +20585,7 @@ var ts;
|
|
|
20459
20585
|
: node;
|
|
20460
20586
|
}
|
|
20461
20587
|
function createMissingDeclaration() {
|
|
20462
|
-
var node = createBaseDeclaration(276
|
|
20588
|
+
var node = createBaseDeclaration(276);
|
|
20463
20589
|
return node;
|
|
20464
20590
|
}
|
|
20465
20591
|
function createExternalModuleReference(expression) {
|
|
@@ -20499,7 +20625,7 @@ var ts;
|
|
|
20499
20625
|
: node;
|
|
20500
20626
|
}
|
|
20501
20627
|
function createJSDocFunctionType(parameters, type) {
|
|
20502
|
-
var node = createBaseSignatureDeclaration(317, undefined, undefined, undefined,
|
|
20628
|
+
var node = createBaseSignatureDeclaration(317, undefined, undefined, undefined, parameters, type);
|
|
20503
20629
|
return node;
|
|
20504
20630
|
}
|
|
20505
20631
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
@@ -21038,57 +21164,61 @@ var ts;
|
|
|
21038
21164
|
: node;
|
|
21039
21165
|
}
|
|
21040
21166
|
function createPropertyAssignment(name, initializer) {
|
|
21041
|
-
var node = createBaseNamedDeclaration(296, undefined,
|
|
21167
|
+
var node = createBaseNamedDeclaration(296, undefined, name);
|
|
21042
21168
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
21043
21169
|
node.transformFlags |=
|
|
21044
21170
|
propagateChildFlags(node.name) |
|
|
21045
21171
|
propagateChildFlags(node.initializer);
|
|
21172
|
+
node.decorators = undefined;
|
|
21173
|
+
node.modifiers = undefined;
|
|
21174
|
+
node.questionToken = undefined;
|
|
21175
|
+
node.exclamationToken = undefined;
|
|
21046
21176
|
return node;
|
|
21047
21177
|
}
|
|
21178
|
+
function updatePropertyAssignment(node, name, initializer) {
|
|
21179
|
+
return node.name !== name
|
|
21180
|
+
|| node.initializer !== initializer
|
|
21181
|
+
? finishUpdatePropertyAssignment(createPropertyAssignment(name, initializer), node)
|
|
21182
|
+
: node;
|
|
21183
|
+
}
|
|
21048
21184
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
21049
|
-
if (original
|
|
21185
|
+
if (updated !== original) {
|
|
21050
21186
|
updated.decorators = original.decorators;
|
|
21051
|
-
if (original.modifiers)
|
|
21052
21187
|
updated.modifiers = original.modifiers;
|
|
21053
|
-
if (original.questionToken)
|
|
21054
21188
|
updated.questionToken = original.questionToken;
|
|
21055
|
-
if (original.exclamationToken)
|
|
21056
21189
|
updated.exclamationToken = original.exclamationToken;
|
|
21190
|
+
}
|
|
21057
21191
|
return update(updated, original);
|
|
21058
21192
|
}
|
|
21059
|
-
function updatePropertyAssignment(node, name, initializer) {
|
|
21060
|
-
return node.name !== name
|
|
21061
|
-
|| node.initializer !== initializer
|
|
21062
|
-
? finishUpdatePropertyAssignment(createPropertyAssignment(name, initializer), node)
|
|
21063
|
-
: node;
|
|
21064
|
-
}
|
|
21065
21193
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
21066
|
-
var node = createBaseNamedDeclaration(297, undefined,
|
|
21194
|
+
var node = createBaseNamedDeclaration(297, undefined, name);
|
|
21067
21195
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
21068
21196
|
node.transformFlags |=
|
|
21069
21197
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
21070
21198
|
1024;
|
|
21199
|
+
node.equalsToken = undefined;
|
|
21200
|
+
node.decorators = undefined;
|
|
21201
|
+
node.modifiers = undefined;
|
|
21202
|
+
node.questionToken = undefined;
|
|
21203
|
+
node.exclamationToken = undefined;
|
|
21071
21204
|
return node;
|
|
21072
21205
|
}
|
|
21206
|
+
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
21207
|
+
return node.name !== name
|
|
21208
|
+
|| node.objectAssignmentInitializer !== objectAssignmentInitializer
|
|
21209
|
+
? finishUpdateShorthandPropertyAssignment(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
|
|
21210
|
+
: node;
|
|
21211
|
+
}
|
|
21073
21212
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
21074
|
-
if (original
|
|
21213
|
+
if (updated !== original) {
|
|
21214
|
+
updated.equalsToken = original.equalsToken;
|
|
21075
21215
|
updated.decorators = original.decorators;
|
|
21076
|
-
if (original.modifiers)
|
|
21077
21216
|
updated.modifiers = original.modifiers;
|
|
21078
|
-
if (original.equalsToken)
|
|
21079
|
-
updated.equalsToken = original.equalsToken;
|
|
21080
|
-
if (original.questionToken)
|
|
21081
21217
|
updated.questionToken = original.questionToken;
|
|
21082
|
-
if (original.exclamationToken)
|
|
21083
21218
|
updated.exclamationToken = original.exclamationToken;
|
|
21219
|
+
}
|
|
21084
21220
|
return update(updated, original);
|
|
21085
21221
|
}
|
|
21086
|
-
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
21087
|
-
return node.name !== name
|
|
21088
|
-
|| node.objectAssignmentInitializer !== objectAssignmentInitializer
|
|
21089
|
-
? finishUpdateShorthandPropertyAssignment(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
|
|
21090
|
-
: node;
|
|
21091
|
-
}
|
|
21092
21222
|
function createSpreadAssignment(expression) {
|
|
21093
21223
|
var node = createBaseNode(298);
|
|
21094
21224
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
@@ -21339,10 +21469,10 @@ var ts;
|
|
|
21339
21469
|
return createVoidExpression(createNumericLiteral("0"));
|
|
21340
21470
|
}
|
|
21341
21471
|
function createExportDefault(expression) {
|
|
21342
|
-
return createExportAssignment(undefined,
|
|
21472
|
+
return createExportAssignment(undefined, false, expression);
|
|
21343
21473
|
}
|
|
21344
21474
|
function createExternalModuleExport(exportName) {
|
|
21345
|
-
return createExportDeclaration(undefined,
|
|
21475
|
+
return createExportDeclaration(undefined, false, createNamedExports([
|
|
21346
21476
|
createExportSpecifier(false, undefined, exportName)
|
|
21347
21477
|
]));
|
|
21348
21478
|
}
|
|
@@ -21509,7 +21639,7 @@ var ts;
|
|
|
21509
21639
|
}
|
|
21510
21640
|
function createAssignmentTargetWrapper(paramName, expression) {
|
|
21511
21641
|
return createPropertyAccessExpression(createParenthesizedExpression(createObjectLiteralExpression([
|
|
21512
|
-
createSetAccessorDeclaration(undefined,
|
|
21642
|
+
createSetAccessorDeclaration(undefined, "value", [createParameterDeclaration(undefined, undefined, paramName, undefined, undefined, undefined)], createBlock([
|
|
21513
21643
|
createExpressionStatement(expression)
|
|
21514
21644
|
]))
|
|
21515
21645
|
])), "value");
|
|
@@ -21685,30 +21815,32 @@ var ts;
|
|
|
21685
21815
|
else {
|
|
21686
21816
|
modifierArray = modifiers;
|
|
21687
21817
|
}
|
|
21688
|
-
return ts.
|
|
21689
|
-
ts.
|
|
21690
|
-
ts.
|
|
21691
|
-
ts.
|
|
21692
|
-
ts.
|
|
21693
|
-
ts.
|
|
21694
|
-
ts.
|
|
21695
|
-
ts.
|
|
21696
|
-
ts.
|
|
21697
|
-
ts.
|
|
21698
|
-
ts.
|
|
21699
|
-
ts.
|
|
21700
|
-
ts.
|
|
21701
|
-
ts.
|
|
21702
|
-
ts.
|
|
21703
|
-
ts.
|
|
21704
|
-
ts.
|
|
21705
|
-
ts.
|
|
21706
|
-
ts.
|
|
21707
|
-
ts.
|
|
21708
|
-
ts.
|
|
21709
|
-
ts.
|
|
21710
|
-
ts.
|
|
21711
|
-
ts.
|
|
21818
|
+
return ts.isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) :
|
|
21819
|
+
ts.isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) :
|
|
21820
|
+
ts.isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) :
|
|
21821
|
+
ts.isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) :
|
|
21822
|
+
ts.isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a = node.questionToken) !== null && _a !== void 0 ? _a : node.exclamationToken, node.type, node.initializer) :
|
|
21823
|
+
ts.isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) :
|
|
21824
|
+
ts.isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21825
|
+
ts.isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) :
|
|
21826
|
+
ts.isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) :
|
|
21827
|
+
ts.isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) :
|
|
21828
|
+
ts.isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) :
|
|
21829
|
+
ts.isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21830
|
+
ts.isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) :
|
|
21831
|
+
ts.isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21832
|
+
ts.isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) :
|
|
21833
|
+
ts.isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21834
|
+
ts.isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21835
|
+
ts.isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21836
|
+
ts.isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) :
|
|
21837
|
+
ts.isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) :
|
|
21838
|
+
ts.isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) :
|
|
21839
|
+
ts.isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) :
|
|
21840
|
+
ts.isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) :
|
|
21841
|
+
ts.isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) :
|
|
21842
|
+
ts.isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) :
|
|
21843
|
+
ts.Debug.assertNever(node);
|
|
21712
21844
|
}
|
|
21713
21845
|
function asNodeArray(array) {
|
|
21714
21846
|
return array ? createNodeArray(array) : undefined;
|
|
@@ -22958,6 +23090,10 @@ var ts;
|
|
|
22958
23090
|
return node.kind === 126;
|
|
22959
23091
|
}
|
|
22960
23092
|
ts.isAbstractModifier = isAbstractModifier;
|
|
23093
|
+
function isOverrideModifier(node) {
|
|
23094
|
+
return node.kind === 159;
|
|
23095
|
+
}
|
|
23096
|
+
ts.isOverrideModifier = isOverrideModifier;
|
|
22961
23097
|
function isSuperKeyword(node) {
|
|
22962
23098
|
return node.kind === 106;
|
|
22963
23099
|
}
|
|
@@ -23722,7 +23858,7 @@ var ts;
|
|
|
23722
23858
|
var ts;
|
|
23723
23859
|
(function (ts) {
|
|
23724
23860
|
function createEmptyExports(factory) {
|
|
23725
|
-
return factory.createExportDeclaration(undefined,
|
|
23861
|
+
return factory.createExportDeclaration(undefined, false, factory.createNamedExports([]), undefined);
|
|
23726
23862
|
}
|
|
23727
23863
|
ts.createEmptyExports = createEmptyExports;
|
|
23728
23864
|
function createMemberAccessForPropertyName(factory, target, memberName, location) {
|
|
@@ -23856,8 +23992,8 @@ var ts;
|
|
|
23856
23992
|
return ts.setTextRange(factory.createObjectDefinePropertyCall(receiver, createExpressionForPropertyName(factory, property.name), factory.createPropertyDescriptor({
|
|
23857
23993
|
enumerable: factory.createFalse(),
|
|
23858
23994
|
configurable: true,
|
|
23859
|
-
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(getAccessor
|
|
23860
|
-
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(setAccessor
|
|
23995
|
+
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(getAccessor), undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body), getAccessor), getAccessor),
|
|
23996
|
+
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(setAccessor), undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body), setAccessor), setAccessor)
|
|
23861
23997
|
}, !multiLine)), firstAccessor);
|
|
23862
23998
|
}
|
|
23863
23999
|
return undefined;
|
|
@@ -23869,7 +24005,7 @@ var ts;
|
|
|
23869
24005
|
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, property.name, property.name), factory.cloneNode(property.name)), property), property);
|
|
23870
24006
|
}
|
|
23871
24007
|
function createExpressionForMethodDeclaration(factory, method, receiver) {
|
|
23872
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, method.name, method.name), ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(method
|
|
24008
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, method.name, method.name), ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(ts.getModifiers(method), method.asteriskToken, undefined, undefined, method.parameters, undefined, method.body), method), method)), method), method);
|
|
23873
24009
|
}
|
|
23874
24010
|
function createExpressionForObjectLiteralElementLike(factory, node, property, receiver) {
|
|
23875
24011
|
if (property.name && ts.isPrivateIdentifier(property.name)) {
|
|
@@ -24047,7 +24183,7 @@ var ts;
|
|
|
24047
24183
|
}
|
|
24048
24184
|
}
|
|
24049
24185
|
if (namedBindings) {
|
|
24050
|
-
var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined,
|
|
24186
|
+
var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined, nodeFactory.createImportClause(false, undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText), undefined);
|
|
24051
24187
|
ts.addEmitFlags(externalHelpersImportDeclaration, 67108864);
|
|
24052
24188
|
return externalHelpersImportDeclaration;
|
|
24053
24189
|
}
|
|
@@ -24256,9 +24392,55 @@ var ts;
|
|
|
24256
24392
|
}
|
|
24257
24393
|
}
|
|
24258
24394
|
ts.getJSDocTypeAliasName = getJSDocTypeAliasName;
|
|
24259
|
-
function
|
|
24395
|
+
function canHaveIllegalType(node) {
|
|
24396
|
+
var kind = node.kind;
|
|
24397
|
+
return kind === 171
|
|
24398
|
+
|| kind === 173;
|
|
24399
|
+
}
|
|
24400
|
+
ts.canHaveIllegalType = canHaveIllegalType;
|
|
24401
|
+
function canHaveIllegalTypeParameters(node) {
|
|
24402
|
+
var kind = node.kind;
|
|
24403
|
+
return kind === 171
|
|
24404
|
+
|| kind === 172
|
|
24405
|
+
|| kind === 173;
|
|
24406
|
+
}
|
|
24407
|
+
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
24408
|
+
function canHaveDecorators(node) {
|
|
24260
24409
|
var kind = node.kind;
|
|
24261
24410
|
return kind === 164
|
|
24411
|
+
|| kind === 167
|
|
24412
|
+
|| kind === 169
|
|
24413
|
+
|| kind === 172
|
|
24414
|
+
|| kind === 173
|
|
24415
|
+
|| kind === 226
|
|
24416
|
+
|| kind === 257;
|
|
24417
|
+
}
|
|
24418
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
24419
|
+
function canHaveIllegalDecorators(node) {
|
|
24420
|
+
var kind = node.kind;
|
|
24421
|
+
return kind === 296
|
|
24422
|
+
|| kind === 297
|
|
24423
|
+
|| kind === 256
|
|
24424
|
+
|| kind === 171
|
|
24425
|
+
|| kind === 176
|
|
24426
|
+
|| kind === 170
|
|
24427
|
+
|| kind === 276
|
|
24428
|
+
|| kind === 237
|
|
24429
|
+
|| kind === 258
|
|
24430
|
+
|| kind === 259
|
|
24431
|
+
|| kind === 260
|
|
24432
|
+
|| kind === 261
|
|
24433
|
+
|| kind === 265
|
|
24434
|
+
|| kind === 266
|
|
24435
|
+
|| kind === 264
|
|
24436
|
+
|| kind === 272
|
|
24437
|
+
|| kind === 271;
|
|
24438
|
+
}
|
|
24439
|
+
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
24440
|
+
function canHaveModifiers(node) {
|
|
24441
|
+
var kind = node.kind;
|
|
24442
|
+
return kind === 163
|
|
24443
|
+
|| kind === 164
|
|
24262
24444
|
|| kind === 166
|
|
24263
24445
|
|| kind === 167
|
|
24264
24446
|
|| kind === 168
|
|
@@ -24267,6 +24449,7 @@ var ts;
|
|
|
24267
24449
|
|| kind === 172
|
|
24268
24450
|
|| kind === 173
|
|
24269
24451
|
|| kind === 176
|
|
24452
|
+
|| kind === 180
|
|
24270
24453
|
|| kind === 213
|
|
24271
24454
|
|| kind === 214
|
|
24272
24455
|
|| kind === 226
|
|
@@ -24283,6 +24466,16 @@ var ts;
|
|
|
24283
24466
|
|| kind === 272;
|
|
24284
24467
|
}
|
|
24285
24468
|
ts.canHaveModifiers = canHaveModifiers;
|
|
24469
|
+
function canHaveIllegalModifiers(node) {
|
|
24470
|
+
var kind = node.kind;
|
|
24471
|
+
return kind === 170
|
|
24472
|
+
|| kind === 296
|
|
24473
|
+
|| kind === 297
|
|
24474
|
+
|| kind === 179
|
|
24475
|
+
|| kind === 276
|
|
24476
|
+
|| kind === 264;
|
|
24477
|
+
}
|
|
24478
|
+
ts.canHaveIllegalModifiers = canHaveIllegalModifiers;
|
|
24286
24479
|
ts.isTypeNodeOrTypeParameterDeclaration = ts.or(ts.isTypeNode, ts.isTypeParameterDeclaration);
|
|
24287
24480
|
ts.isQuestionOrExclamationToken = ts.or(ts.isQuestionToken, ts.isExclamationToken);
|
|
24288
24481
|
ts.isIdentifierOrThisTypeNode = ts.or(ts.isIdentifier, ts.isThisTypeNode);
|
|
@@ -24565,7 +24758,7 @@ var ts;
|
|
|
24565
24758
|
}
|
|
24566
24759
|
ts.isFileProbablyExternalModule = isFileProbablyExternalModule;
|
|
24567
24760
|
function isAnExternalModuleIndicatorNode(node) {
|
|
24568
|
-
return hasModifierOfKind(node, 93)
|
|
24761
|
+
return ts.canHaveModifiers(node) && hasModifierOfKind(node, 93)
|
|
24569
24762
|
|| ts.isImportEqualsDeclaration(node) && ts.isExternalModuleReference(node.moduleReference)
|
|
24570
24763
|
|| ts.isImportDeclaration(node)
|
|
24571
24764
|
|| ts.isExportAssignment(node)
|
|
@@ -24610,24 +24803,21 @@ var ts;
|
|
|
24610
24803
|
case 298:
|
|
24611
24804
|
return visitNode(cbNode, node.expression);
|
|
24612
24805
|
case 164:
|
|
24613
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24614
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24806
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24615
24807
|
visitNode(cbNode, node.dotDotDotToken) ||
|
|
24616
24808
|
visitNode(cbNode, node.name) ||
|
|
24617
24809
|
visitNode(cbNode, node.questionToken) ||
|
|
24618
24810
|
visitNode(cbNode, node.type) ||
|
|
24619
24811
|
visitNode(cbNode, node.initializer);
|
|
24620
24812
|
case 167:
|
|
24621
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24622
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24813
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24623
24814
|
visitNode(cbNode, node.name) ||
|
|
24624
24815
|
visitNode(cbNode, node.questionToken) ||
|
|
24625
24816
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24626
24817
|
visitNode(cbNode, node.type) ||
|
|
24627
24818
|
visitNode(cbNode, node.initializer);
|
|
24628
24819
|
case 166:
|
|
24629
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24630
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24820
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24631
24821
|
visitNode(cbNode, node.name) ||
|
|
24632
24822
|
visitNode(cbNode, node.questionToken) ||
|
|
24633
24823
|
visitNode(cbNode, node.type) ||
|
|
@@ -24637,45 +24827,97 @@ var ts;
|
|
|
24637
24827
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24638
24828
|
visitNode(cbNode, node.name) ||
|
|
24639
24829
|
visitNode(cbNode, node.questionToken) ||
|
|
24830
|
+
visitNode(cbNode, node.exclamationToken) ||
|
|
24640
24831
|
visitNode(cbNode, node.initializer);
|
|
24641
24832
|
case 254:
|
|
24642
|
-
return
|
|
24643
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24644
|
-
visitNode(cbNode, node.name) ||
|
|
24833
|
+
return visitNode(cbNode, node.name) ||
|
|
24645
24834
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24646
24835
|
visitNode(cbNode, node.type) ||
|
|
24647
24836
|
visitNode(cbNode, node.initializer);
|
|
24648
24837
|
case 203:
|
|
24649
|
-
return
|
|
24650
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24651
|
-
visitNode(cbNode, node.dotDotDotToken) ||
|
|
24838
|
+
return visitNode(cbNode, node.dotDotDotToken) ||
|
|
24652
24839
|
visitNode(cbNode, node.propertyName) ||
|
|
24653
24840
|
visitNode(cbNode, node.name) ||
|
|
24654
24841
|
visitNode(cbNode, node.initializer);
|
|
24655
|
-
case 179:
|
|
24656
|
-
case 180:
|
|
24657
|
-
case 174:
|
|
24658
|
-
case 175:
|
|
24659
24842
|
case 176:
|
|
24660
24843
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24661
24844
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24662
24845
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24663
24846
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24664
24847
|
visitNode(cbNode, node.type);
|
|
24848
|
+
case 180:
|
|
24849
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24850
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24851
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24852
|
+
visitNode(cbNode, node.type);
|
|
24853
|
+
case 179:
|
|
24854
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24855
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24856
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24857
|
+
visitNode(cbNode, node.type);
|
|
24858
|
+
case 174:
|
|
24859
|
+
case 175:
|
|
24860
|
+
return visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24861
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24862
|
+
visitNode(cbNode, node.type);
|
|
24665
24863
|
case 169:
|
|
24864
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24865
|
+
visitNode(cbNode, node.asteriskToken) ||
|
|
24866
|
+
visitNode(cbNode, node.name) ||
|
|
24867
|
+
visitNode(cbNode, node.questionToken) ||
|
|
24868
|
+
visitNode(cbNode, node.exclamationToken) ||
|
|
24869
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24870
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24871
|
+
visitNode(cbNode, node.type) ||
|
|
24872
|
+
visitNode(cbNode, node.body);
|
|
24666
24873
|
case 168:
|
|
24874
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24875
|
+
visitNode(cbNode, node.name) ||
|
|
24876
|
+
visitNode(cbNode, node.questionToken) ||
|
|
24877
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24878
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24879
|
+
visitNode(cbNode, node.type);
|
|
24667
24880
|
case 171:
|
|
24881
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24882
|
+
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24883
|
+
visitNode(cbNode, node.name) ||
|
|
24884
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24885
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24886
|
+
visitNode(cbNode, node.type) ||
|
|
24887
|
+
visitNode(cbNode, node.body);
|
|
24668
24888
|
case 172:
|
|
24889
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24890
|
+
visitNode(cbNode, node.name) ||
|
|
24891
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24892
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24893
|
+
visitNode(cbNode, node.type) ||
|
|
24894
|
+
visitNode(cbNode, node.body);
|
|
24669
24895
|
case 173:
|
|
24670
|
-
|
|
24896
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24897
|
+
visitNode(cbNode, node.name) ||
|
|
24898
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24899
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24900
|
+
visitNode(cbNode, node.type) ||
|
|
24901
|
+
visitNode(cbNode, node.body);
|
|
24671
24902
|
case 256:
|
|
24672
|
-
case 214:
|
|
24673
24903
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24674
24904
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24675
24905
|
visitNode(cbNode, node.asteriskToken) ||
|
|
24676
24906
|
visitNode(cbNode, node.name) ||
|
|
24677
|
-
|
|
24678
|
-
|
|
24907
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24908
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24909
|
+
visitNode(cbNode, node.type) ||
|
|
24910
|
+
visitNode(cbNode, node.body);
|
|
24911
|
+
case 213:
|
|
24912
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24913
|
+
visitNode(cbNode, node.asteriskToken) ||
|
|
24914
|
+
visitNode(cbNode, node.name) ||
|
|
24915
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24916
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24917
|
+
visitNode(cbNode, node.type) ||
|
|
24918
|
+
visitNode(cbNode, node.body);
|
|
24919
|
+
case 214:
|
|
24920
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24679
24921
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24680
24922
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24681
24923
|
visitNode(cbNode, node.type) ||
|
|
@@ -24875,8 +25117,7 @@ var ts;
|
|
|
24875
25117
|
return visitNode(cbNode, node.expression);
|
|
24876
25118
|
case 257:
|
|
24877
25119
|
case 226:
|
|
24878
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24879
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25120
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24880
25121
|
visitNode(cbNode, node.name) ||
|
|
24881
25122
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24882
25123
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
@@ -24927,7 +25168,8 @@ var ts;
|
|
|
24927
25168
|
return visitNode(cbNode, node.name) ||
|
|
24928
25169
|
visitNode(cbNode, node.value);
|
|
24929
25170
|
case 264:
|
|
24930
|
-
return
|
|
25171
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
25172
|
+
visitNode(cbNode, node.name);
|
|
24931
25173
|
case 268:
|
|
24932
25174
|
return visitNode(cbNode, node.name);
|
|
24933
25175
|
case 274:
|
|
@@ -24950,13 +25192,17 @@ var ts;
|
|
|
24950
25192
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24951
25193
|
visitNode(cbNode, node.expression);
|
|
24952
25194
|
case 223:
|
|
24953
|
-
return visitNode(cbNode, node.head) ||
|
|
25195
|
+
return visitNode(cbNode, node.head) ||
|
|
25196
|
+
visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
24954
25197
|
case 233:
|
|
24955
|
-
return visitNode(cbNode, node.expression) ||
|
|
25198
|
+
return visitNode(cbNode, node.expression) ||
|
|
25199
|
+
visitNode(cbNode, node.literal);
|
|
24956
25200
|
case 198:
|
|
24957
|
-
return visitNode(cbNode, node.head) ||
|
|
25201
|
+
return visitNode(cbNode, node.head) ||
|
|
25202
|
+
visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
24958
25203
|
case 199:
|
|
24959
|
-
return visitNode(cbNode, node.type) ||
|
|
25204
|
+
return visitNode(cbNode, node.type) ||
|
|
25205
|
+
visitNode(cbNode, node.literal);
|
|
24960
25206
|
case 162:
|
|
24961
25207
|
return visitNode(cbNode, node.expression);
|
|
24962
25208
|
case 291:
|
|
@@ -24967,7 +25213,8 @@ var ts;
|
|
|
24967
25213
|
case 277:
|
|
24968
25214
|
return visitNode(cbNode, node.expression);
|
|
24969
25215
|
case 276:
|
|
24970
|
-
return visitNodes(cbNode, cbNodes, node.decorators)
|
|
25216
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
25217
|
+
visitNodes(cbNode, cbNodes, node.modifiers);
|
|
24971
25218
|
case 351:
|
|
24972
25219
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
24973
25220
|
case 278:
|
|
@@ -26783,7 +27030,7 @@ var ts;
|
|
|
26783
27030
|
name = parseIdentifierName();
|
|
26784
27031
|
parseExpected(58);
|
|
26785
27032
|
}
|
|
26786
|
-
return finishNode(factory.createParameterDeclaration(undefined, undefined,
|
|
27033
|
+
return finishNode(factory.createParameterDeclaration(undefined, undefined, name, undefined, parseJSDocType(), undefined), pos);
|
|
26787
27034
|
}
|
|
26788
27035
|
function parseJSDocType() {
|
|
26789
27036
|
scanner.setInJSDocType(true);
|
|
@@ -26876,7 +27123,7 @@ var ts;
|
|
|
26876
27123
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
26877
27124
|
var decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : parseDecorators();
|
|
26878
27125
|
if (token() === 108) {
|
|
26879
|
-
var node_1 = factory.createParameterDeclaration(decorators, undefined,
|
|
27126
|
+
var node_1 = factory.createParameterDeclaration(decorators, undefined, createIdentifier(true), undefined, parseTypeAnnotation(), undefined);
|
|
26880
27127
|
if (decorators) {
|
|
26881
27128
|
parseErrorAtRange(decorators[0], ts.Diagnostics.Decorators_may_not_be_applied_to_this_parameters);
|
|
26882
27129
|
}
|
|
@@ -26884,12 +27131,12 @@ var ts;
|
|
|
26884
27131
|
}
|
|
26885
27132
|
var savedTopLevel = topLevel;
|
|
26886
27133
|
topLevel = false;
|
|
26887
|
-
var modifiers = parseModifiers();
|
|
27134
|
+
var modifiers = combineDecoratorsAndModifiers(decorators, parseModifiers());
|
|
26888
27135
|
var dotDotDotToken = parseOptionalToken(25);
|
|
26889
27136
|
if (!allowAmbiguity && !isParameterNameStart()) {
|
|
26890
27137
|
return undefined;
|
|
26891
27138
|
}
|
|
26892
|
-
var node = withJSDoc(finishNode(factory.createParameterDeclaration(
|
|
27139
|
+
var node = withJSDoc(finishNode(factory.createParameterDeclaration(modifiers, dotDotDotToken, parseNameOfParameter(modifiers), parseOptionalToken(57), parseTypeAnnotation(), parseInitializer()), pos), hasJSDoc);
|
|
26893
27140
|
topLevel = savedTopLevel;
|
|
26894
27141
|
return node;
|
|
26895
27142
|
}
|
|
@@ -26987,7 +27234,8 @@ var ts;
|
|
|
26987
27234
|
var parameters = parseBracketedList(16, function () { return parseParameter(false); }, 22, 23);
|
|
26988
27235
|
var type = parseTypeAnnotation();
|
|
26989
27236
|
parseTypeMemberSemicolon();
|
|
26990
|
-
var node = factory.createIndexSignature(
|
|
27237
|
+
var node = factory.createIndexSignature(modifiers, parameters, type);
|
|
27238
|
+
node.decorators = decorators;
|
|
26991
27239
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
26992
27240
|
}
|
|
26993
27241
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -27711,7 +27959,7 @@ var ts;
|
|
|
27711
27959
|
}
|
|
27712
27960
|
function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
|
|
27713
27961
|
ts.Debug.assert(token() === 38, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
27714
|
-
var parameter = factory.createParameterDeclaration(undefined, undefined,
|
|
27962
|
+
var parameter = factory.createParameterDeclaration(undefined, undefined, identifier, undefined, undefined, undefined);
|
|
27715
27963
|
finishNode(parameter, identifier.pos);
|
|
27716
27964
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
27717
27965
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
@@ -28539,8 +28787,13 @@ var ts;
|
|
|
28539
28787
|
case 14:
|
|
28540
28788
|
case 15:
|
|
28541
28789
|
return true;
|
|
28790
|
+
case 29:
|
|
28791
|
+
case 31:
|
|
28792
|
+
case 39:
|
|
28793
|
+
case 40:
|
|
28794
|
+
return false;
|
|
28542
28795
|
}
|
|
28543
|
-
return !isStartOfExpression();
|
|
28796
|
+
return scanner.hasPrecedingLineBreak() || isBinaryOperator() || !isStartOfExpression();
|
|
28544
28797
|
}
|
|
28545
28798
|
function parsePrimaryExpression() {
|
|
28546
28799
|
switch (token()) {
|
|
@@ -29381,7 +29634,8 @@ var ts;
|
|
|
29381
29634
|
var type = parseReturnType(58, false);
|
|
29382
29635
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected);
|
|
29383
29636
|
setAwaitContext(savedAwaitContext);
|
|
29384
|
-
var node = factory.createFunctionDeclaration(
|
|
29637
|
+
var node = factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
29638
|
+
node.decorators = decorators;
|
|
29385
29639
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29386
29640
|
}
|
|
29387
29641
|
function parseConstructorName() {
|
|
@@ -29402,7 +29656,8 @@ var ts;
|
|
|
29402
29656
|
var parameters = parseParameters(0);
|
|
29403
29657
|
var type = parseReturnType(58, false);
|
|
29404
29658
|
var body = parseFunctionBlockOrSemicolon(0, ts.Diagnostics.or_expected);
|
|
29405
|
-
var node = factory.createConstructorDeclaration(
|
|
29659
|
+
var node = factory.createConstructorDeclaration(modifiers, parameters, body);
|
|
29660
|
+
node.decorators = decorators;
|
|
29406
29661
|
node.typeParameters = typeParameters;
|
|
29407
29662
|
node.type = type;
|
|
29408
29663
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
@@ -29416,7 +29671,7 @@ var ts;
|
|
|
29416
29671
|
var parameters = parseParameters(isGenerator | isAsync);
|
|
29417
29672
|
var type = parseReturnType(58, false);
|
|
29418
29673
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage);
|
|
29419
|
-
var node = factory.createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body);
|
|
29674
|
+
var node = factory.createMethodDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), asteriskToken, name, questionToken, typeParameters, parameters, type, body);
|
|
29420
29675
|
node.exclamationToken = exclamationToken;
|
|
29421
29676
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29422
29677
|
}
|
|
@@ -29425,7 +29680,7 @@ var ts;
|
|
|
29425
29680
|
var type = parseTypeAnnotation();
|
|
29426
29681
|
var initializer = doOutsideOfContext(8192 | 32768 | 4096, parseInitializer);
|
|
29427
29682
|
parseSemicolonAfterPropertyName(name, type, initializer);
|
|
29428
|
-
var node = factory.createPropertyDeclaration(decorators, modifiers, name, questionToken || exclamationToken, type, initializer);
|
|
29683
|
+
var node = factory.createPropertyDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, questionToken || exclamationToken, type, initializer);
|
|
29429
29684
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29430
29685
|
}
|
|
29431
29686
|
function parsePropertyOrMethodDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29444,10 +29699,10 @@ var ts;
|
|
|
29444
29699
|
var type = parseReturnType(58, false);
|
|
29445
29700
|
var body = parseFunctionBlockOrSemicolon(0);
|
|
29446
29701
|
var node = kind === 172
|
|
29447
|
-
? factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body)
|
|
29448
|
-
: factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body);
|
|
29702
|
+
? factory.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body)
|
|
29703
|
+
: factory.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body);
|
|
29449
29704
|
node.typeParameters = typeParameters;
|
|
29450
|
-
if (
|
|
29705
|
+
if (ts.isSetAccessorDeclaration(node))
|
|
29451
29706
|
node.type = type;
|
|
29452
29707
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29453
29708
|
}
|
|
@@ -29494,7 +29749,10 @@ var ts;
|
|
|
29494
29749
|
function parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
29495
29750
|
parseExpectedToken(124);
|
|
29496
29751
|
var body = parseClassStaticBlockBody();
|
|
29497
|
-
|
|
29752
|
+
var node = withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
29753
|
+
node.decorators = decorators;
|
|
29754
|
+
node.modifiers = modifiers;
|
|
29755
|
+
return node;
|
|
29498
29756
|
}
|
|
29499
29757
|
function parseClassStaticBlockBody() {
|
|
29500
29758
|
var savedYieldContext = inYieldContext();
|
|
@@ -29553,6 +29811,15 @@ var ts;
|
|
|
29553
29811
|
}
|
|
29554
29812
|
return finishNode(factory.createToken(kind), pos);
|
|
29555
29813
|
}
|
|
29814
|
+
function combineDecoratorsAndModifiers(decorators, modifiers) {
|
|
29815
|
+
if (!decorators)
|
|
29816
|
+
return modifiers;
|
|
29817
|
+
if (!modifiers)
|
|
29818
|
+
return decorators;
|
|
29819
|
+
var decoratorsAndModifiers = factory.createNodeArray(ts.concatenate(decorators, modifiers));
|
|
29820
|
+
ts.setTextRangePosEnd(decoratorsAndModifiers, decorators.pos, modifiers.end);
|
|
29821
|
+
return decoratorsAndModifiers;
|
|
29822
|
+
}
|
|
29556
29823
|
function parseModifiers(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
29557
29824
|
var pos = getNodePos();
|
|
29558
29825
|
var list, modifier, hasSeenStatic = false;
|
|
@@ -29647,8 +29914,8 @@ var ts;
|
|
|
29647
29914
|
}
|
|
29648
29915
|
setAwaitContext(savedAwaitContext);
|
|
29649
29916
|
var node = kind === 257
|
|
29650
|
-
? factory.createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members)
|
|
29651
|
-
: factory.createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members);
|
|
29917
|
+
? factory.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members)
|
|
29918
|
+
: factory.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members);
|
|
29652
29919
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29653
29920
|
}
|
|
29654
29921
|
function parseNameOfClassDeclarationOrExpression() {
|
|
@@ -29698,7 +29965,8 @@ var ts;
|
|
|
29698
29965
|
var typeParameters = parseTypeParameters();
|
|
29699
29966
|
var heritageClauses = parseHeritageClauses();
|
|
29700
29967
|
var members = parseObjectTypeMembers();
|
|
29701
|
-
var node = factory.createInterfaceDeclaration(
|
|
29968
|
+
var node = factory.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
29969
|
+
node.decorators = decorators;
|
|
29702
29970
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29703
29971
|
}
|
|
29704
29972
|
function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29708,7 +29976,8 @@ var ts;
|
|
|
29708
29976
|
parseExpected(63);
|
|
29709
29977
|
var type = token() === 138 && tryParse(parseKeywordAndNoDot) || parseType();
|
|
29710
29978
|
parseSemicolon();
|
|
29711
|
-
var node = factory.createTypeAliasDeclaration(
|
|
29979
|
+
var node = factory.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
29980
|
+
node.decorators = decorators;
|
|
29712
29981
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29713
29982
|
}
|
|
29714
29983
|
function parseEnumMember() {
|
|
@@ -29729,7 +29998,8 @@ var ts;
|
|
|
29729
29998
|
else {
|
|
29730
29999
|
members = createMissingList();
|
|
29731
30000
|
}
|
|
29732
|
-
var node = factory.createEnumDeclaration(
|
|
30001
|
+
var node = factory.createEnumDeclaration(modifiers, name, members);
|
|
30002
|
+
node.decorators = decorators;
|
|
29733
30003
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29734
30004
|
}
|
|
29735
30005
|
function parseModuleBlock() {
|
|
@@ -29750,7 +30020,8 @@ var ts;
|
|
|
29750
30020
|
var body = parseOptional(24)
|
|
29751
30021
|
? parseModuleOrNamespaceDeclaration(getNodePos(), false, undefined, undefined, 4 | namespaceFlag)
|
|
29752
30022
|
: parseModuleBlock();
|
|
29753
|
-
var node = factory.createModuleDeclaration(
|
|
30023
|
+
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30024
|
+
node.decorators = decorators;
|
|
29754
30025
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29755
30026
|
}
|
|
29756
30027
|
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29771,7 +30042,8 @@ var ts;
|
|
|
29771
30042
|
else {
|
|
29772
30043
|
parseSemicolon();
|
|
29773
30044
|
}
|
|
29774
|
-
var node = factory.createModuleDeclaration(
|
|
30045
|
+
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30046
|
+
node.decorators = decorators;
|
|
29775
30047
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29776
30048
|
}
|
|
29777
30049
|
function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29843,7 +30115,8 @@ var ts;
|
|
|
29843
30115
|
assertClause = parseAssertClause();
|
|
29844
30116
|
}
|
|
29845
30117
|
parseSemicolon();
|
|
29846
|
-
var node = factory.createImportDeclaration(
|
|
30118
|
+
var node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
30119
|
+
node.decorators = decorators;
|
|
29847
30120
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29848
30121
|
}
|
|
29849
30122
|
function parseAssertEntry() {
|
|
@@ -29885,7 +30158,8 @@ var ts;
|
|
|
29885
30158
|
parseExpected(63);
|
|
29886
30159
|
var moduleReference = parseModuleReference();
|
|
29887
30160
|
parseSemicolon();
|
|
29888
|
-
var node = factory.createImportEqualsDeclaration(
|
|
30161
|
+
var node = factory.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
30162
|
+
node.decorators = decorators;
|
|
29889
30163
|
var finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29890
30164
|
return finished;
|
|
29891
30165
|
}
|
|
@@ -30031,7 +30305,8 @@ var ts;
|
|
|
30031
30305
|
}
|
|
30032
30306
|
parseSemicolon();
|
|
30033
30307
|
setAwaitContext(savedAwaitContext);
|
|
30034
|
-
var node = factory.createExportDeclaration(
|
|
30308
|
+
var node = factory.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
30309
|
+
node.decorators = decorators;
|
|
30035
30310
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30036
30311
|
}
|
|
30037
30312
|
function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30047,7 +30322,8 @@ var ts;
|
|
|
30047
30322
|
var expression = parseAssignmentExpressionOrHigher();
|
|
30048
30323
|
parseSemicolon();
|
|
30049
30324
|
setAwaitContext(savedAwaitContext);
|
|
30050
|
-
var node = factory.createExportAssignment(
|
|
30325
|
+
var node = factory.createExportAssignment(modifiers, isExportEquals, expression);
|
|
30326
|
+
node.decorators = decorators;
|
|
30051
30327
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30052
30328
|
}
|
|
30053
30329
|
var JSDocParser;
|
|
@@ -30756,7 +31032,7 @@ var ts;
|
|
|
30756
31032
|
var typeNameOrNamespaceName = parseJSDocIdentifierName();
|
|
30757
31033
|
if (parseOptional(24)) {
|
|
30758
31034
|
var body = parseJSDocTypeNameWithNamespace(true);
|
|
30759
|
-
var jsDocNamespaceNode = factory.createModuleDeclaration(undefined,
|
|
31035
|
+
var jsDocNamespaceNode = factory.createModuleDeclaration(undefined, typeNameOrNamespaceName, body, nested ? 4 : undefined);
|
|
30760
31036
|
return finishNode(jsDocNamespaceNode, pos);
|
|
30761
31037
|
}
|
|
30762
31038
|
if (nested) {
|
|
@@ -36744,7 +37020,7 @@ var ts;
|
|
|
36744
37020
|
case 317:
|
|
36745
37021
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
36746
37022
|
case 164:
|
|
36747
|
-
ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: " +
|
|
37023
|
+
ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: " + ts.Debug.formatSyntaxKind(node.parent.kind) + ", expected JSDocFunctionType"; });
|
|
36748
37024
|
var functionType = node.parent;
|
|
36749
37025
|
var index = functionType.parameters.indexOf(node);
|
|
36750
37026
|
return "arg" + index;
|
|
@@ -37779,8 +38055,6 @@ var ts;
|
|
|
37779
38055
|
}
|
|
37780
38056
|
function bindBindingElementFlow(node) {
|
|
37781
38057
|
if (ts.isBindingPattern(node.name)) {
|
|
37782
|
-
bindEach(node.decorators);
|
|
37783
|
-
bindEach(node.modifiers);
|
|
37784
38058
|
bind(node.dotDotDotToken);
|
|
37785
38059
|
bind(node.propertyName);
|
|
37786
38060
|
bind(node.initializer);
|
|
@@ -38651,7 +38925,7 @@ var ts;
|
|
|
38651
38925
|
}
|
|
38652
38926
|
}
|
|
38653
38927
|
function bindNamespaceExportDeclaration(node) {
|
|
38654
|
-
if (
|
|
38928
|
+
if (ts.some(node.modifiers)) {
|
|
38655
38929
|
file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
|
|
38656
38930
|
}
|
|
38657
38931
|
var diag = !ts.isSourceFile(node.parent) ? ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level
|
|
@@ -43683,7 +43957,7 @@ var ts;
|
|
|
43683
43957
|
var id = ids_1[_i];
|
|
43684
43958
|
qualifier = qualifier ? ts.factory.createQualifiedName(qualifier, id) : id;
|
|
43685
43959
|
}
|
|
43686
|
-
return ts.factory.updateImportTypeNode(root, root.argument, qualifier, typeArguments, root.isTypeOf);
|
|
43960
|
+
return ts.factory.updateImportTypeNode(root, root.argument, root.assertions, qualifier, typeArguments, root.isTypeOf);
|
|
43687
43961
|
}
|
|
43688
43962
|
else {
|
|
43689
43963
|
var typeArguments = root.typeArguments;
|
|
@@ -43914,7 +44188,7 @@ var ts;
|
|
|
43914
44188
|
function indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, typeNode) {
|
|
43915
44189
|
var name = ts.getNameFromIndexInfo(indexInfo) || "x";
|
|
43916
44190
|
var indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context);
|
|
43917
|
-
var indexingParameter = ts.factory.createParameterDeclaration(undefined, undefined,
|
|
44191
|
+
var indexingParameter = ts.factory.createParameterDeclaration(undefined, undefined, name, undefined, indexerTypeNode, undefined);
|
|
43918
44192
|
if (!typeNode) {
|
|
43919
44193
|
typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context);
|
|
43920
44194
|
}
|
|
@@ -43922,7 +44196,7 @@ var ts;
|
|
|
43922
44196
|
context.encounteredError = true;
|
|
43923
44197
|
}
|
|
43924
44198
|
context.approximateLength += (name.length + 4);
|
|
43925
|
-
return ts.factory.createIndexSignature(
|
|
44199
|
+
return ts.factory.createIndexSignature(indexInfo.isReadonly ? [ts.factory.createToken(145)] : undefined, [indexingParameter], typeNode);
|
|
43926
44200
|
}
|
|
43927
44201
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
43928
44202
|
var _a, _b, _c, _d;
|
|
@@ -43973,15 +44247,15 @@ var ts;
|
|
|
43973
44247
|
var node = kind === 174 ? ts.factory.createCallSignature(typeParameters, parameters, returnTypeNode) :
|
|
43974
44248
|
kind === 175 ? ts.factory.createConstructSignature(typeParameters, parameters, returnTypeNode) :
|
|
43975
44249
|
kind === 168 ? ts.factory.createMethodSignature(modifiers, (_a = options === null || options === void 0 ? void 0 : options.name) !== null && _a !== void 0 ? _a : ts.factory.createIdentifier(""), options === null || options === void 0 ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) :
|
|
43976
|
-
kind === 169 ? ts.factory.createMethodDeclaration(
|
|
43977
|
-
kind === 171 ? ts.factory.createConstructorDeclaration(
|
|
43978
|
-
kind === 172 ? ts.factory.createGetAccessorDeclaration(
|
|
43979
|
-
kind === 173 ? ts.factory.createSetAccessorDeclaration(
|
|
43980
|
-
kind === 176 ? ts.factory.createIndexSignature(
|
|
44250
|
+
kind === 169 ? ts.factory.createMethodDeclaration(modifiers, undefined, (_b = options === null || options === void 0 ? void 0 : options.name) !== null && _b !== void 0 ? _b : ts.factory.createIdentifier(""), undefined, typeParameters, parameters, returnTypeNode, undefined) :
|
|
44251
|
+
kind === 171 ? ts.factory.createConstructorDeclaration(modifiers, parameters, undefined) :
|
|
44252
|
+
kind === 172 ? ts.factory.createGetAccessorDeclaration(modifiers, (_c = options === null || options === void 0 ? void 0 : options.name) !== null && _c !== void 0 ? _c : ts.factory.createIdentifier(""), parameters, returnTypeNode, undefined) :
|
|
44253
|
+
kind === 173 ? ts.factory.createSetAccessorDeclaration(modifiers, (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : ts.factory.createIdentifier(""), parameters, undefined) :
|
|
44254
|
+
kind === 176 ? ts.factory.createIndexSignature(modifiers, parameters, returnTypeNode) :
|
|
43981
44255
|
kind === 317 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
|
|
43982
44256
|
kind === 179 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
43983
44257
|
kind === 180 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
43984
|
-
kind === 256 ? ts.factory.createFunctionDeclaration(
|
|
44258
|
+
kind === 256 ? ts.factory.createFunctionDeclaration(modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, undefined) :
|
|
43985
44259
|
kind === 213 ? ts.factory.createFunctionExpression(modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, ts.factory.createBlock([])) :
|
|
43986
44260
|
kind === 214 ? ts.factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, undefined, ts.factory.createBlock([])) :
|
|
43987
44261
|
ts.Debug.assertNever(kind);
|
|
@@ -43997,7 +44271,7 @@ var ts;
|
|
|
43997
44271
|
if (signature.declaration) {
|
|
43998
44272
|
var thisTag = ts.getJSDocThisTag(signature.declaration);
|
|
43999
44273
|
if (thisTag && thisTag.typeExpression) {
|
|
44000
|
-
return ts.factory.createParameterDeclaration(undefined, undefined,
|
|
44274
|
+
return ts.factory.createParameterDeclaration(undefined, undefined, "this", undefined, typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context));
|
|
44001
44275
|
}
|
|
44002
44276
|
}
|
|
44003
44277
|
}
|
|
@@ -44026,7 +44300,7 @@ var ts;
|
|
|
44026
44300
|
parameterType = getOptionalType(parameterType);
|
|
44027
44301
|
}
|
|
44028
44302
|
var parameterTypeNode = serializeTypeForDeclaration(context, parameterType, parameterSymbol, context.enclosingDeclaration, privateSymbolVisitor, bundledImports);
|
|
44029
|
-
var modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && parameterDeclaration
|
|
44303
|
+
var modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && ts.canHaveModifiers(parameterDeclaration) ? ts.map(ts.getModifiers(parameterDeclaration), ts.factory.cloneNode) : undefined;
|
|
44030
44304
|
var isRest = parameterDeclaration && ts.isRestParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 32768;
|
|
44031
44305
|
var dotDotDotToken = isRest ? ts.factory.createToken(25) : undefined;
|
|
44032
44306
|
var name = parameterDeclaration ? parameterDeclaration.name ?
|
|
@@ -44037,7 +44311,7 @@ var ts;
|
|
|
44037
44311
|
ts.symbolName(parameterSymbol);
|
|
44038
44312
|
var isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 16384;
|
|
44039
44313
|
var questionToken = isOptional ? ts.factory.createToken(57) : undefined;
|
|
44040
|
-
var parameterNode = ts.factory.createParameterDeclaration(
|
|
44314
|
+
var parameterNode = ts.factory.createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, parameterTypeNode, undefined);
|
|
44041
44315
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
44042
44316
|
return parameterNode;
|
|
44043
44317
|
function cloneBindingName(node) {
|
|
@@ -44645,15 +44919,15 @@ var ts;
|
|
|
44645
44919
|
return ts.setOriginalNode(ts.factory.createKeywordTypeNode(130), node);
|
|
44646
44920
|
}
|
|
44647
44921
|
if ((ts.isExpressionWithTypeArguments(node) || ts.isTypeReferenceNode(node)) && ts.isJSDocIndexSignature(node)) {
|
|
44648
|
-
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined,
|
|
44922
|
+
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, "x", undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols))], ts.visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols))]);
|
|
44649
44923
|
}
|
|
44650
44924
|
if (ts.isJSDocFunctionType(node)) {
|
|
44651
44925
|
if (ts.isJSDocConstructSignature(node)) {
|
|
44652
44926
|
var newTypeNode_1;
|
|
44653
|
-
return ts.factory.createConstructorTypeNode(
|
|
44927
|
+
return ts.factory.createConstructorTypeNode(undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.mapDefined(node.parameters, function (p, i) { return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode_1 = p.type, undefined) : ts.factory.createParameterDeclaration(undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130));
|
|
44654
44928
|
}
|
|
44655
44929
|
else {
|
|
44656
|
-
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined,
|
|
44930
|
+
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130));
|
|
44657
44931
|
}
|
|
44658
44932
|
}
|
|
44659
44933
|
if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(node, 788968, true))) {
|
|
@@ -44667,7 +44941,7 @@ var ts;
|
|
|
44667
44941
|
!(ts.length(node.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))))) {
|
|
44668
44942
|
return ts.setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node);
|
|
44669
44943
|
}
|
|
44670
|
-
return ts.factory.updateImportTypeNode(node, ts.factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf);
|
|
44944
|
+
return ts.factory.updateImportTypeNode(node, ts.factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), node.assertions, node.qualifier, ts.visitNodes(node.typeArguments, visitExistingNodeTreeSymbols, ts.isTypeNode), node.isTypeOf);
|
|
44671
44945
|
}
|
|
44672
44946
|
if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) {
|
|
44673
44947
|
var _a = trackExistingEntityName(node, context, includePrivateSymbol), introducesError = _a.introducesError, result = _a.node;
|
|
@@ -44718,7 +44992,7 @@ var ts;
|
|
|
44718
44992
|
}
|
|
44719
44993
|
function symbolTableToDeclarationStatements(symbolTable, context, bundled) {
|
|
44720
44994
|
var serializePropertySymbolForClass = makeSerializePropertySymbol(ts.factory.createPropertyDeclaration, 169, true);
|
|
44721
|
-
var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (
|
|
44995
|
+
var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (mods, name, question, type) { return ts.factory.createPropertySignature(mods, name, question, type); }, 168, false);
|
|
44722
44996
|
var enclosingDeclaration = context.enclosingDeclaration;
|
|
44723
44997
|
var results = [];
|
|
44724
44998
|
var visitedSymbols = new ts.Set();
|
|
@@ -44770,7 +45044,7 @@ var ts;
|
|
|
44770
45044
|
var name_3 = ns.name;
|
|
44771
45045
|
var body = ns.body;
|
|
44772
45046
|
if (ts.length(excessExports)) {
|
|
44773
|
-
ns = ts.factory.updateModuleDeclaration(ns, ns.
|
|
45047
|
+
ns = ts.factory.updateModuleDeclaration(ns, ns.modifiers, ns.name, body = ts.factory.updateModuleBlock(body, ts.factory.createNodeArray(__spreadArray(__spreadArray([], ns.body.statements, true), [ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports(ts.map(ts.flatMap(excessExports, function (e) { return getNamesOfDeclaration(e); }), function (id) { return ts.factory.createExportSpecifier(false, undefined, id); })), undefined)], false))));
|
|
44774
45048
|
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, nsIndex), true), [ns], false), statements.slice(nsIndex + 1), true);
|
|
44775
45049
|
}
|
|
44776
45050
|
if (!ts.find(statements, function (s) { return s !== ns && ts.nodeHasName(s, name_3); })) {
|
|
@@ -44788,7 +45062,7 @@ var ts;
|
|
|
44788
45062
|
var exports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
|
|
44789
45063
|
if (ts.length(exports) > 1) {
|
|
44790
45064
|
var nonExports = ts.filter(statements, function (d) { return !ts.isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause; });
|
|
44791
|
-
statements = __spreadArray(__spreadArray([], nonExports, true), [ts.factory.createExportDeclaration(undefined,
|
|
45065
|
+
statements = __spreadArray(__spreadArray([], nonExports, true), [ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports(ts.flatMap(exports, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), undefined)], false);
|
|
44792
45066
|
}
|
|
44793
45067
|
var reexports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
|
|
44794
45068
|
if (ts.length(reexports) > 1) {
|
|
@@ -44797,7 +45071,7 @@ var ts;
|
|
|
44797
45071
|
var _loop_9 = function (group_1) {
|
|
44798
45072
|
if (group_1.length > 1) {
|
|
44799
45073
|
statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return group_1.indexOf(s) === -1; }), true), [
|
|
44800
|
-
ts.factory.createExportDeclaration(undefined,
|
|
45074
|
+
ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports(ts.flatMap(group_1, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), group_1[0].moduleSpecifier)
|
|
44801
45075
|
], false);
|
|
44802
45076
|
}
|
|
44803
45077
|
};
|
|
@@ -44831,7 +45105,7 @@ var ts;
|
|
|
44831
45105
|
ts.orderedRemoveItemAt(statements, index);
|
|
44832
45106
|
}
|
|
44833
45107
|
else {
|
|
44834
|
-
statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.
|
|
45108
|
+
statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.modifiers, exportDecl.isTypeOnly, ts.factory.updateNamedExports(exportDecl.exportClause, replacements), exportDecl.moduleSpecifier, exportDecl.assertClause);
|
|
44835
45109
|
}
|
|
44836
45110
|
}
|
|
44837
45111
|
return statements;
|
|
@@ -44956,7 +45230,7 @@ var ts;
|
|
|
44956
45230
|
if (propertyAccessRequire && ts.isBinaryExpression(propertyAccessRequire.parent) && ts.isIdentifier(propertyAccessRequire.parent.right)
|
|
44957
45231
|
&& ((_d = type.symbol) === null || _d === void 0 ? void 0 : _d.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
|
|
44958
45232
|
var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
|
|
44959
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45233
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, alias, localName)])), 0);
|
|
44960
45234
|
context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551);
|
|
44961
45235
|
}
|
|
44962
45236
|
else {
|
|
@@ -44965,7 +45239,7 @@ var ts;
|
|
|
44965
45239
|
], flags)), textRange);
|
|
44966
45240
|
addResult(statement, name !== localName ? modifierFlags & ~1 : modifierFlags);
|
|
44967
45241
|
if (name !== localName && !isPrivate) {
|
|
44968
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45242
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, name, localName)])), 0);
|
|
44969
45243
|
needsExportDeclaration = false;
|
|
44970
45244
|
needsPostExportDefault = false;
|
|
44971
45245
|
}
|
|
@@ -45006,15 +45280,15 @@ var ts;
|
|
|
45006
45280
|
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
|
|
45007
45281
|
if (!resolvedModule)
|
|
45008
45282
|
continue;
|
|
45009
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45283
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, undefined, ts.factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))), 0);
|
|
45010
45284
|
}
|
|
45011
45285
|
}
|
|
45012
45286
|
}
|
|
45013
45287
|
if (needsPostExportDefault) {
|
|
45014
|
-
addResult(ts.factory.createExportAssignment(undefined,
|
|
45288
|
+
addResult(ts.factory.createExportAssignment(undefined, false, ts.factory.createIdentifier(getInternalSymbolName(symbol, symbolName))), 0);
|
|
45015
45289
|
}
|
|
45016
45290
|
else if (needsExportDeclaration) {
|
|
45017
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45291
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, getInternalSymbolName(symbol, symbolName), symbolName)])), 0);
|
|
45018
45292
|
}
|
|
45019
45293
|
}
|
|
45020
45294
|
function includePrivateSymbol(symbol) {
|
|
@@ -45072,7 +45346,7 @@ var ts;
|
|
|
45072
45346
|
&& ts.isJSDocTypeExpression(jsdocAliasDecl.typeExpression)
|
|
45073
45347
|
&& serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled)
|
|
45074
45348
|
|| typeToTypeNodeHelper(aliasType, context);
|
|
45075
|
-
addResult(ts.setSyntheticLeadingComments(ts.factory.createTypeAliasDeclaration(undefined,
|
|
45349
|
+
addResult(ts.setSyntheticLeadingComments(ts.factory.createTypeAliasDeclaration(undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, typeNode), !commentText ? [] : [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]), modifierFlags);
|
|
45076
45350
|
context.flags = oldFlags;
|
|
45077
45351
|
context.enclosingDeclaration = oldEnclosingDecl;
|
|
45078
45352
|
}
|
|
@@ -45087,7 +45361,7 @@ var ts;
|
|
|
45087
45361
|
var constructSignatures = serializeSignatures(1, interfaceType, baseType, 175);
|
|
45088
45362
|
var indexSignatures = serializeIndexSignatures(interfaceType, baseType);
|
|
45089
45363
|
var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.factory.createHeritageClause(94, ts.mapDefined(baseTypes, function (b) { return trySerializeAsTypeReference(b, 111551); }))];
|
|
45090
|
-
addResult(ts.factory.createInterfaceDeclaration(undefined,
|
|
45364
|
+
addResult(ts.factory.createInterfaceDeclaration(undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), constructSignatures, true), callSignatures, true), members, true)), modifierFlags);
|
|
45091
45365
|
}
|
|
45092
45366
|
function getNamespaceMembersForSerialization(symbol) {
|
|
45093
45367
|
return !symbol.exports ? [] : ts.filter(ts.arrayFrom(symbol.exports.values()), isNamespaceMember);
|
|
@@ -45107,7 +45381,7 @@ var ts;
|
|
|
45107
45381
|
if (ts.length(mergedMembers)) {
|
|
45108
45382
|
var containingFile_1 = ts.getSourceFileOfNode(context.enclosingDeclaration);
|
|
45109
45383
|
var localName = getInternalSymbolName(symbol, symbolName);
|
|
45110
|
-
var nsBody = ts.factory.createModuleBlock([ts.factory.createExportDeclaration(undefined,
|
|
45384
|
+
var nsBody = ts.factory.createModuleBlock([ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports(ts.mapDefined(ts.filter(mergedMembers, function (n) { return n.escapedName !== "export="; }), function (s) {
|
|
45111
45385
|
var _a, _b;
|
|
45112
45386
|
var name = ts.unescapeLeadingUnderscores(s.escapedName);
|
|
45113
45387
|
var localName = getInternalSymbolName(s, name);
|
|
@@ -45121,11 +45395,11 @@ var ts;
|
|
|
45121
45395
|
var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName;
|
|
45122
45396
|
return ts.factory.createExportSpecifier(false, name === targetName ? undefined : targetName, name);
|
|
45123
45397
|
})))]);
|
|
45124
|
-
addResult(ts.factory.createModuleDeclaration(undefined,
|
|
45398
|
+
addResult(ts.factory.createModuleDeclaration(undefined, ts.factory.createIdentifier(localName), nsBody, 16), 0);
|
|
45125
45399
|
}
|
|
45126
45400
|
}
|
|
45127
45401
|
function serializeEnum(symbol, symbolName, modifierFlags) {
|
|
45128
|
-
addResult(ts.factory.createEnumDeclaration(
|
|
45402
|
+
addResult(ts.factory.createEnumDeclaration(ts.factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 : 0), getInternalSymbolName(symbol, symbolName), ts.map(ts.filter(getPropertiesOfType(getTypeOfSymbol(symbol)), function (p) { return !!(p.flags & 8); }), function (p) {
|
|
45129
45403
|
var initializedValue = p.declarations && p.declarations[0] && ts.isEnumMember(p.declarations[0]) ? getConstantValue(p.declarations[0]) : undefined;
|
|
45130
45404
|
return ts.factory.createEnumMember(ts.unescapeLeadingUnderscores(p.escapedName), initializedValue === undefined ? undefined :
|
|
45131
45405
|
typeof initializedValue === "string" ? ts.factory.createStringLiteral(initializedValue) :
|
|
@@ -45163,7 +45437,7 @@ var ts;
|
|
|
45163
45437
|
}) ? "local" : "remote";
|
|
45164
45438
|
});
|
|
45165
45439
|
var localProps = localVsRemoteMap.get("local") || ts.emptyArray;
|
|
45166
|
-
var fakespace = ts.parseNodeFactory.createModuleDeclaration(undefined,
|
|
45440
|
+
var fakespace = ts.parseNodeFactory.createModuleDeclaration(undefined, ts.factory.createIdentifier(localName), ts.factory.createModuleBlock([]), 16);
|
|
45167
45441
|
ts.setParent(fakespace, enclosingDeclaration);
|
|
45168
45442
|
fakespace.locals = ts.createSymbolTable(props);
|
|
45169
45443
|
fakespace.symbol = props[0].parent;
|
|
@@ -45179,9 +45453,9 @@ var ts;
|
|
|
45179
45453
|
addingDeclare = oldAddingDeclare;
|
|
45180
45454
|
var declarations = results;
|
|
45181
45455
|
results = oldResults;
|
|
45182
|
-
var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(undefined,
|
|
45456
|
+
var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, d.expression, ts.factory.createIdentifier("default"))])) : d; });
|
|
45183
45457
|
var exportModifierStripped = ts.every(defaultReplaced, function (d) { return ts.hasSyntacticModifier(d, 1); }) ? ts.map(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
45184
|
-
fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.
|
|
45458
|
+
fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.modifiers, fakespace.name, ts.factory.createModuleBlock(exportModifierStripped));
|
|
45185
45459
|
addResult(fakespace, modifierFlags);
|
|
45186
45460
|
}
|
|
45187
45461
|
}
|
|
@@ -45247,7 +45521,7 @@ var ts;
|
|
|
45247
45521
|
return !!valueDecl && ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name);
|
|
45248
45522
|
});
|
|
45249
45523
|
var privateProperties = hasPrivateIdentifier ?
|
|
45250
|
-
[ts.factory.createPropertyDeclaration(undefined,
|
|
45524
|
+
[ts.factory.createPropertyDeclaration(undefined, ts.factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)] :
|
|
45251
45525
|
ts.emptyArray;
|
|
45252
45526
|
var publicProperties = ts.flatMap(publicSymbolProps, function (p) { return serializePropertySymbolForClass(p, false, baseTypes[0]); });
|
|
45253
45527
|
var staticMembers = ts.flatMap(ts.filter(getPropertiesOfType(staticType), function (p) { return !(p.flags & 4194304) && p.escapedName !== "prototype" && !isNamespaceMember(p); }), function (p) { return serializePropertySymbolForClass(p, true, staticBaseType); });
|
|
@@ -45256,11 +45530,11 @@ var ts;
|
|
|
45256
45530
|
ts.isInJSFile(symbol.valueDeclaration) &&
|
|
45257
45531
|
!ts.some(getSignaturesOfType(staticType, 1));
|
|
45258
45532
|
var constructors = isNonConstructableClassLikeInJsFile ?
|
|
45259
|
-
[ts.factory.createConstructorDeclaration(
|
|
45533
|
+
[ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(8), [], undefined)] :
|
|
45260
45534
|
serializeSignatures(1, staticType, staticBaseType, 171);
|
|
45261
45535
|
var indexSignatures = serializeIndexSignatures(classType, baseTypes[0]);
|
|
45262
45536
|
context.enclosingDeclaration = oldEnclosing;
|
|
45263
|
-
addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined,
|
|
45537
|
+
addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined, localName, typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), staticMembers, true), constructors, true), publicProperties, true), privateProperties, true)), symbol.declarations && ts.filter(symbol.declarations, function (d) { return ts.isClassDeclaration(d) || ts.isClassExpression(d); })[0]), modifierFlags);
|
|
45264
45538
|
}
|
|
45265
45539
|
function getSomeTargetNameFromDeclarations(declarations) {
|
|
45266
45540
|
return ts.firstDefined(declarations, function (d) {
|
|
@@ -45302,7 +45576,7 @@ var ts;
|
|
|
45302
45576
|
if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.kind) === 254) {
|
|
45303
45577
|
var specifier_1 = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
45304
45578
|
var propertyName = node.propertyName;
|
|
45305
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45579
|
+
addResult(ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([ts.factory.createImportSpecifier(false, propertyName && ts.isIdentifier(propertyName) ? ts.factory.createIdentifier(ts.idText(propertyName)) : undefined, ts.factory.createIdentifier(localName))])), ts.factory.createStringLiteral(specifier_1), undefined), 0);
|
|
45306
45580
|
break;
|
|
45307
45581
|
}
|
|
45308
45582
|
ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
|
|
@@ -45317,8 +45591,8 @@ var ts;
|
|
|
45317
45591
|
var initializer = node.initializer;
|
|
45318
45592
|
var uniqueName = ts.factory.createUniqueName(localName);
|
|
45319
45593
|
var specifier_2 = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
45320
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45321
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45594
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, uniqueName, ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(specifier_2))), 0);
|
|
45595
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(localName), ts.factory.createQualifiedName(uniqueName, initializer.name)), modifierFlags);
|
|
45322
45596
|
break;
|
|
45323
45597
|
}
|
|
45324
45598
|
case 265:
|
|
@@ -45327,7 +45601,7 @@ var ts;
|
|
|
45327
45601
|
break;
|
|
45328
45602
|
}
|
|
45329
45603
|
var isLocalImport = !(target.flags & 512) && !ts.isVariableDeclaration(node);
|
|
45330
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45604
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(localName), isLocalImport
|
|
45331
45605
|
? symbolToName(target, context, 67108863, false)
|
|
45332
45606
|
: ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)))), isLocalImport ? modifierFlags : 0);
|
|
45333
45607
|
break;
|
|
@@ -45335,16 +45609,16 @@ var ts;
|
|
|
45335
45609
|
addResult(ts.factory.createNamespaceExportDeclaration(ts.idText(node.name)), 0);
|
|
45336
45610
|
break;
|
|
45337
45611
|
case 267:
|
|
45338
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45612
|
+
addResult(ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, ts.factory.createIdentifier(localName), undefined), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)), undefined), 0);
|
|
45339
45613
|
break;
|
|
45340
45614
|
case 268:
|
|
45341
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45615
|
+
addResult(ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(localName))), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)), undefined), 0);
|
|
45342
45616
|
break;
|
|
45343
45617
|
case 274:
|
|
45344
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45618
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamespaceExport(ts.factory.createIdentifier(localName)), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))), 0);
|
|
45345
45619
|
break;
|
|
45346
45620
|
case 270:
|
|
45347
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45621
|
+
addResult(ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([
|
|
45348
45622
|
ts.factory.createImportSpecifier(false, localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
|
|
45349
45623
|
])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)), undefined), 0);
|
|
45350
45624
|
break;
|
|
@@ -45370,7 +45644,7 @@ var ts;
|
|
|
45370
45644
|
}
|
|
45371
45645
|
}
|
|
45372
45646
|
function serializeExportSpecifier(localName, targetName, specifier) {
|
|
45373
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45647
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, localName !== targetName ? targetName : undefined, localName)]), specifier), 0);
|
|
45374
45648
|
}
|
|
45375
45649
|
function serializeMaybeAliasAssignment(symbol) {
|
|
45376
45650
|
if (symbol.flags & 4194304) {
|
|
@@ -45392,7 +45666,7 @@ var ts;
|
|
|
45392
45666
|
var oldTrack = context.tracker.trackSymbol;
|
|
45393
45667
|
context.tracker.trackSymbol = function () { return false; };
|
|
45394
45668
|
if (isExportAssignmentCompatibleSymbolName) {
|
|
45395
|
-
results.push(ts.factory.createExportAssignment(undefined,
|
|
45669
|
+
results.push(ts.factory.createExportAssignment(undefined, isExportEquals, symbolToExpression(target, context, 67108863)));
|
|
45396
45670
|
}
|
|
45397
45671
|
else {
|
|
45398
45672
|
if (first_1 === expr && first_1) {
|
|
@@ -45403,7 +45677,7 @@ var ts;
|
|
|
45403
45677
|
}
|
|
45404
45678
|
else {
|
|
45405
45679
|
var varName = getUnusedName(name, symbol);
|
|
45406
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45680
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(varName), symbolToName(target, context, 67108863, false)), 0);
|
|
45407
45681
|
serializeExportSpecifier(name, varName);
|
|
45408
45682
|
}
|
|
45409
45683
|
}
|
|
@@ -45425,7 +45699,7 @@ var ts;
|
|
|
45425
45699
|
: 0);
|
|
45426
45700
|
}
|
|
45427
45701
|
if (isExportAssignmentCompatibleSymbolName) {
|
|
45428
|
-
results.push(ts.factory.createExportAssignment(undefined,
|
|
45702
|
+
results.push(ts.factory.createExportAssignment(undefined, isExportEquals, ts.factory.createIdentifier(varName)));
|
|
45429
45703
|
return true;
|
|
45430
45704
|
}
|
|
45431
45705
|
else if (name !== varName) {
|
|
@@ -45469,22 +45743,22 @@ var ts;
|
|
|
45469
45743
|
if (p.flags & 98304 && useAccessors) {
|
|
45470
45744
|
var result = [];
|
|
45471
45745
|
if (p.flags & 65536) {
|
|
45472
|
-
result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(
|
|
45746
|
+
result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(ts.factory.createModifiersFromModifierFlags(flag), name, [ts.factory.createParameterDeclaration(undefined, undefined, "arg", undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled))], undefined), ((_b = p.declarations) === null || _b === void 0 ? void 0 : _b.find(ts.isSetAccessor)) || firstPropertyLikeDecl));
|
|
45473
45747
|
}
|
|
45474
45748
|
if (p.flags & 32768) {
|
|
45475
45749
|
var isPrivate_1 = modifierFlags & 8;
|
|
45476
|
-
result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(
|
|
45750
|
+
result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(ts.factory.createModifiersFromModifierFlags(flag), name, [], isPrivate_1 ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ((_c = p.declarations) === null || _c === void 0 ? void 0 : _c.find(ts.isGetAccessor)) || firstPropertyLikeDecl));
|
|
45477
45751
|
}
|
|
45478
45752
|
return result;
|
|
45479
45753
|
}
|
|
45480
45754
|
else if (p.flags & (4 | 3 | 98304)) {
|
|
45481
|
-
return ts.setTextRange(createProperty(
|
|
45755
|
+
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ((_d = p.declarations) === null || _d === void 0 ? void 0 : _d.find(ts.or(ts.isPropertyDeclaration, ts.isVariableDeclaration))) || firstPropertyLikeDecl);
|
|
45482
45756
|
}
|
|
45483
45757
|
if (p.flags & (8192 | 16)) {
|
|
45484
45758
|
var type = getTypeOfSymbol(p);
|
|
45485
45759
|
var signatures = getSignaturesOfType(type, 0);
|
|
45486
45760
|
if (flag & 8) {
|
|
45487
|
-
return ts.setTextRange(createProperty(
|
|
45761
|
+
return ts.setTextRange(createProperty(ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, undefined, undefined), ((_e = p.declarations) === null || _e === void 0 ? void 0 : _e.find(ts.isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]);
|
|
45488
45762
|
}
|
|
45489
45763
|
var results_1 = [];
|
|
45490
45764
|
for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
|
|
@@ -45537,7 +45811,7 @@ var ts;
|
|
|
45537
45811
|
}
|
|
45538
45812
|
}
|
|
45539
45813
|
if (privateProtected) {
|
|
45540
|
-
return [ts.setTextRange(ts.factory.createConstructorDeclaration(
|
|
45814
|
+
return [ts.setTextRange(ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(privateProtected), [], undefined), signatures[0].declaration)];
|
|
45541
45815
|
}
|
|
45542
45816
|
}
|
|
45543
45817
|
var results = [];
|
|
@@ -60177,7 +60451,7 @@ var ts;
|
|
|
60177
60451
|
}
|
|
60178
60452
|
function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) {
|
|
60179
60453
|
if (ts.isPropertyDeclaration(container) && ts.hasStaticModifier(container) &&
|
|
60180
|
-
container.initializer && ts.textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && ts.
|
|
60454
|
+
container.initializer && ts.textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && ts.hasDecorators(container.parent)) {
|
|
60181
60455
|
error(thisExpression, ts.Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class);
|
|
60182
60456
|
}
|
|
60183
60457
|
}
|
|
@@ -60765,7 +61039,7 @@ var ts;
|
|
|
60765
61039
|
if (decl && (ts.isPropertyDeclaration(decl) || ts.isPropertySignature(decl))) {
|
|
60766
61040
|
var overallAnnotation = ts.getEffectiveTypeAnnotationNode(decl);
|
|
60767
61041
|
return (overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper)) ||
|
|
60768
|
-
(decl.initializer && getTypeOfExpression(binaryExpression.left));
|
|
61042
|
+
(ts.isPropertyDeclaration(decl) ? decl.initializer && getTypeOfExpression(binaryExpression.left) : undefined);
|
|
60769
61043
|
}
|
|
60770
61044
|
if (kind === 0) {
|
|
60771
61045
|
return getTypeOfExpression(binaryExpression.left);
|
|
@@ -62773,9 +63047,9 @@ var ts;
|
|
|
62773
63047
|
function getSuggestedSymbolForNonexistentProperty(name, containingType) {
|
|
62774
63048
|
var props = getPropertiesOfType(containingType);
|
|
62775
63049
|
if (typeof name !== "string") {
|
|
62776
|
-
var
|
|
62777
|
-
if (ts.isPropertyAccessExpression(
|
|
62778
|
-
props = ts.filter(props, function (prop) { return isValidPropertyAccessForCompletions(
|
|
63050
|
+
var parent_3 = name.parent;
|
|
63051
|
+
if (ts.isPropertyAccessExpression(parent_3)) {
|
|
63052
|
+
props = ts.filter(props, function (prop) { return isValidPropertyAccessForCompletions(parent_3, containingType, prop); });
|
|
62779
63053
|
}
|
|
62780
63054
|
name = ts.idText(name);
|
|
62781
63055
|
}
|
|
@@ -64350,7 +64624,7 @@ var ts;
|
|
|
64350
64624
|
var exports = namespace && getExportsOfSymbol(namespace);
|
|
64351
64625
|
var typeSymbol = exports && getSymbol(exports, JsxNames.Element, 788968);
|
|
64352
64626
|
var returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968, node);
|
|
64353
|
-
var declaration = ts.factory.createFunctionTypeNode(undefined, [ts.factory.createParameterDeclaration(undefined, undefined,
|
|
64627
|
+
var declaration = ts.factory.createFunctionTypeNode(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, "props", undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.factory.createTypeReferenceNode(returnNode, undefined) : ts.factory.createKeywordTypeNode(130));
|
|
64354
64628
|
var parameterSymbol = createSymbol(1, "props");
|
|
64355
64629
|
parameterSymbol.type = result;
|
|
64356
64630
|
return createSignature(declaration, undefined, undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, undefined, 1, 0);
|
|
@@ -68611,16 +68885,16 @@ var ts;
|
|
|
68611
68885
|
return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
|
|
68612
68886
|
}
|
|
68613
68887
|
function checkDecorators(node) {
|
|
68614
|
-
if (!node.
|
|
68615
|
-
return;
|
|
68616
|
-
}
|
|
68617
|
-
if (!ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
68888
|
+
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node) || !node.modifiers || !ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
68618
68889
|
return;
|
|
68619
68890
|
}
|
|
68620
68891
|
if (!compilerOptions.experimentalDecorators) {
|
|
68621
68892
|
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning);
|
|
68622
68893
|
}
|
|
68623
|
-
var firstDecorator = node.
|
|
68894
|
+
var firstDecorator = ts.find(node.modifiers, ts.isDecorator);
|
|
68895
|
+
if (!firstDecorator) {
|
|
68896
|
+
return;
|
|
68897
|
+
}
|
|
68624
68898
|
checkExternalEmitHelpers(firstDecorator, 8);
|
|
68625
68899
|
if (node.kind === 164) {
|
|
68626
68900
|
checkExternalEmitHelpers(firstDecorator, 32);
|
|
@@ -68663,7 +68937,12 @@ var ts;
|
|
|
68663
68937
|
break;
|
|
68664
68938
|
}
|
|
68665
68939
|
}
|
|
68666
|
-
|
|
68940
|
+
for (var _f = 0, _g = node.modifiers; _f < _g.length; _f++) {
|
|
68941
|
+
var modifier = _g[_f];
|
|
68942
|
+
if (ts.isDecorator(modifier)) {
|
|
68943
|
+
checkDecorator(modifier);
|
|
68944
|
+
}
|
|
68945
|
+
}
|
|
68667
68946
|
}
|
|
68668
68947
|
function checkFunctionDeclaration(node) {
|
|
68669
68948
|
addLazyDiagnostic(checkFunctionDeclarationDiagnostics);
|
|
@@ -69295,7 +69574,7 @@ var ts;
|
|
|
69295
69574
|
}
|
|
69296
69575
|
if (node.name.kind === 162) {
|
|
69297
69576
|
checkComputedPropertyName(node.name);
|
|
69298
|
-
if (node.initializer) {
|
|
69577
|
+
if (ts.hasOnlyExpressionInitializer(node) && node.initializer) {
|
|
69299
69578
|
checkExpressionCached(node.initializer);
|
|
69300
69579
|
}
|
|
69301
69580
|
}
|
|
@@ -69328,12 +69607,12 @@ var ts;
|
|
|
69328
69607
|
}
|
|
69329
69608
|
ts.forEach(node.name.elements, checkSourceElement);
|
|
69330
69609
|
}
|
|
69331
|
-
if (
|
|
69610
|
+
if (ts.isParameter(node) && node.initializer && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
|
|
69332
69611
|
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
|
|
69333
69612
|
return;
|
|
69334
69613
|
}
|
|
69335
69614
|
if (ts.isBindingPattern(node.name)) {
|
|
69336
|
-
var needCheckInitializer = node.initializer && node.parent.parent.kind !== 243;
|
|
69615
|
+
var needCheckInitializer = ts.hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 243;
|
|
69337
69616
|
var needCheckWidenedType = !ts.some(node.name.elements, ts.not(ts.isOmittedExpression));
|
|
69338
69617
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
69339
69618
|
var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
@@ -69364,7 +69643,7 @@ var ts;
|
|
|
69364
69643
|
}
|
|
69365
69644
|
var type = convertAutoToAny(getTypeOfSymbol(symbol));
|
|
69366
69645
|
if (node === symbol.valueDeclaration) {
|
|
69367
|
-
var initializer = ts.getEffectiveInitializer(node);
|
|
69646
|
+
var initializer = ts.hasOnlyExpressionInitializer(node) && ts.getEffectiveInitializer(node);
|
|
69368
69647
|
if (initializer) {
|
|
69369
69648
|
var isJSObjectLiteralInitializer = ts.isInJSFile(node) &&
|
|
69370
69649
|
ts.isObjectLiteralExpression(initializer) &&
|
|
@@ -69387,7 +69666,7 @@ var ts;
|
|
|
69387
69666
|
!(symbol.flags & 67108864)) {
|
|
69388
69667
|
errorNextVariableOrPropertyDeclarationMustHaveSameType(symbol.valueDeclaration, type, node, declarationType);
|
|
69389
69668
|
}
|
|
69390
|
-
if (node.initializer) {
|
|
69669
|
+
if (ts.hasOnlyExpressionInitializer(node) && node.initializer) {
|
|
69391
69670
|
checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(node.initializer), declarationType, node, node.initializer, undefined);
|
|
69392
69671
|
}
|
|
69393
69672
|
if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
|
|
@@ -70551,8 +70830,9 @@ var ts;
|
|
|
70551
70830
|
registerForUnusedIdentifiersCheck(node);
|
|
70552
70831
|
}
|
|
70553
70832
|
function checkClassDeclaration(node) {
|
|
70554
|
-
|
|
70555
|
-
|
|
70833
|
+
var firstDecorator = ts.find(node.modifiers, ts.isDecorator);
|
|
70834
|
+
if (firstDecorator && ts.some(node.members, function (p) { return ts.hasStaticModifier(p) && ts.isPrivateIdentifierClassElementDeclaration(p); })) {
|
|
70835
|
+
grammarErrorOnNode(firstDecorator, ts.Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);
|
|
70556
70836
|
}
|
|
70557
70837
|
if (!node.name && !ts.hasSyntacticModifier(node, 512)) {
|
|
70558
70838
|
grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);
|
|
@@ -73801,7 +74081,10 @@ var ts;
|
|
|
73801
74081
|
return checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
|
73802
74082
|
}
|
|
73803
74083
|
function checkGrammarDecorators(node) {
|
|
73804
|
-
if (
|
|
74084
|
+
if (ts.canHaveIllegalDecorators(node) && ts.some(node.decorators)) {
|
|
74085
|
+
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
|
|
74086
|
+
}
|
|
74087
|
+
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node)) {
|
|
73805
74088
|
return false;
|
|
73806
74089
|
}
|
|
73807
74090
|
if (!ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
@@ -73814,7 +74097,7 @@ var ts;
|
|
|
73814
74097
|
}
|
|
73815
74098
|
else if (node.kind === 172 || node.kind === 173) {
|
|
73816
74099
|
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
|
|
73817
|
-
if (accessors.firstAccessor
|
|
74100
|
+
if (ts.hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) {
|
|
73818
74101
|
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
|
|
73819
74102
|
}
|
|
73820
74103
|
}
|
|
@@ -73829,6 +74112,8 @@ var ts;
|
|
|
73829
74112
|
var flags = 0;
|
|
73830
74113
|
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
|
|
73831
74114
|
var modifier = _a[_i];
|
|
74115
|
+
if (ts.isDecorator(modifier))
|
|
74116
|
+
continue;
|
|
73832
74117
|
if (modifier.kind !== 145) {
|
|
73833
74118
|
if (node.kind === 166 || node.kind === 168) {
|
|
73834
74119
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
|
|
@@ -74108,6 +74393,13 @@ var ts;
|
|
|
74108
74393
|
case 164:
|
|
74109
74394
|
case 163:
|
|
74110
74395
|
return false;
|
|
74396
|
+
case 170:
|
|
74397
|
+
case 296:
|
|
74398
|
+
case 297:
|
|
74399
|
+
case 264:
|
|
74400
|
+
case 179:
|
|
74401
|
+
case 276:
|
|
74402
|
+
return true;
|
|
74111
74403
|
default:
|
|
74112
74404
|
if (node.parent.kind === 262 || node.parent.kind === 305) {
|
|
74113
74405
|
return false;
|
|
@@ -74118,20 +74410,26 @@ var ts;
|
|
|
74118
74410
|
case 257:
|
|
74119
74411
|
case 180:
|
|
74120
74412
|
return nodeHasAnyModifiersExcept(node, 126);
|
|
74413
|
+
case 226:
|
|
74121
74414
|
case 258:
|
|
74122
74415
|
case 237:
|
|
74123
74416
|
case 259:
|
|
74124
|
-
case 170:
|
|
74125
74417
|
return true;
|
|
74126
74418
|
case 260:
|
|
74127
74419
|
return nodeHasAnyModifiersExcept(node, 85);
|
|
74128
74420
|
default:
|
|
74129
|
-
ts.Debug.
|
|
74421
|
+
ts.Debug.assertNever(node);
|
|
74130
74422
|
}
|
|
74131
74423
|
}
|
|
74132
74424
|
}
|
|
74133
74425
|
function nodeHasAnyModifiersExcept(node, allowedModifier) {
|
|
74134
|
-
|
|
74426
|
+
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
|
|
74427
|
+
var modifier = _a[_i];
|
|
74428
|
+
if (ts.isDecorator(modifier))
|
|
74429
|
+
continue;
|
|
74430
|
+
return modifier.kind !== allowedModifier;
|
|
74431
|
+
}
|
|
74432
|
+
return false;
|
|
74135
74433
|
}
|
|
74136
74434
|
function checkGrammarAsyncModifier(node, asyncModifier) {
|
|
74137
74435
|
switch (node.kind) {
|
|
@@ -74413,19 +74711,25 @@ var ts;
|
|
|
74413
74711
|
if (name.kind === 80) {
|
|
74414
74712
|
grammarErrorOnNode(name, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
|
|
74415
74713
|
}
|
|
74416
|
-
if (prop.modifiers) {
|
|
74714
|
+
if (ts.canHaveModifiers(prop) && prop.modifiers) {
|
|
74417
74715
|
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
|
|
74418
74716
|
var mod = _c[_b];
|
|
74419
|
-
if (mod.kind !== 131 || prop.kind !== 169) {
|
|
74717
|
+
if (ts.isModifier(mod) && (mod.kind !== 131 || prop.kind !== 169)) {
|
|
74420
74718
|
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
|
|
74421
74719
|
}
|
|
74422
74720
|
}
|
|
74423
74721
|
}
|
|
74722
|
+
else if (ts.canHaveIllegalModifiers(prop) && prop.modifiers) {
|
|
74723
|
+
for (var _d = 0, _e = prop.modifiers; _d < _e.length; _d++) {
|
|
74724
|
+
var mod = _e[_d];
|
|
74725
|
+
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
|
|
74726
|
+
}
|
|
74727
|
+
}
|
|
74424
74728
|
var currentKind = void 0;
|
|
74425
74729
|
switch (prop.kind) {
|
|
74426
74730
|
case 297:
|
|
74427
|
-
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
74428
74731
|
case 296:
|
|
74732
|
+
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
74429
74733
|
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
|
|
74430
74734
|
if (name.kind === 8) {
|
|
74431
74735
|
checkGrammarNumericLiteral(name);
|
|
@@ -75002,7 +75306,7 @@ var ts;
|
|
|
75002
75306
|
}
|
|
75003
75307
|
}
|
|
75004
75308
|
function checkGrammarConstructorTypeAnnotation(node) {
|
|
75005
|
-
var type = ts.getEffectiveReturnTypeNode(node);
|
|
75309
|
+
var type = node.type || ts.getEffectiveReturnTypeNode(node);
|
|
75006
75310
|
if (type) {
|
|
75007
75311
|
return grammarErrorOnNode(type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);
|
|
75008
75312
|
}
|
|
@@ -75026,6 +75330,7 @@ var ts;
|
|
|
75026
75330
|
if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
|
|
75027
75331
|
return true;
|
|
75028
75332
|
}
|
|
75333
|
+
ts.Debug.assertNode(node, ts.isPropertySignature);
|
|
75029
75334
|
if (node.initializer) {
|
|
75030
75335
|
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
|
|
75031
75336
|
}
|
|
@@ -75034,6 +75339,7 @@ var ts;
|
|
|
75034
75339
|
if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
|
|
75035
75340
|
return true;
|
|
75036
75341
|
}
|
|
75342
|
+
ts.Debug.assertNode(node, ts.isPropertySignature);
|
|
75037
75343
|
if (node.initializer) {
|
|
75038
75344
|
return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_type_literal_property_cannot_have_an_initializer);
|
|
75039
75345
|
}
|
|
@@ -75355,7 +75661,6 @@ var ts;
|
|
|
75355
75661
|
if (nodes === undefined || visitor === undefined) {
|
|
75356
75662
|
return nodes;
|
|
75357
75663
|
}
|
|
75358
|
-
var updated;
|
|
75359
75664
|
var length = nodes.length;
|
|
75360
75665
|
if (start === undefined || start < 0) {
|
|
75361
75666
|
start = 0;
|
|
@@ -75367,18 +75672,48 @@ var ts;
|
|
|
75367
75672
|
var pos = -1;
|
|
75368
75673
|
var end = -1;
|
|
75369
75674
|
if (start > 0 || count < length) {
|
|
75370
|
-
updated = [];
|
|
75371
75675
|
hasTrailingComma = nodes.hasTrailingComma && start + count === length;
|
|
75372
75676
|
}
|
|
75677
|
+
else {
|
|
75678
|
+
pos = nodes.pos;
|
|
75679
|
+
end = nodes.end;
|
|
75680
|
+
hasTrailingComma = nodes.hasTrailingComma;
|
|
75681
|
+
}
|
|
75682
|
+
var updated = visitArrayWorker(nodes, visitor, test, start, count);
|
|
75683
|
+
if (updated !== nodes) {
|
|
75684
|
+
var updatedArray = ts.factory.createNodeArray(updated, hasTrailingComma);
|
|
75685
|
+
ts.setTextRangePosEnd(updatedArray, pos, end);
|
|
75686
|
+
return updatedArray;
|
|
75687
|
+
}
|
|
75688
|
+
return nodes;
|
|
75689
|
+
}
|
|
75690
|
+
ts.visitNodes = visitNodes;
|
|
75691
|
+
function visitArray(nodes, visitor, test, start, count) {
|
|
75692
|
+
if (nodes === undefined) {
|
|
75693
|
+
return nodes;
|
|
75694
|
+
}
|
|
75695
|
+
var length = nodes.length;
|
|
75696
|
+
if (start === undefined || start < 0) {
|
|
75697
|
+
start = 0;
|
|
75698
|
+
}
|
|
75699
|
+
if (count === undefined || count > length - start) {
|
|
75700
|
+
count = length - start;
|
|
75701
|
+
}
|
|
75702
|
+
return visitArrayWorker(nodes, visitor, test, start, count);
|
|
75703
|
+
}
|
|
75704
|
+
ts.visitArray = visitArray;
|
|
75705
|
+
function visitArrayWorker(nodes, visitor, test, start, count) {
|
|
75706
|
+
var updated;
|
|
75707
|
+
var length = nodes.length;
|
|
75708
|
+
if (start > 0 || count < length) {
|
|
75709
|
+
updated = [];
|
|
75710
|
+
}
|
|
75373
75711
|
for (var i = 0; i < count; i++) {
|
|
75374
75712
|
var node = nodes[i + start];
|
|
75375
75713
|
var visited = node !== undefined ? visitor(node) : undefined;
|
|
75376
75714
|
if (updated !== undefined || visited === undefined || visited !== node) {
|
|
75377
75715
|
if (updated === undefined) {
|
|
75378
75716
|
updated = nodes.slice(0, i);
|
|
75379
|
-
hasTrailingComma = nodes.hasTrailingComma;
|
|
75380
|
-
pos = nodes.pos;
|
|
75381
|
-
end = nodes.end;
|
|
75382
75717
|
}
|
|
75383
75718
|
if (visited) {
|
|
75384
75719
|
if (ts.isArray(visited)) {
|
|
@@ -75395,14 +75730,8 @@ var ts;
|
|
|
75395
75730
|
}
|
|
75396
75731
|
}
|
|
75397
75732
|
}
|
|
75398
|
-
|
|
75399
|
-
var updatedArray = ts.factory.createNodeArray(updated, hasTrailingComma);
|
|
75400
|
-
ts.setTextRangePosEnd(updatedArray, pos, end);
|
|
75401
|
-
return updatedArray;
|
|
75402
|
-
}
|
|
75403
|
-
return nodes;
|
|
75733
|
+
return updated !== null && updated !== void 0 ? updated : nodes;
|
|
75404
75734
|
}
|
|
75405
|
-
ts.visitNodes = visitNodes;
|
|
75406
75735
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor) {
|
|
75407
75736
|
if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
|
|
75408
75737
|
context.startLexicalEnvironment();
|
|
@@ -75458,14 +75787,14 @@ var ts;
|
|
|
75458
75787
|
factory.createConditionalExpression(factory.createStrictEquality(factory.getGeneratedNameForNode(parameter), factory.createVoidZero()), undefined, parameter.initializer, undefined, factory.getGeneratedNameForNode(parameter)) :
|
|
75459
75788
|
factory.getGeneratedNameForNode(parameter)),
|
|
75460
75789
|
])));
|
|
75461
|
-
return factory.updateParameterDeclaration(parameter, parameter.
|
|
75790
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, factory.getGeneratedNameForNode(parameter), parameter.questionToken, parameter.type, undefined);
|
|
75462
75791
|
}
|
|
75463
75792
|
function addDefaultValueAssignmentForInitializer(parameter, name, initializer, context) {
|
|
75464
75793
|
var factory = context.factory;
|
|
75465
75794
|
context.addInitializationStatement(factory.createIfStatement(factory.createTypeCheck(factory.cloneNode(name), "undefined"), ts.setEmitFlags(ts.setTextRange(factory.createBlock([
|
|
75466
75795
|
factory.createExpressionStatement(ts.setEmitFlags(ts.setTextRange(factory.createAssignment(ts.setEmitFlags(factory.cloneNode(name), 48), ts.setEmitFlags(initializer, 48 | ts.getEmitFlags(initializer) | 1536)), parameter), 1536))
|
|
75467
75796
|
]), parameter), 1 | 32 | 384 | 1536)));
|
|
75468
|
-
return factory.updateParameterDeclaration(parameter, parameter.
|
|
75797
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, parameter.name, parameter.questionToken, parameter.type, undefined);
|
|
75469
75798
|
}
|
|
75470
75799
|
function visitFunctionBody(node, visitor, context, nodeVisitor) {
|
|
75471
75800
|
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
@@ -75524,7 +75853,7 @@ var ts;
|
|
|
75524
75853
|
return factory.updateTypeParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
|
|
75525
75854
|
case 164:
|
|
75526
75855
|
ts.Debug.type(node);
|
|
75527
|
-
return factory.updateParameterDeclaration(node, nodesVisitor(node.
|
|
75856
|
+
return factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
75528
75857
|
case 165:
|
|
75529
75858
|
ts.Debug.type(node);
|
|
75530
75859
|
return factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
@@ -75533,27 +75862,27 @@ var ts;
|
|
|
75533
75862
|
return factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75534
75863
|
case 167:
|
|
75535
75864
|
ts.Debug.type(node);
|
|
75536
|
-
return factory.updatePropertyDeclaration(node, nodesVisitor(node.
|
|
75865
|
+
return factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken || node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
75537
75866
|
case 168:
|
|
75538
75867
|
ts.Debug.type(node);
|
|
75539
75868
|
return factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75540
75869
|
case 169:
|
|
75541
75870
|
ts.Debug.type(node);
|
|
75542
|
-
return factory.updateMethodDeclaration(node, nodesVisitor(node.
|
|
75871
|
+
return factory.updateMethodDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75543
75872
|
case 171:
|
|
75544
75873
|
ts.Debug.type(node);
|
|
75545
|
-
return factory.updateConstructorDeclaration(node, nodesVisitor(node.
|
|
75874
|
+
return factory.updateConstructorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75546
75875
|
case 172:
|
|
75547
75876
|
ts.Debug.type(node);
|
|
75548
|
-
return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.
|
|
75877
|
+
return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75549
75878
|
case 173:
|
|
75550
75879
|
ts.Debug.type(node);
|
|
75551
|
-
return factory.updateSetAccessorDeclaration(node, nodesVisitor(node.
|
|
75880
|
+
return factory.updateSetAccessorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75552
75881
|
case 170:
|
|
75553
75882
|
ts.Debug.type(node);
|
|
75554
75883
|
context.startLexicalEnvironment();
|
|
75555
75884
|
context.suspendLexicalEnvironment();
|
|
75556
|
-
return factory.updateClassStaticBlockDeclaration(node,
|
|
75885
|
+
return factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75557
75886
|
case 174:
|
|
75558
75887
|
ts.Debug.type(node);
|
|
75559
75888
|
return factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
@@ -75562,7 +75891,7 @@ var ts;
|
|
|
75562
75891
|
return factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75563
75892
|
case 176:
|
|
75564
75893
|
ts.Debug.type(node);
|
|
75565
|
-
return factory.updateIndexSignature(node, nodesVisitor(node.
|
|
75894
|
+
return factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75566
75895
|
case 177:
|
|
75567
75896
|
ts.Debug.type(node);
|
|
75568
75897
|
return factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
@@ -75724,7 +76053,7 @@ var ts;
|
|
|
75724
76053
|
return factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
75725
76054
|
case 226:
|
|
75726
76055
|
ts.Debug.type(node);
|
|
75727
|
-
return factory.updateClassExpression(node, nodesVisitor(node.
|
|
76056
|
+
return factory.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
75728
76057
|
case 228:
|
|
75729
76058
|
ts.Debug.type(node);
|
|
75730
76059
|
return factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
@@ -75803,22 +76132,22 @@ var ts;
|
|
|
75803
76132
|
return factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
|
|
75804
76133
|
case 256:
|
|
75805
76134
|
ts.Debug.type(node);
|
|
75806
|
-
return factory.updateFunctionDeclaration(node, nodesVisitor(node.
|
|
76135
|
+
return factory.updateFunctionDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75807
76136
|
case 257:
|
|
75808
76137
|
ts.Debug.type(node);
|
|
75809
|
-
return factory.updateClassDeclaration(node, nodesVisitor(node.
|
|
76138
|
+
return factory.updateClassDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
|
|
75810
76139
|
case 258:
|
|
75811
76140
|
ts.Debug.type(node);
|
|
75812
|
-
return factory.updateInterfaceDeclaration(node, nodesVisitor(node.
|
|
76141
|
+
return factory.updateInterfaceDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
75813
76142
|
case 259:
|
|
75814
76143
|
ts.Debug.type(node);
|
|
75815
|
-
return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.
|
|
76144
|
+
return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75816
76145
|
case 260:
|
|
75817
76146
|
ts.Debug.type(node);
|
|
75818
|
-
return factory.updateEnumDeclaration(node, nodesVisitor(node.
|
|
76147
|
+
return factory.updateEnumDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
|
|
75819
76148
|
case 261:
|
|
75820
76149
|
ts.Debug.type(node);
|
|
75821
|
-
return factory.updateModuleDeclaration(node, nodesVisitor(node.
|
|
76150
|
+
return factory.updateModuleDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isModuleName), nodeVisitor(node.body, visitor, ts.isModuleBody));
|
|
75822
76151
|
case 262:
|
|
75823
76152
|
ts.Debug.type(node);
|
|
75824
76153
|
return factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
@@ -75830,10 +76159,10 @@ var ts;
|
|
|
75830
76159
|
return factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
75831
76160
|
case 265:
|
|
75832
76161
|
ts.Debug.type(node);
|
|
75833
|
-
return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.
|
|
76162
|
+
return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.moduleReference, visitor, ts.isModuleReference));
|
|
75834
76163
|
case 266:
|
|
75835
76164
|
ts.Debug.type(node);
|
|
75836
|
-
return factory.updateImportDeclaration(node, nodesVisitor(node.
|
|
76165
|
+
return factory.updateImportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.importClause, visitor, ts.isImportClause), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
75837
76166
|
case 293:
|
|
75838
76167
|
ts.Debug.type(node);
|
|
75839
76168
|
return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
|
|
@@ -75857,10 +76186,10 @@ var ts;
|
|
|
75857
76186
|
return factory.updateImportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
75858
76187
|
case 271:
|
|
75859
76188
|
ts.Debug.type(node);
|
|
75860
|
-
return factory.updateExportAssignment(node, nodesVisitor(node.
|
|
76189
|
+
return factory.updateExportAssignment(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
75861
76190
|
case 272:
|
|
75862
76191
|
ts.Debug.type(node);
|
|
75863
|
-
return factory.updateExportDeclaration(node, nodesVisitor(node.
|
|
76192
|
+
return factory.updateExportDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.exportClause, visitor, ts.isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
|
|
75864
76193
|
case 273:
|
|
75865
76194
|
ts.Debug.type(node);
|
|
75866
76195
|
return factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
|
|
@@ -76849,20 +77178,20 @@ var ts;
|
|
|
76849
77178
|
var numParameters = firstParameterIsThis ? parameters.length - 1 : parameters.length;
|
|
76850
77179
|
for (var i = 0; i < numParameters; i++) {
|
|
76851
77180
|
var parameter = parameters[i + firstParameterOffset];
|
|
76852
|
-
if (decorators || parameter
|
|
77181
|
+
if (decorators || ts.hasDecorators(parameter)) {
|
|
76853
77182
|
if (!decorators) {
|
|
76854
77183
|
decorators = new Array(numParameters);
|
|
76855
77184
|
}
|
|
76856
|
-
decorators[i] = parameter
|
|
77185
|
+
decorators[i] = ts.getDecorators(parameter);
|
|
76857
77186
|
}
|
|
76858
77187
|
}
|
|
76859
77188
|
}
|
|
76860
77189
|
return decorators;
|
|
76861
77190
|
}
|
|
76862
77191
|
function getAllDecoratorsOfClass(node) {
|
|
76863
|
-
var decorators = node
|
|
77192
|
+
var decorators = ts.getDecorators(node);
|
|
76864
77193
|
var parameters = getDecoratorsOfParameters(ts.getFirstConstructorWithBody(node));
|
|
76865
|
-
if (!decorators && !parameters) {
|
|
77194
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76866
77195
|
return undefined;
|
|
76867
77196
|
}
|
|
76868
77197
|
return {
|
|
@@ -76890,36 +77219,38 @@ var ts;
|
|
|
76890
77219
|
return undefined;
|
|
76891
77220
|
}
|
|
76892
77221
|
var _a = ts.getAllAccessorDeclarations(parent.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
|
|
76893
|
-
var firstAccessorWithDecorators = firstAccessor
|
|
77222
|
+
var firstAccessorWithDecorators = ts.hasDecorators(firstAccessor) ? firstAccessor :
|
|
77223
|
+
secondAccessor && ts.hasDecorators(secondAccessor) ? secondAccessor :
|
|
77224
|
+
undefined;
|
|
76894
77225
|
if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
|
|
76895
77226
|
return undefined;
|
|
76896
77227
|
}
|
|
76897
|
-
var decorators = firstAccessorWithDecorators
|
|
77228
|
+
var decorators = ts.getDecorators(firstAccessorWithDecorators);
|
|
76898
77229
|
var parameters = getDecoratorsOfParameters(setAccessor);
|
|
76899
|
-
if (!decorators && !parameters) {
|
|
77230
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76900
77231
|
return undefined;
|
|
76901
77232
|
}
|
|
76902
77233
|
return {
|
|
76903
77234
|
decorators: decorators,
|
|
76904
77235
|
parameters: parameters,
|
|
76905
|
-
getDecorators: getAccessor
|
|
76906
|
-
setDecorators: setAccessor
|
|
77236
|
+
getDecorators: getAccessor && ts.getDecorators(getAccessor),
|
|
77237
|
+
setDecorators: setAccessor && ts.getDecorators(setAccessor)
|
|
76907
77238
|
};
|
|
76908
77239
|
}
|
|
76909
77240
|
function getAllDecoratorsOfMethod(method) {
|
|
76910
77241
|
if (!method.body) {
|
|
76911
77242
|
return undefined;
|
|
76912
77243
|
}
|
|
76913
|
-
var decorators = method
|
|
77244
|
+
var decorators = ts.getDecorators(method);
|
|
76914
77245
|
var parameters = getDecoratorsOfParameters(method);
|
|
76915
|
-
if (!decorators && !parameters) {
|
|
77246
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76916
77247
|
return undefined;
|
|
76917
77248
|
}
|
|
76918
77249
|
return { decorators: decorators, parameters: parameters };
|
|
76919
77250
|
}
|
|
76920
77251
|
function getAllDecoratorsOfProperty(property) {
|
|
76921
|
-
var decorators = property
|
|
76922
|
-
if (!decorators) {
|
|
77252
|
+
var decorators = ts.getDecorators(property);
|
|
77253
|
+
if (!ts.some(decorators)) {
|
|
76923
77254
|
return undefined;
|
|
76924
77255
|
}
|
|
76925
77256
|
return { decorators: decorators };
|
|
@@ -77524,6 +77855,8 @@ var ts;
|
|
|
77524
77855
|
}
|
|
77525
77856
|
}
|
|
77526
77857
|
function modifierVisitor(node) {
|
|
77858
|
+
if (ts.isDecorator(node))
|
|
77859
|
+
return undefined;
|
|
77527
77860
|
if (ts.modifierToFlag(node.kind) & 116958) {
|
|
77528
77861
|
return undefined;
|
|
77529
77862
|
}
|
|
@@ -77676,14 +78009,14 @@ var ts;
|
|
|
77676
78009
|
return !!(node.transformFlags & 8192);
|
|
77677
78010
|
}
|
|
77678
78011
|
function isClassLikeDeclarationWithTypeScriptSyntax(node) {
|
|
77679
|
-
return ts.
|
|
78012
|
+
return ts.hasDecorators(node)
|
|
77680
78013
|
|| ts.some(node.typeParameters)
|
|
77681
78014
|
|| ts.some(node.heritageClauses, hasTypeScriptClassSyntax)
|
|
77682
78015
|
|| ts.some(node.members, hasTypeScriptClassSyntax);
|
|
77683
78016
|
}
|
|
77684
78017
|
function visitClassDeclaration(node) {
|
|
77685
78018
|
if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !(currentNamespace && ts.hasSyntacticModifier(node, 1))) {
|
|
77686
|
-
return factory.updateClassDeclaration(node, ts.
|
|
78019
|
+
return factory.updateClassDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
77687
78020
|
}
|
|
77688
78021
|
var staticProperties = ts.getProperties(node, true, true);
|
|
77689
78022
|
var facts = getClassFacts(node, staticProperties);
|
|
@@ -77691,12 +78024,12 @@ var ts;
|
|
|
77691
78024
|
context.startLexicalEnvironment();
|
|
77692
78025
|
}
|
|
77693
78026
|
var name = node.name || (facts & 5 ? factory.getGeneratedNameForNode(node) : undefined);
|
|
77694
|
-
var allDecorators =
|
|
78027
|
+
var allDecorators = ts.getAllDecoratorsOfClass(node);
|
|
77695
78028
|
var decorators = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
|
|
77696
78029
|
var modifiers = !(facts & 128)
|
|
77697
78030
|
? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
|
|
77698
78031
|
: ts.elideNodes(factory, node.modifiers);
|
|
77699
|
-
var classStatement = factory.updateClassDeclaration(node, decorators, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node));
|
|
78032
|
+
var classStatement = factory.updateClassDeclaration(node, ts.concatenate(decorators, modifiers), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node));
|
|
77700
78033
|
var emitFlags = ts.getEmitFlags(node);
|
|
77701
78034
|
if (facts & 1) {
|
|
77702
78035
|
emitFlags |= 32;
|
|
@@ -77743,9 +78076,9 @@ var ts;
|
|
|
77743
78076
|
return ts.singleOrMany(statements);
|
|
77744
78077
|
}
|
|
77745
78078
|
function visitClassExpression(node) {
|
|
77746
|
-
var allDecorators =
|
|
78079
|
+
var allDecorators = ts.getAllDecoratorsOfClass(node);
|
|
77747
78080
|
var decorators = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
|
|
77748
|
-
return factory.updateClassExpression(node, decorators,
|
|
78081
|
+
return factory.updateClassExpression(node, decorators, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), isClassLikeDeclarationWithTypeScriptSyntax(node) ?
|
|
77749
78082
|
transformClassMembers(node) :
|
|
77750
78083
|
ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
77751
78084
|
}
|
|
@@ -77758,99 +78091,25 @@ var ts;
|
|
|
77758
78091
|
for (var _i = 0, parametersWithPropertyAssignments_1 = parametersWithPropertyAssignments; _i < parametersWithPropertyAssignments_1.length; _i++) {
|
|
77759
78092
|
var parameter = parametersWithPropertyAssignments_1[_i];
|
|
77760
78093
|
if (ts.isIdentifier(parameter.name)) {
|
|
77761
|
-
members.push(ts.setOriginalNode(factory.createPropertyDeclaration(undefined,
|
|
78094
|
+
members.push(ts.setOriginalNode(factory.createPropertyDeclaration(undefined, parameter.name, undefined, undefined, undefined), parameter));
|
|
77762
78095
|
}
|
|
77763
78096
|
}
|
|
77764
78097
|
}
|
|
77765
78098
|
ts.addRange(members, ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
77766
78099
|
return ts.setTextRange(factory.createNodeArray(members), node.members);
|
|
77767
78100
|
}
|
|
77768
|
-
function getDecoratorsOfParameters(node) {
|
|
77769
|
-
var decorators;
|
|
77770
|
-
if (node) {
|
|
77771
|
-
var parameters = node.parameters;
|
|
77772
|
-
var firstParameterIsThis = parameters.length > 0 && ts.parameterIsThisKeyword(parameters[0]);
|
|
77773
|
-
var firstParameterOffset = firstParameterIsThis ? 1 : 0;
|
|
77774
|
-
var numParameters = firstParameterIsThis ? parameters.length - 1 : parameters.length;
|
|
77775
|
-
for (var i = 0; i < numParameters; i++) {
|
|
77776
|
-
var parameter = parameters[i + firstParameterOffset];
|
|
77777
|
-
if (decorators || parameter.decorators) {
|
|
77778
|
-
if (!decorators) {
|
|
77779
|
-
decorators = new Array(numParameters);
|
|
77780
|
-
}
|
|
77781
|
-
decorators[i] = parameter.decorators;
|
|
77782
|
-
}
|
|
77783
|
-
}
|
|
77784
|
-
}
|
|
77785
|
-
return decorators;
|
|
77786
|
-
}
|
|
77787
|
-
function getAllDecoratorsOfConstructor(node) {
|
|
77788
|
-
var decorators = node.decorators;
|
|
77789
|
-
var parameters = getDecoratorsOfParameters(ts.getFirstConstructorWithBody(node));
|
|
77790
|
-
if (!decorators && !parameters) {
|
|
77791
|
-
return undefined;
|
|
77792
|
-
}
|
|
77793
|
-
return {
|
|
77794
|
-
decorators: decorators,
|
|
77795
|
-
parameters: parameters
|
|
77796
|
-
};
|
|
77797
|
-
}
|
|
77798
|
-
function getAllDecoratorsOfClassElement(member, parent) {
|
|
77799
|
-
switch (member.kind) {
|
|
77800
|
-
case 172:
|
|
77801
|
-
case 173:
|
|
77802
|
-
return getAllDecoratorsOfAccessors(parent, member);
|
|
77803
|
-
case 169:
|
|
77804
|
-
return getAllDecoratorsOfMethod(member);
|
|
77805
|
-
case 167:
|
|
77806
|
-
return getAllDecoratorsOfProperty(member);
|
|
77807
|
-
default:
|
|
77808
|
-
return undefined;
|
|
77809
|
-
}
|
|
77810
|
-
}
|
|
77811
|
-
function getAllDecoratorsOfAccessors(node, accessor) {
|
|
77812
|
-
if (!accessor.body) {
|
|
77813
|
-
return undefined;
|
|
77814
|
-
}
|
|
77815
|
-
var _a = ts.getAllAccessorDeclarations(node.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, setAccessor = _a.setAccessor;
|
|
77816
|
-
var firstAccessorWithDecorators = firstAccessor.decorators ? firstAccessor : secondAccessor && secondAccessor.decorators ? secondAccessor : undefined;
|
|
77817
|
-
if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
|
|
77818
|
-
return undefined;
|
|
77819
|
-
}
|
|
77820
|
-
var decorators = firstAccessorWithDecorators.decorators;
|
|
77821
|
-
var parameters = getDecoratorsOfParameters(setAccessor);
|
|
77822
|
-
if (!decorators && !parameters) {
|
|
77823
|
-
return undefined;
|
|
77824
|
-
}
|
|
77825
|
-
return { decorators: decorators, parameters: parameters };
|
|
77826
|
-
}
|
|
77827
|
-
function getAllDecoratorsOfMethod(method) {
|
|
77828
|
-
if (!method.body) {
|
|
77829
|
-
return undefined;
|
|
77830
|
-
}
|
|
77831
|
-
var decorators = method.decorators;
|
|
77832
|
-
var parameters = getDecoratorsOfParameters(method);
|
|
77833
|
-
if (!decorators && !parameters) {
|
|
77834
|
-
return undefined;
|
|
77835
|
-
}
|
|
77836
|
-
return { decorators: decorators, parameters: parameters };
|
|
77837
|
-
}
|
|
77838
|
-
function getAllDecoratorsOfProperty(property) {
|
|
77839
|
-
var decorators = property.decorators;
|
|
77840
|
-
if (!decorators) {
|
|
77841
|
-
return undefined;
|
|
77842
|
-
}
|
|
77843
|
-
return { decorators: decorators };
|
|
77844
|
-
}
|
|
77845
78101
|
function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
|
|
78102
|
+
var _a, _b, _c, _d;
|
|
77846
78103
|
if (!allDecorators) {
|
|
77847
78104
|
return undefined;
|
|
77848
78105
|
}
|
|
77849
|
-
var decorators = ts.
|
|
78106
|
+
var decorators = ts.visitArray(allDecorators.decorators, visitor, ts.isDecorator);
|
|
77850
78107
|
var parameterDecorators = ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter);
|
|
77851
78108
|
var metadataDecorators = ts.some(decorators) || ts.some(parameterDecorators) ? getTypeMetadata(node, container) : undefined;
|
|
77852
78109
|
var result = factory.createNodeArray(ts.concatenate(ts.concatenate(decorators, parameterDecorators), metadataDecorators));
|
|
77853
|
-
ts.
|
|
78110
|
+
var pos = (_b = (_a = ts.firstOrUndefined(allDecorators.decorators)) === null || _a === void 0 ? void 0 : _a.pos) !== null && _b !== void 0 ? _b : -1;
|
|
78111
|
+
var end = (_d = (_c = ts.lastOrUndefined(allDecorators.decorators)) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : -1;
|
|
78112
|
+
ts.setTextRangePosEnd(result, pos, end);
|
|
77854
78113
|
return result;
|
|
77855
78114
|
}
|
|
77856
78115
|
function transformDecoratorsOfParameter(parameterDecorators, parameterOffset) {
|
|
@@ -77863,7 +78122,8 @@ var ts;
|
|
|
77863
78122
|
ts.setTextRange(helper, parameterDecorator.expression);
|
|
77864
78123
|
ts.setEmitFlags(helper, 1536);
|
|
77865
78124
|
var decorator = factory.createDecorator(helper);
|
|
77866
|
-
ts.
|
|
78125
|
+
ts.setSourceMapRange(decorator, parameterDecorator.expression);
|
|
78126
|
+
ts.setCommentRange(decorator, parameterDecorator.expression);
|
|
77867
78127
|
ts.setEmitFlags(decorator, 1536);
|
|
77868
78128
|
decorators.push(decorator);
|
|
77869
78129
|
}
|
|
@@ -77955,7 +78215,7 @@ var ts;
|
|
|
77955
78215
|
}
|
|
77956
78216
|
function visitPropertyNameOfClassElement(member) {
|
|
77957
78217
|
var name = member.name;
|
|
77958
|
-
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.
|
|
78218
|
+
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.hasDecorators(member))) {
|
|
77959
78219
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
77960
78220
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
77961
78221
|
if (!ts.isSimpleInlineableExpression(innerExpression)) {
|
|
@@ -77980,21 +78240,21 @@ var ts;
|
|
|
77980
78240
|
}
|
|
77981
78241
|
function visitPropertyDeclaration(node, parent) {
|
|
77982
78242
|
var isAmbient = node.flags & 16777216 || ts.hasSyntacticModifier(node, 128);
|
|
77983
|
-
if (isAmbient && !ts.
|
|
78243
|
+
if (isAmbient && !ts.hasDecorators(node)) {
|
|
77984
78244
|
return undefined;
|
|
77985
78245
|
}
|
|
77986
|
-
var allDecorators = getAllDecoratorsOfClassElement(node, parent);
|
|
78246
|
+
var allDecorators = ts.getAllDecoratorsOfClassElement(node, parent);
|
|
77987
78247
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
77988
78248
|
if (isAmbient) {
|
|
77989
|
-
return factory.updatePropertyDeclaration(node, decorators, factory.createModifiersFromModifierFlags(2), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
78249
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
77990
78250
|
}
|
|
77991
|
-
return factory.updatePropertyDeclaration(node, decorators, ts.visitNodes(node.modifiers,
|
|
78251
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitNode(node.initializer, visitor));
|
|
77992
78252
|
}
|
|
77993
78253
|
function visitConstructor(node) {
|
|
77994
78254
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
77995
78255
|
return undefined;
|
|
77996
78256
|
}
|
|
77997
|
-
return factory.updateConstructorDeclaration(node, undefined, ts.
|
|
78257
|
+
return factory.updateConstructorDeclaration(node, undefined, ts.visitParameterList(node.parameters, visitor, context), transformConstructorBody(node.body, node));
|
|
77998
78258
|
}
|
|
77999
78259
|
function transformConstructorBody(body, constructor) {
|
|
78000
78260
|
var parametersWithPropertyAssignments = constructor &&
|
|
@@ -78041,9 +78301,9 @@ var ts;
|
|
|
78041
78301
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
78042
78302
|
return undefined;
|
|
78043
78303
|
}
|
|
78044
|
-
var allDecorators = ts.isClassLike(parent) ? getAllDecoratorsOfClassElement(node, parent) : undefined;
|
|
78304
|
+
var allDecorators = ts.isClassLike(parent) ? ts.getAllDecoratorsOfClassElement(node, parent) : undefined;
|
|
78045
78305
|
var decorators = ts.isClassLike(parent) ? transformAllDecoratorsOfDeclaration(node, parent, allDecorators) : undefined;
|
|
78046
|
-
return factory.updateMethodDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78306
|
+
return factory.updateMethodDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), node.asteriskToken, visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context));
|
|
78047
78307
|
}
|
|
78048
78308
|
function shouldEmitAccessorDeclaration(node) {
|
|
78049
78309
|
return !(ts.nodeIsMissing(node.body) && ts.hasSyntacticModifier(node, 128));
|
|
@@ -78056,9 +78316,9 @@ var ts;
|
|
|
78056
78316
|
return undefined;
|
|
78057
78317
|
}
|
|
78058
78318
|
var decorators = ts.isClassLike(parent) ?
|
|
78059
|
-
transformAllDecoratorsOfDeclaration(node, parent, getAllDecoratorsOfClassElement(node, parent)) :
|
|
78319
|
+
transformAllDecoratorsOfDeclaration(node, parent, ts.getAllDecoratorsOfClassElement(node, parent)) :
|
|
78060
78320
|
undefined;
|
|
78061
|
-
return factory.updateGetAccessorDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78321
|
+
return factory.updateGetAccessorDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
78062
78322
|
}
|
|
78063
78323
|
function visitSetAccessor(node, parent) {
|
|
78064
78324
|
if (!(node.transformFlags & 1)) {
|
|
@@ -78068,15 +78328,15 @@ var ts;
|
|
|
78068
78328
|
return undefined;
|
|
78069
78329
|
}
|
|
78070
78330
|
var decorators = ts.isClassLike(parent) ?
|
|
78071
|
-
transformAllDecoratorsOfDeclaration(node, parent, getAllDecoratorsOfClassElement(node, parent)) :
|
|
78331
|
+
transformAllDecoratorsOfDeclaration(node, parent, ts.getAllDecoratorsOfClassElement(node, parent)) :
|
|
78072
78332
|
undefined;
|
|
78073
|
-
return factory.updateSetAccessorDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78333
|
+
return factory.updateSetAccessorDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
78074
78334
|
}
|
|
78075
78335
|
function visitFunctionDeclaration(node) {
|
|
78076
78336
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
78077
78337
|
return factory.createNotEmittedStatement(node);
|
|
78078
78338
|
}
|
|
78079
|
-
var updated = factory.updateFunctionDeclaration(node,
|
|
78339
|
+
var updated = factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.visitFunctionBody(node.body, visitor, context) || factory.createBlock([]));
|
|
78080
78340
|
if (isExportOfNamespace(node)) {
|
|
78081
78341
|
var statements = [updated];
|
|
78082
78342
|
addExportMemberAssignment(statements, node);
|
|
@@ -78099,7 +78359,7 @@ var ts;
|
|
|
78099
78359
|
if (ts.parameterIsThisKeyword(node)) {
|
|
78100
78360
|
return undefined;
|
|
78101
78361
|
}
|
|
78102
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.
|
|
78362
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
78103
78363
|
if (updated !== node) {
|
|
78104
78364
|
ts.setCommentRange(updated, node);
|
|
78105
78365
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -78193,7 +78453,7 @@ var ts;
|
|
|
78193
78453
|
var localName = factory.getLocalName(node, false, true);
|
|
78194
78454
|
moduleArg = factory.createAssignment(localName, moduleArg);
|
|
78195
78455
|
}
|
|
78196
|
-
var enumStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
78456
|
+
var enumStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]));
|
|
78197
78457
|
ts.setOriginalNode(enumStatement, node);
|
|
78198
78458
|
if (varAdded) {
|
|
78199
78459
|
ts.setSyntheticLeadingComments(enumStatement, undefined);
|
|
@@ -78325,7 +78585,7 @@ var ts;
|
|
|
78325
78585
|
var localName = factory.getLocalName(node, false, true);
|
|
78326
78586
|
moduleArg = factory.createAssignment(localName, moduleArg);
|
|
78327
78587
|
}
|
|
78328
|
-
var moduleStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
78588
|
+
var moduleStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]));
|
|
78329
78589
|
ts.setOriginalNode(moduleStatement, node);
|
|
78330
78590
|
if (varAdded) {
|
|
78331
78591
|
ts.setSyntheticLeadingComments(moduleStatement, undefined);
|
|
@@ -78396,7 +78656,7 @@ var ts;
|
|
|
78396
78656
|
return importClause ||
|
|
78397
78657
|
compilerOptions.importsNotUsedAsValues === 1 ||
|
|
78398
78658
|
compilerOptions.importsNotUsedAsValues === 2
|
|
78399
|
-
? factory.updateImportDeclaration(node, undefined,
|
|
78659
|
+
? factory.updateImportDeclaration(node, undefined, importClause, node.moduleSpecifier, node.assertClause)
|
|
78400
78660
|
: undefined;
|
|
78401
78661
|
}
|
|
78402
78662
|
function visitImportClause(node) {
|
|
@@ -78435,7 +78695,7 @@ var ts;
|
|
|
78435
78695
|
compilerOptions.importsNotUsedAsValues === 2);
|
|
78436
78696
|
var exportClause = ts.visitNode(node.exportClause, function (bindings) { return visitNamedExportBindings(bindings, allowEmpty); }, ts.isNamedExportBindings);
|
|
78437
78697
|
return exportClause
|
|
78438
|
-
? factory.updateExportDeclaration(node, undefined,
|
|
78698
|
+
? factory.updateExportDeclaration(node, undefined, node.isTypeOnly, exportClause, node.moduleSpecifier, node.assertClause)
|
|
78439
78699
|
: undefined;
|
|
78440
78700
|
}
|
|
78441
78701
|
function visitNamedExports(node, allowEmpty) {
|
|
@@ -78463,7 +78723,7 @@ var ts;
|
|
|
78463
78723
|
if (ts.isExternalModuleImportEqualsDeclaration(node)) {
|
|
78464
78724
|
var isReferenced = shouldEmitAliasDeclaration(node);
|
|
78465
78725
|
if (!isReferenced && compilerOptions.importsNotUsedAsValues === 1) {
|
|
78466
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined,
|
|
78726
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined, node.moduleReference.expression, undefined), node), node);
|
|
78467
78727
|
}
|
|
78468
78728
|
return isReferenced ? ts.visitEachChild(node, visitor, context) : undefined;
|
|
78469
78729
|
}
|
|
@@ -78818,7 +79078,7 @@ var ts;
|
|
|
78818
79078
|
return node;
|
|
78819
79079
|
}
|
|
78820
79080
|
function visitMethodOrAccessorDeclaration(node) {
|
|
78821
|
-
ts.Debug.assert(!ts.
|
|
79081
|
+
ts.Debug.assert(!ts.hasDecorators(node));
|
|
78822
79082
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.isPrivateIdentifier(node.name)) {
|
|
78823
79083
|
return ts.visitEachChild(node, classElementVisitor, context);
|
|
78824
79084
|
}
|
|
@@ -78829,7 +79089,7 @@ var ts;
|
|
|
78829
79089
|
}
|
|
78830
79090
|
var functionName = getHoistedFunctionName(node);
|
|
78831
79091
|
if (functionName) {
|
|
78832
|
-
getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return !ts.isStaticModifier(m); }), node.asteriskToken, functionName, undefined, ts.visitParameterList(node.parameters, classElementVisitor, context), undefined, ts.visitFunctionBody(node.body, classElementVisitor, context))));
|
|
79092
|
+
getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return ts.isModifier(m) && !ts.isStaticModifier(m); }), node.asteriskToken, functionName, undefined, ts.visitParameterList(node.parameters, classElementVisitor, context), undefined, ts.visitFunctionBody(node.body, classElementVisitor, context))));
|
|
78833
79093
|
}
|
|
78834
79094
|
return undefined;
|
|
78835
79095
|
}
|
|
@@ -78850,13 +79110,13 @@ var ts;
|
|
|
78850
79110
|
}
|
|
78851
79111
|
}
|
|
78852
79112
|
function visitPropertyDeclaration(node) {
|
|
78853
|
-
ts.Debug.assert(!ts.
|
|
79113
|
+
ts.Debug.assert(!ts.hasDecorators(node));
|
|
78854
79114
|
if (ts.isPrivateIdentifier(node.name)) {
|
|
78855
79115
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
|
|
78856
79116
|
if (ts.isStatic(node)) {
|
|
78857
79117
|
return ts.visitEachChild(node, visitor, context);
|
|
78858
79118
|
}
|
|
78859
|
-
return factory.updatePropertyDeclaration(node,
|
|
79119
|
+
return factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name, undefined, undefined, undefined);
|
|
78860
79120
|
}
|
|
78861
79121
|
var info = accessPrivateIdentifier(node.name);
|
|
78862
79122
|
ts.Debug.assert(info, "Undeclared private name for property declaration.");
|
|
@@ -78871,7 +79131,7 @@ var ts;
|
|
|
78871
79131
|
if (ts.isStatic(node) && !shouldTransformPrivateElementsOrClassStaticBlocks && !useDefineForClassFields) {
|
|
78872
79132
|
var initializerStatement = transformPropertyOrClassStaticBlock(node, factory.createThis());
|
|
78873
79133
|
if (initializerStatement) {
|
|
78874
|
-
var staticBlock = factory.createClassStaticBlockDeclaration(
|
|
79134
|
+
var staticBlock = factory.createClassStaticBlockDeclaration(factory.createBlock([initializerStatement]));
|
|
78875
79135
|
ts.setOriginalNode(staticBlock, node);
|
|
78876
79136
|
ts.setCommentRange(staticBlock, node);
|
|
78877
79137
|
ts.setCommentRange(initializerStatement, { pos: -1, end: -1 });
|
|
@@ -79247,7 +79507,7 @@ var ts;
|
|
|
79247
79507
|
var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
|
|
79248
79508
|
var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104);
|
|
79249
79509
|
var statements = [
|
|
79250
|
-
factory.updateClassDeclaration(node,
|
|
79510
|
+
factory.updateClassDeclaration(node, node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass))
|
|
79251
79511
|
];
|
|
79252
79512
|
if (pendingClassReferenceAssignment) {
|
|
79253
79513
|
getPendingExpressions().unshift(pendingClassReferenceAssignment);
|
|
@@ -79285,7 +79545,7 @@ var ts;
|
|
|
79285
79545
|
temp = createClassTempVar();
|
|
79286
79546
|
getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp);
|
|
79287
79547
|
}
|
|
79288
|
-
var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.
|
|
79548
|
+
var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name, undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass));
|
|
79289
79549
|
var hasTransformableStatics = shouldTransformPrivateElementsOrClassStaticBlocks && ts.some(staticPropertiesOrClassStaticBlocks, function (p) { return ts.isClassStaticBlockDeclaration(p) || !!p.initializer || ts.isPrivateIdentifier(p.name); });
|
|
79290
79550
|
if (hasTransformableStatics || ts.some(pendingExpressions)) {
|
|
79291
79551
|
if (isDecoratedClassDeclaration) {
|
|
@@ -79345,7 +79605,7 @@ var ts;
|
|
|
79345
79605
|
members.push(constructor);
|
|
79346
79606
|
}
|
|
79347
79607
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks && ts.some(pendingExpressions)) {
|
|
79348
|
-
members.push(factory.createClassStaticBlockDeclaration(
|
|
79608
|
+
members.push(factory.createClassStaticBlockDeclaration(factory.createBlock([
|
|
79349
79609
|
factory.createExpressionStatement(factory.inlineExpressions(pendingExpressions))
|
|
79350
79610
|
])));
|
|
79351
79611
|
pendingExpressions = undefined;
|
|
@@ -79378,7 +79638,7 @@ var ts;
|
|
|
79378
79638
|
if (!body) {
|
|
79379
79639
|
return undefined;
|
|
79380
79640
|
}
|
|
79381
|
-
return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(factory.createConstructorDeclaration(undefined,
|
|
79641
|
+
return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(factory.createConstructorDeclaration(undefined, parameters !== null && parameters !== void 0 ? parameters : [], body), constructor || node), constructor));
|
|
79382
79642
|
}
|
|
79383
79643
|
function transformConstructorBody(node, constructor, isDerivedClass) {
|
|
79384
79644
|
var _a;
|
|
@@ -80368,6 +80628,9 @@ var ts;
|
|
|
80368
80628
|
ts.addEmitHelpers(visited, context.readEmitHelpers());
|
|
80369
80629
|
return visited;
|
|
80370
80630
|
}
|
|
80631
|
+
function modifierVisitor(node) {
|
|
80632
|
+
return ts.isDecorator(node) ? undefined : node;
|
|
80633
|
+
}
|
|
80371
80634
|
function visitor(node) {
|
|
80372
80635
|
if (!(node.transformFlags & 33554432)) {
|
|
80373
80636
|
return node;
|
|
@@ -80387,8 +80650,6 @@ var ts;
|
|
|
80387
80650
|
return visitSetAccessorDeclaration(node);
|
|
80388
80651
|
case 172:
|
|
80389
80652
|
return visitGetAccessorDeclaration(node);
|
|
80390
|
-
case 170:
|
|
80391
|
-
return visitClassStaticBlockDeclaration(node);
|
|
80392
80653
|
case 167:
|
|
80393
80654
|
return visitPropertyDeclaration(node);
|
|
80394
80655
|
case 164:
|
|
@@ -80400,7 +80661,7 @@ var ts;
|
|
|
80400
80661
|
function visitClassDeclaration(node) {
|
|
80401
80662
|
if (!(ts.classOrConstructorParameterIsDecorated(node) || ts.childIsDecorated(node)))
|
|
80402
80663
|
return ts.visitEachChild(node, visitor, context);
|
|
80403
|
-
var classStatement = ts.
|
|
80664
|
+
var classStatement = ts.hasDecorators(node) ?
|
|
80404
80665
|
createClassDeclarationHeadWithDecorators(node, node.name) :
|
|
80405
80666
|
createClassDeclarationHeadWithoutDecorators(node, node.name);
|
|
80406
80667
|
var statements = [classStatement];
|
|
@@ -80414,7 +80675,7 @@ var ts;
|
|
|
80414
80675
|
return ts.singleOrMany(statements);
|
|
80415
80676
|
}
|
|
80416
80677
|
function createClassDeclarationHeadWithoutDecorators(node, name) {
|
|
80417
|
-
return factory.updateClassDeclaration(node, ts.
|
|
80678
|
+
return factory.updateClassDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement));
|
|
80418
80679
|
}
|
|
80419
80680
|
function createClassDeclarationHeadWithDecorators(node, name) {
|
|
80420
80681
|
var location = ts.moveRangePastModifiers(node);
|
|
@@ -80424,7 +80685,7 @@ var ts;
|
|
|
80424
80685
|
factory.getLocalName(node, false, true);
|
|
80425
80686
|
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
|
|
80426
80687
|
var members = ts.visitNodes(node.members, visitor, ts.isClassElement);
|
|
80427
|
-
var classExpression = factory.createClassExpression(undefined,
|
|
80688
|
+
var classExpression = factory.createClassExpression(undefined, name, undefined, heritageClauses, members);
|
|
80428
80689
|
ts.setOriginalNode(classExpression, node);
|
|
80429
80690
|
ts.setTextRange(classExpression, location);
|
|
80430
80691
|
var statement = factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
@@ -80436,10 +80697,10 @@ var ts;
|
|
|
80436
80697
|
return statement;
|
|
80437
80698
|
}
|
|
80438
80699
|
function visitClassExpression(node) {
|
|
80439
|
-
return factory.updateClassExpression(node, ts.
|
|
80700
|
+
return factory.updateClassExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement));
|
|
80440
80701
|
}
|
|
80441
80702
|
function visitConstructorDeclaration(node) {
|
|
80442
|
-
return factory.updateConstructorDeclaration(node,
|
|
80703
|
+
return factory.updateConstructorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), ts.visitNode(node.body, visitor, ts.isBlock));
|
|
80443
80704
|
}
|
|
80444
80705
|
function finishClassElement(updated, original) {
|
|
80445
80706
|
if (updated !== original) {
|
|
@@ -80449,25 +80710,22 @@ var ts;
|
|
|
80449
80710
|
return updated;
|
|
80450
80711
|
}
|
|
80451
80712
|
function visitMethodDeclaration(node) {
|
|
80452
|
-
return finishClassElement(factory.updateMethodDeclaration(node, ts.
|
|
80713
|
+
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
80453
80714
|
}
|
|
80454
80715
|
function visitGetAccessorDeclaration(node) {
|
|
80455
|
-
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.
|
|
80716
|
+
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
80456
80717
|
}
|
|
80457
80718
|
function visitSetAccessorDeclaration(node) {
|
|
80458
|
-
return finishClassElement(factory.updateSetAccessorDeclaration(node, ts.
|
|
80459
|
-
}
|
|
80460
|
-
function visitClassStaticBlockDeclaration(node) {
|
|
80461
|
-
return factory.updateClassStaticBlockDeclaration(node, undefined, node.modifiers, ts.visitNode(node.body, visitor, ts.isBlock));
|
|
80719
|
+
return finishClassElement(factory.updateSetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
80462
80720
|
}
|
|
80463
80721
|
function visitPropertyDeclaration(node) {
|
|
80464
80722
|
if (node.flags & 16777216 || ts.hasSyntacticModifier(node, 2)) {
|
|
80465
80723
|
return undefined;
|
|
80466
80724
|
}
|
|
80467
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.
|
|
80725
|
+
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
|
|
80468
80726
|
}
|
|
80469
80727
|
function visitParameterDeclaration(node) {
|
|
80470
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.
|
|
80728
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
80471
80729
|
if (updated !== node) {
|
|
80472
80730
|
ts.setCommentRange(updated, node);
|
|
80473
80731
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -80814,22 +81072,22 @@ var ts;
|
|
|
80814
81072
|
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
|
|
80815
81073
|
}
|
|
80816
81074
|
function visitMethodDeclaration(node) {
|
|
80817
|
-
return factory.updateMethodDeclaration(node,
|
|
81075
|
+
return factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name, undefined, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
|
|
80818
81076
|
? transformAsyncFunctionBody(node)
|
|
80819
81077
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80820
81078
|
}
|
|
80821
81079
|
function visitFunctionDeclaration(node) {
|
|
80822
|
-
return factory.updateFunctionDeclaration(node,
|
|
81080
|
+
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
|
|
80823
81081
|
? transformAsyncFunctionBody(node)
|
|
80824
81082
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80825
81083
|
}
|
|
80826
81084
|
function visitFunctionExpression(node) {
|
|
80827
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
81085
|
+
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
|
|
80828
81086
|
? transformAsyncFunctionBody(node)
|
|
80829
81087
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80830
81088
|
}
|
|
80831
81089
|
function visitArrowFunction(node) {
|
|
80832
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
81090
|
+
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.equalsGreaterThanToken, ts.getFunctionFlags(node) & 2
|
|
80833
81091
|
? transformAsyncFunctionBody(node)
|
|
80834
81092
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80835
81093
|
}
|
|
@@ -81086,7 +81344,7 @@ var ts;
|
|
|
81086
81344
|
getterAndSetter.push(factory.createPropertyAssignment("get", factory.createArrowFunction(undefined, undefined, [], undefined, undefined, ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4), name), 4))));
|
|
81087
81345
|
if (hasBinding) {
|
|
81088
81346
|
getterAndSetter.push(factory.createPropertyAssignment("set", factory.createArrowFunction(undefined, undefined, [
|
|
81089
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
81347
|
+
factory.createParameterDeclaration(undefined, undefined, "v", undefined, undefined, undefined)
|
|
81090
81348
|
], undefined, undefined, factory.createAssignment(ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4), name), 4), factory.createIdentifier("v")))));
|
|
81091
81349
|
}
|
|
81092
81350
|
accessors.push(factory.createPropertyAssignment(name, factory.createObjectLiteralExpression(getterAndSetter)));
|
|
@@ -81516,10 +81774,10 @@ var ts;
|
|
|
81516
81774
|
}
|
|
81517
81775
|
function visitParameter(node) {
|
|
81518
81776
|
if (parametersWithPrecedingObjectRestOrSpread === null || parametersWithPrecedingObjectRestOrSpread === void 0 ? void 0 : parametersWithPrecedingObjectRestOrSpread.has(node)) {
|
|
81519
|
-
return factory.updateParameterDeclaration(node, undefined,
|
|
81777
|
+
return factory.updateParameterDeclaration(node, undefined, node.dotDotDotToken, ts.isBindingPattern(node.name) ? factory.getGeneratedNameForNode(node) : node.name, undefined, undefined, undefined);
|
|
81520
81778
|
}
|
|
81521
81779
|
if (node.transformFlags & 65536) {
|
|
81522
|
-
return factory.updateParameterDeclaration(node, undefined,
|
|
81780
|
+
return factory.updateParameterDeclaration(node, undefined, node.dotDotDotToken, factory.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
81523
81781
|
}
|
|
81524
81782
|
return ts.visitEachChild(node, visitor, context);
|
|
81525
81783
|
}
|
|
@@ -81541,7 +81799,7 @@ var ts;
|
|
|
81541
81799
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81542
81800
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81543
81801
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81544
|
-
var updated = factory.updateConstructorDeclaration(node,
|
|
81802
|
+
var updated = factory.updateConstructorDeclaration(node, node.modifiers, ts.visitParameterList(node.parameters, parameterVisitor, context), transformFunctionBody(node));
|
|
81545
81803
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81546
81804
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81547
81805
|
return updated;
|
|
@@ -81551,7 +81809,7 @@ var ts;
|
|
|
81551
81809
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81552
81810
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81553
81811
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81554
|
-
var updated = factory.updateGetAccessorDeclaration(node,
|
|
81812
|
+
var updated = factory.updateGetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context), undefined, transformFunctionBody(node));
|
|
81555
81813
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81556
81814
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81557
81815
|
return updated;
|
|
@@ -81561,7 +81819,7 @@ var ts;
|
|
|
81561
81819
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81562
81820
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81563
81821
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81564
|
-
var updated = factory.updateSetAccessorDeclaration(node,
|
|
81822
|
+
var updated = factory.updateSetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context), transformFunctionBody(node));
|
|
81565
81823
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81566
81824
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81567
81825
|
return updated;
|
|
@@ -81571,8 +81829,8 @@ var ts;
|
|
|
81571
81829
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81572
81830
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81573
81831
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81574
|
-
var updated = factory.updateMethodDeclaration(node,
|
|
81575
|
-
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.
|
|
81832
|
+
var updated = factory.updateMethodDeclaration(node, enclosingFunctionFlags & 1
|
|
81833
|
+
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
81576
81834
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
81577
81835
|
? undefined
|
|
81578
81836
|
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.isToken), undefined, ts.visitParameterList(node.parameters, parameterVisitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
|
|
@@ -81587,7 +81845,7 @@ var ts;
|
|
|
81587
81845
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81588
81846
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81589
81847
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81590
|
-
var updated = factory.updateFunctionDeclaration(node,
|
|
81848
|
+
var updated = factory.updateFunctionDeclaration(node, enclosingFunctionFlags & 1
|
|
81591
81849
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
|
|
81592
81850
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
81593
81851
|
? undefined
|
|
@@ -82171,7 +82429,7 @@ var ts;
|
|
|
82171
82429
|
for (var _i = 0, _a = ts.arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries()); _i < _a.length; _i++) {
|
|
82172
82430
|
var _b = _a[_i], importSource = _b[0], importSpecifiersMap = _b[1];
|
|
82173
82431
|
if (ts.isExternalModule(node)) {
|
|
82174
|
-
var importStatement = factory.createImportDeclaration(undefined,
|
|
82432
|
+
var importStatement = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports(ts.arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource), undefined);
|
|
82175
82433
|
ts.setParentRecursive(importStatement, false);
|
|
82176
82434
|
statements = ts.insertStatementAfterCustomPrologue(statements.slice(), importStatement);
|
|
82177
82435
|
}
|
|
@@ -83155,7 +83413,7 @@ var ts;
|
|
|
83155
83413
|
enableSubstitutionsForBlockScopedBindings();
|
|
83156
83414
|
}
|
|
83157
83415
|
var extendsClauseElement = ts.getClassExtendsHeritageElement(node);
|
|
83158
|
-
var classFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [factory.createParameterDeclaration(undefined, undefined,
|
|
83416
|
+
var classFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [factory.createParameterDeclaration(undefined, undefined, factory.createUniqueName("_super", 16 | 32))] : [], undefined, transformClassBody(node, extendsClauseElement));
|
|
83159
83417
|
ts.setEmitFlags(classFunction, (ts.getEmitFlags(node) & 65536) | 524288);
|
|
83160
83418
|
var inner = factory.createPartiallyEmittedExpression(classFunction);
|
|
83161
83419
|
ts.setTextRangeEnd(inner, node.end);
|
|
@@ -83201,7 +83459,7 @@ var ts;
|
|
|
83201
83459
|
var ancestorFacts = enterSubtree(32662, 73);
|
|
83202
83460
|
var constructor = ts.getFirstConstructorWithBody(node);
|
|
83203
83461
|
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
|
|
83204
|
-
var constructorFunction = factory.createFunctionDeclaration(undefined, undefined,
|
|
83462
|
+
var constructorFunction = factory.createFunctionDeclaration(undefined, undefined, name, undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
|
|
83205
83463
|
ts.setTextRange(constructorFunction, constructor || node);
|
|
83206
83464
|
if (extendsClauseElement) {
|
|
83207
83465
|
ts.setEmitFlags(constructorFunction, 8);
|
|
@@ -83332,10 +83590,10 @@ var ts;
|
|
|
83332
83590
|
return undefined;
|
|
83333
83591
|
}
|
|
83334
83592
|
else if (ts.isBindingPattern(node.name)) {
|
|
83335
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined,
|
|
83593
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined, factory.getGeneratedNameForNode(node), undefined, undefined, undefined), node), node);
|
|
83336
83594
|
}
|
|
83337
83595
|
else if (node.initializer) {
|
|
83338
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined,
|
|
83596
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined, node.name, undefined, undefined, undefined), node), node);
|
|
83339
83597
|
}
|
|
83340
83598
|
else {
|
|
83341
83599
|
return node;
|
|
@@ -83614,7 +83872,7 @@ var ts;
|
|
|
83614
83872
|
: node.name;
|
|
83615
83873
|
exitSubtree(ancestorFacts, 98304, 0);
|
|
83616
83874
|
convertedLoopState = savedConvertedLoopState;
|
|
83617
|
-
return factory.updateFunctionDeclaration(node,
|
|
83875
|
+
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
|
|
83618
83876
|
}
|
|
83619
83877
|
function transformFunctionLikeToExpression(node, location, name, container) {
|
|
83620
83878
|
var savedConvertedLoopState = convertedLoopState;
|
|
@@ -84376,7 +84634,7 @@ var ts;
|
|
|
84376
84634
|
}
|
|
84377
84635
|
}
|
|
84378
84636
|
else {
|
|
84379
|
-
loopParameters.push(factory.createParameterDeclaration(undefined, undefined,
|
|
84637
|
+
loopParameters.push(factory.createParameterDeclaration(undefined, undefined, name));
|
|
84380
84638
|
var checkFlags = resolver.getNodeCheckFlags(decl);
|
|
84381
84639
|
if (checkFlags & 4194304 || hasCapturedBindingsInForHead) {
|
|
84382
84640
|
var outParamName = factory.createUniqueName("out_" + ts.idText(name));
|
|
@@ -84488,10 +84746,10 @@ var ts;
|
|
|
84488
84746
|
var parameters = ts.visitParameterList(node.parameters, visitor, context);
|
|
84489
84747
|
var body = transformFunctionBody(node);
|
|
84490
84748
|
if (node.kind === 172) {
|
|
84491
|
-
updated = factory.updateGetAccessorDeclaration(node, node.
|
|
84749
|
+
updated = factory.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body);
|
|
84492
84750
|
}
|
|
84493
84751
|
else {
|
|
84494
|
-
updated = factory.updateSetAccessorDeclaration(node, node.
|
|
84752
|
+
updated = factory.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body);
|
|
84495
84753
|
}
|
|
84496
84754
|
exitSubtree(ancestorFacts, 98304, 0);
|
|
84497
84755
|
convertedLoopState = savedConvertedLoopState;
|
|
@@ -85057,7 +85315,7 @@ var ts;
|
|
|
85057
85315
|
}
|
|
85058
85316
|
function visitFunctionDeclaration(node) {
|
|
85059
85317
|
if (node.asteriskToken) {
|
|
85060
|
-
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(
|
|
85318
|
+
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(node.modifiers, undefined, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, transformGeneratorFunctionBody(node.body)), node), node);
|
|
85061
85319
|
}
|
|
85062
85320
|
else {
|
|
85063
85321
|
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
|
|
@@ -86253,7 +86511,7 @@ var ts;
|
|
|
86253
86511
|
currentExceptionBlock = undefined;
|
|
86254
86512
|
withBlockStack = undefined;
|
|
86255
86513
|
var buildResult = buildStatements();
|
|
86256
|
-
return emitHelpers().createGeneratorHelper(ts.setEmitFlags(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
86514
|
+
return emitHelpers().createGeneratorHelper(ts.setEmitFlags(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, state)], undefined, factory.createBlock(buildResult, buildResult.length > 0)), 524288));
|
|
86257
86515
|
}
|
|
86258
86516
|
function buildStatements() {
|
|
86259
86517
|
if (operations) {
|
|
@@ -86610,8 +86868,8 @@ var ts;
|
|
|
86610
86868
|
jsonSourceFile ?
|
|
86611
86869
|
jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory.createObjectLiteralExpression() :
|
|
86612
86870
|
factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
|
|
86613
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86614
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86871
|
+
factory.createParameterDeclaration(undefined, undefined, "require"),
|
|
86872
|
+
factory.createParameterDeclaration(undefined, undefined, "exports")
|
|
86615
86873
|
], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
|
|
86616
86874
|
], false)))
|
|
86617
86875
|
]), node.statements));
|
|
@@ -86621,7 +86879,7 @@ var ts;
|
|
|
86621
86879
|
function transformUMDModule(node) {
|
|
86622
86880
|
var _a = collectAsynchronousDependencies(node, false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
|
|
86623
86881
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
86624
|
-
var umdHeader = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
86882
|
+
var umdHeader = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, "factory")], undefined, ts.setTextRange(factory.createBlock([
|
|
86625
86883
|
factory.createIfStatement(factory.createLogicalAnd(factory.createTypeCheck(factory.createIdentifier("module"), "object"), factory.createTypeCheck(factory.createPropertyAccessExpression(factory.createIdentifier("module"), "exports"), "object")), factory.createBlock([
|
|
86626
86884
|
factory.createVariableStatement(undefined, [
|
|
86627
86885
|
factory.createVariableDeclaration("v", undefined, undefined, factory.createCallExpression(factory.createIdentifier("factory"), undefined, [
|
|
@@ -86643,8 +86901,8 @@ var ts;
|
|
|
86643
86901
|
var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
|
|
86644
86902
|
factory.createExpressionStatement(factory.createCallExpression(umdHeader, undefined, [
|
|
86645
86903
|
factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
|
|
86646
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86647
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86904
|
+
factory.createParameterDeclaration(undefined, undefined, "require"),
|
|
86905
|
+
factory.createParameterDeclaration(undefined, undefined, "exports")
|
|
86648
86906
|
], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
|
|
86649
86907
|
]))
|
|
86650
86908
|
]), node.statements));
|
|
@@ -86659,7 +86917,7 @@ var ts;
|
|
|
86659
86917
|
var amdDependency = _a[_i];
|
|
86660
86918
|
if (amdDependency.name) {
|
|
86661
86919
|
aliasedModuleNames.push(factory.createStringLiteral(amdDependency.path));
|
|
86662
|
-
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined,
|
|
86920
|
+
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined, amdDependency.name));
|
|
86663
86921
|
}
|
|
86664
86922
|
else {
|
|
86665
86923
|
unaliasedModuleNames.push(factory.createStringLiteral(amdDependency.path));
|
|
@@ -86673,7 +86931,7 @@ var ts;
|
|
|
86673
86931
|
if (includeNonAmdDependencies && importAliasName) {
|
|
86674
86932
|
ts.setEmitFlags(importAliasName, 4);
|
|
86675
86933
|
aliasedModuleNames.push(externalModuleName);
|
|
86676
|
-
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined,
|
|
86934
|
+
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined, importAliasName));
|
|
86677
86935
|
}
|
|
86678
86936
|
else {
|
|
86679
86937
|
unaliasedModuleNames.push(externalModuleName);
|
|
@@ -86927,8 +87185,8 @@ var ts;
|
|
|
86927
87185
|
var resolve = factory.createUniqueName("resolve");
|
|
86928
87186
|
var reject = factory.createUniqueName("reject");
|
|
86929
87187
|
var parameters = [
|
|
86930
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86931
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87188
|
+
factory.createParameterDeclaration(undefined, undefined, resolve),
|
|
87189
|
+
factory.createParameterDeclaration(undefined, undefined, reject)
|
|
86932
87190
|
];
|
|
86933
87191
|
var body = factory.createBlock([
|
|
86934
87192
|
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("require"), undefined, [factory.createArrayLiteralExpression([arg || factory.createOmittedExpression()]), resolve, reject]))
|
|
@@ -87115,7 +87373,7 @@ var ts;
|
|
|
87115
87373
|
function visitFunctionDeclaration(node) {
|
|
87116
87374
|
var statements;
|
|
87117
87375
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87118
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(
|
|
87376
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor), undefined, ts.visitEachChild(node.body, visitor, context)), node), node));
|
|
87119
87377
|
}
|
|
87120
87378
|
else {
|
|
87121
87379
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87132,7 +87390,7 @@ var ts;
|
|
|
87132
87390
|
function visitClassDeclaration(node) {
|
|
87133
87391
|
var statements;
|
|
87134
87392
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87135
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(
|
|
87393
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, visitor), ts.visitNodes(node.members, visitor)), node), node));
|
|
87136
87394
|
}
|
|
87137
87395
|
else {
|
|
87138
87396
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87545,8 +87803,8 @@ var ts;
|
|
|
87545
87803
|
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
|
|
87546
87804
|
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
|
|
87547
87805
|
var moduleBodyFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [
|
|
87548
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87549
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87806
|
+
factory.createParameterDeclaration(undefined, undefined, exportFunction),
|
|
87807
|
+
factory.createParameterDeclaration(undefined, undefined, contextObject)
|
|
87550
87808
|
], undefined, moduleBodyBlock);
|
|
87551
87809
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
87552
87810
|
var dependencies = factory.createArrayLiteralExpression(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
|
|
@@ -87662,7 +87920,7 @@ var ts;
|
|
|
87662
87920
|
if (localNames) {
|
|
87663
87921
|
condition = factory.createLogicalAnd(condition, factory.createLogicalNot(factory.createCallExpression(factory.createPropertyAccessExpression(localNames, "hasOwnProperty"), undefined, [n])));
|
|
87664
87922
|
}
|
|
87665
|
-
return factory.createFunctionDeclaration(undefined, undefined,
|
|
87923
|
+
return factory.createFunctionDeclaration(undefined, undefined, exportStarFunction, undefined, [factory.createParameterDeclaration(undefined, undefined, m)], undefined, factory.createBlock([
|
|
87666
87924
|
factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
87667
87925
|
factory.createVariableDeclaration(exports, undefined, undefined, factory.createObjectLiteralExpression([]))
|
|
87668
87926
|
])),
|
|
@@ -87717,7 +87975,7 @@ var ts;
|
|
|
87717
87975
|
break;
|
|
87718
87976
|
}
|
|
87719
87977
|
}
|
|
87720
|
-
setters.push(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
87978
|
+
setters.push(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, factory.createBlock(statements, true)));
|
|
87721
87979
|
}
|
|
87722
87980
|
return factory.createArrayLiteralExpression(setters, true);
|
|
87723
87981
|
}
|
|
@@ -87782,7 +88040,7 @@ var ts;
|
|
|
87782
88040
|
}
|
|
87783
88041
|
function visitFunctionDeclaration(node) {
|
|
87784
88042
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87785
|
-
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node,
|
|
88043
|
+
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)));
|
|
87786
88044
|
}
|
|
87787
88045
|
else {
|
|
87788
88046
|
hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87800,7 +88058,7 @@ var ts;
|
|
|
87800
88058
|
var statements;
|
|
87801
88059
|
var name = factory.getLocalName(node);
|
|
87802
88060
|
hoistVariableDeclaration(name);
|
|
87803
|
-
statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.
|
|
88061
|
+
statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement)), node))), node));
|
|
87804
88062
|
if (hasAssociatedEndOfDeclarationMarker(node)) {
|
|
87805
88063
|
var id = ts.getOriginalNodeId(node);
|
|
87806
88064
|
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
|
|
@@ -88485,7 +88743,7 @@ var ts;
|
|
|
88485
88743
|
}
|
|
88486
88744
|
if (!importRequireStatements) {
|
|
88487
88745
|
var createRequireName = factory.createUniqueName("_createRequire", 16 | 32);
|
|
88488
|
-
var importStatement = factory.createImportDeclaration(undefined,
|
|
88746
|
+
var importStatement = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([
|
|
88489
88747
|
factory.createImportSpecifier(false, factory.createIdentifier("createRequire"), createRequireName)
|
|
88490
88748
|
])), factory.createStringLiteral("module"));
|
|
88491
88749
|
var requireHelperName = factory.createUniqueName("__require", 16 | 32);
|
|
@@ -88511,7 +88769,7 @@ var ts;
|
|
|
88511
88769
|
}
|
|
88512
88770
|
function appendExportsOfImportEqualsDeclaration(statements, node) {
|
|
88513
88771
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
88514
|
-
statements = ts.append(statements, factory.createExportDeclaration(undefined,
|
|
88772
|
+
statements = ts.append(statements, factory.createExportDeclaration(undefined, node.isTypeOnly, factory.createNamedExports([factory.createExportSpecifier(false, undefined, ts.idText(node.name))])));
|
|
88515
88773
|
}
|
|
88516
88774
|
return statements;
|
|
88517
88775
|
}
|
|
@@ -88527,9 +88785,9 @@ var ts;
|
|
|
88527
88785
|
}
|
|
88528
88786
|
var oldIdentifier = node.exportClause.name;
|
|
88529
88787
|
var synthName = factory.getGeneratedNameForNode(oldIdentifier);
|
|
88530
|
-
var importDecl = factory.createImportDeclaration(undefined,
|
|
88788
|
+
var importDecl = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamespaceImport(synthName)), node.moduleSpecifier, node.assertClause);
|
|
88531
88789
|
ts.setOriginalNode(importDecl, node.exportClause);
|
|
88532
|
-
var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined,
|
|
88790
|
+
var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined, false, factory.createNamedExports([factory.createExportSpecifier(false, synthName, oldIdentifier)]));
|
|
88533
88791
|
ts.setOriginalNode(exportDecl, node);
|
|
88534
88792
|
return [importDecl, exportDecl];
|
|
88535
88793
|
}
|
|
@@ -88755,7 +89013,7 @@ var ts;
|
|
|
88755
89013
|
return getTypeAliasDeclarationVisibilityError;
|
|
88756
89014
|
}
|
|
88757
89015
|
else {
|
|
88758
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.
|
|
89016
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.Debug.formatSyntaxKind(node.kind));
|
|
88759
89017
|
}
|
|
88760
89018
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
88761
89019
|
if (node.kind === 254 || node.kind === 203) {
|
|
@@ -88952,7 +89210,7 @@ var ts;
|
|
|
88952
89210
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
88953
89211
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
88954
89212
|
default:
|
|
88955
|
-
return ts.Debug.fail("Unknown parent for parameter: " + ts.
|
|
89213
|
+
return ts.Debug.fail("Unknown parent for parameter: " + ts.Debug.formatSyntaxKind(node.parent.kind));
|
|
88956
89214
|
}
|
|
88957
89215
|
}
|
|
88958
89216
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -89269,7 +89527,7 @@ var ts;
|
|
|
89269
89527
|
resultHasExternalModuleIndicator = false;
|
|
89270
89528
|
needsDeclare = false;
|
|
89271
89529
|
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
89272
|
-
var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([
|
|
89530
|
+
var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([factory.createModifier(135)], factory.createStringLiteral(ts.getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory.createModuleBlock(ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)))], true, [], [], false, []);
|
|
89273
89531
|
return newFile;
|
|
89274
89532
|
}
|
|
89275
89533
|
needsDeclare = true;
|
|
@@ -89429,7 +89687,7 @@ var ts;
|
|
|
89429
89687
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
89430
89688
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p);
|
|
89431
89689
|
}
|
|
89432
|
-
var newParam = factory.updateParameterDeclaration(p,
|
|
89690
|
+
var newParam = factory.updateParameterDeclaration(p, maskModifiers(p, modifierMask), p.dotDotDotToken, filterBindingPatternInitializers(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(57)) : undefined, ensureType(p, type || p.type, true), ensureNoInitializer(p));
|
|
89433
89691
|
if (!suppressNewDiagnosticContexts) {
|
|
89434
89692
|
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
89435
89693
|
}
|
|
@@ -89475,7 +89733,7 @@ var ts;
|
|
|
89475
89733
|
if (node.kind === 164
|
|
89476
89734
|
|| node.kind === 167
|
|
89477
89735
|
|| node.kind === 166) {
|
|
89478
|
-
if (!node.initializer)
|
|
89736
|
+
if (ts.isPropertySignature(node) || !node.initializer)
|
|
89479
89737
|
return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType));
|
|
89480
89738
|
return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker));
|
|
89481
89739
|
}
|
|
@@ -89557,7 +89815,7 @@ var ts;
|
|
|
89557
89815
|
}
|
|
89558
89816
|
}
|
|
89559
89817
|
if (!newValueParameter) {
|
|
89560
|
-
newValueParameter = factory.createParameterDeclaration(undefined, undefined,
|
|
89818
|
+
newValueParameter = factory.createParameterDeclaration(undefined, undefined, "value");
|
|
89561
89819
|
}
|
|
89562
89820
|
newParams = ts.append(newParams, newValueParameter);
|
|
89563
89821
|
}
|
|
@@ -89612,7 +89870,7 @@ var ts;
|
|
|
89612
89870
|
return;
|
|
89613
89871
|
if (decl.moduleReference.kind === 277) {
|
|
89614
89872
|
var specifier = ts.getExternalModuleImportEqualsDeclarationExpression(decl);
|
|
89615
|
-
return factory.updateImportEqualsDeclaration(decl,
|
|
89873
|
+
return factory.updateImportEqualsDeclaration(decl, decl.modifiers, decl.isTypeOnly, decl.name, factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)));
|
|
89616
89874
|
}
|
|
89617
89875
|
else {
|
|
89618
89876
|
var oldDiag = getSymbolAccessibilityDiagnostic;
|
|
@@ -89624,22 +89882,22 @@ var ts;
|
|
|
89624
89882
|
}
|
|
89625
89883
|
function transformImportDeclaration(decl) {
|
|
89626
89884
|
if (!decl.importClause) {
|
|
89627
|
-
return factory.updateImportDeclaration(decl,
|
|
89885
|
+
return factory.updateImportDeclaration(decl, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89628
89886
|
}
|
|
89629
89887
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
89630
89888
|
if (!decl.importClause.namedBindings) {
|
|
89631
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl,
|
|
89889
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89632
89890
|
}
|
|
89633
89891
|
if (decl.importClause.namedBindings.kind === 268) {
|
|
89634
89892
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
89635
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl,
|
|
89893
|
+
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined;
|
|
89636
89894
|
}
|
|
89637
89895
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
89638
89896
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
89639
|
-
return factory.updateImportDeclaration(decl,
|
|
89897
|
+
return factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89640
89898
|
}
|
|
89641
89899
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
89642
|
-
return factory.updateImportDeclaration(decl,
|
|
89900
|
+
return factory.updateImportDeclaration(decl, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89643
89901
|
}
|
|
89644
89902
|
}
|
|
89645
89903
|
function getResolutionModeOverrideForClauseInNightly(assertClause) {
|
|
@@ -89656,7 +89914,7 @@ var ts;
|
|
|
89656
89914
|
while (ts.length(lateMarkedStatements)) {
|
|
89657
89915
|
var i = lateMarkedStatements.shift();
|
|
89658
89916
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
89659
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " +
|
|
89917
|
+
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " + ts.Debug.formatSyntaxKind(i.kind));
|
|
89660
89918
|
}
|
|
89661
89919
|
var priorNeedsDeclare = needsDeclare;
|
|
89662
89920
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -89712,7 +89970,7 @@ var ts;
|
|
|
89712
89970
|
if (ts.hasEffectiveModifier(input, 8)) {
|
|
89713
89971
|
if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input)
|
|
89714
89972
|
return;
|
|
89715
|
-
return cleanup(factory.createPropertyDeclaration(
|
|
89973
|
+
return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, undefined, undefined, undefined));
|
|
89716
89974
|
}
|
|
89717
89975
|
}
|
|
89718
89976
|
if (canProduceDiagnostic && !suppressNewDiagnosticContexts) {
|
|
@@ -89741,14 +89999,14 @@ var ts;
|
|
|
89741
89999
|
case 175:
|
|
89742
90000
|
return cleanup(factory.updateConstructSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
|
|
89743
90001
|
case 171: {
|
|
89744
|
-
var ctor = factory.createConstructorDeclaration(
|
|
90002
|
+
var ctor = factory.createConstructorDeclaration(ensureModifiers(input), updateParamsList(input, input.parameters, 0), undefined);
|
|
89745
90003
|
return cleanup(ctor);
|
|
89746
90004
|
}
|
|
89747
90005
|
case 169: {
|
|
89748
90006
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89749
90007
|
return cleanup(undefined);
|
|
89750
90008
|
}
|
|
89751
|
-
var sig = factory.createMethodDeclaration(
|
|
90009
|
+
var sig = factory.createMethodDeclaration(ensureModifiers(input), undefined, input.name, input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined);
|
|
89752
90010
|
return cleanup(sig);
|
|
89753
90011
|
}
|
|
89754
90012
|
case 172: {
|
|
@@ -89756,19 +90014,19 @@ var ts;
|
|
|
89756
90014
|
return cleanup(undefined);
|
|
89757
90015
|
}
|
|
89758
90016
|
var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input));
|
|
89759
|
-
return cleanup(factory.updateGetAccessorDeclaration(input,
|
|
90017
|
+
return cleanup(factory.updateGetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), ensureType(input, accessorType), undefined));
|
|
89760
90018
|
}
|
|
89761
90019
|
case 173: {
|
|
89762
90020
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89763
90021
|
return cleanup(undefined);
|
|
89764
90022
|
}
|
|
89765
|
-
return cleanup(factory.updateSetAccessorDeclaration(input,
|
|
90023
|
+
return cleanup(factory.updateSetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), undefined));
|
|
89766
90024
|
}
|
|
89767
90025
|
case 167:
|
|
89768
90026
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89769
90027
|
return cleanup(undefined);
|
|
89770
90028
|
}
|
|
89771
|
-
return cleanup(factory.updatePropertyDeclaration(input,
|
|
90029
|
+
return cleanup(factory.updatePropertyDeclaration(input, ensureModifiers(input), input.name, input.questionToken, ensureType(input, input.type), ensureNoInitializer(input)));
|
|
89772
90030
|
case 166:
|
|
89773
90031
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89774
90032
|
return cleanup(undefined);
|
|
@@ -89784,7 +90042,7 @@ var ts;
|
|
|
89784
90042
|
return cleanup(factory.updateCallSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
|
|
89785
90043
|
}
|
|
89786
90044
|
case 176: {
|
|
89787
|
-
return cleanup(factory.updateIndexSignature(input,
|
|
90045
|
+
return cleanup(factory.updateIndexSignature(input, ensureModifiers(input), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree) || factory.createKeywordTypeNode(130)));
|
|
89788
90046
|
}
|
|
89789
90047
|
case 254: {
|
|
89790
90048
|
if (ts.isBindingPattern(input.name)) {
|
|
@@ -89821,7 +90079,7 @@ var ts;
|
|
|
89821
90079
|
return cleanup(input);
|
|
89822
90080
|
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.assertions, input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
89823
90081
|
}
|
|
89824
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.
|
|
90082
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.Debug.formatSyntaxKind(input.kind));
|
|
89825
90083
|
}
|
|
89826
90084
|
}
|
|
89827
90085
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -89862,7 +90120,7 @@ var ts;
|
|
|
89862
90120
|
resultHasExternalModuleIndicator = true;
|
|
89863
90121
|
}
|
|
89864
90122
|
resultHasScopeMarker = true;
|
|
89865
|
-
return factory.updateExportDeclaration(input,
|
|
90123
|
+
return factory.updateExportDeclaration(input, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
|
|
89866
90124
|
}
|
|
89867
90125
|
case 271: {
|
|
89868
90126
|
if (ts.isSourceFile(input.parent)) {
|
|
@@ -89884,7 +90142,7 @@ var ts;
|
|
|
89884
90142
|
var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135)] : [], factory.createVariableDeclarationList([varDecl], 2));
|
|
89885
90143
|
preserveJsDoc(statement, input);
|
|
89886
90144
|
ts.removeAllComments(input);
|
|
89887
|
-
return [statement, factory.updateExportAssignment(input, input.
|
|
90145
|
+
return [statement, factory.updateExportAssignment(input, input.modifiers, newId)];
|
|
89888
90146
|
}
|
|
89889
90147
|
}
|
|
89890
90148
|
}
|
|
@@ -89896,7 +90154,7 @@ var ts;
|
|
|
89896
90154
|
if (ts.isImportEqualsDeclaration(statement) || ts.hasEffectiveModifier(statement, 512) || !ts.canHaveModifiers(statement)) {
|
|
89897
90155
|
return statement;
|
|
89898
90156
|
}
|
|
89899
|
-
var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (
|
|
90157
|
+
var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (257023 ^ 1));
|
|
89900
90158
|
return factory.updateModifiers(statement, modifiers);
|
|
89901
90159
|
}
|
|
89902
90160
|
function transformTopLevelDeclaration(input) {
|
|
@@ -89931,15 +90189,15 @@ var ts;
|
|
|
89931
90189
|
var previousNeedsDeclare = needsDeclare;
|
|
89932
90190
|
switch (input.kind) {
|
|
89933
90191
|
case 259:
|
|
89934
|
-
return cleanup(factory.updateTypeAliasDeclaration(input,
|
|
90192
|
+
return cleanup(factory.updateTypeAliasDeclaration(input, ensureModifiers(input), input.name, ts.visitNodes(input.typeParameters, visitDeclarationSubtree, ts.isTypeParameterDeclaration), ts.visitNode(input.type, visitDeclarationSubtree, ts.isTypeNode)));
|
|
89935
90193
|
case 258: {
|
|
89936
|
-
return cleanup(factory.updateInterfaceDeclaration(input,
|
|
90194
|
+
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
|
|
89937
90195
|
}
|
|
89938
90196
|
case 256: {
|
|
89939
|
-
var clean = cleanup(factory.updateFunctionDeclaration(input,
|
|
90197
|
+
var clean = cleanup(factory.updateFunctionDeclaration(input, ensureModifiers(input), undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined));
|
|
89940
90198
|
if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
|
|
89941
90199
|
var props = resolver.getPropertiesOfContainerFunction(input);
|
|
89942
|
-
var fakespace_1 = ts.parseNodeFactory.createModuleDeclaration(undefined,
|
|
90200
|
+
var fakespace_1 = ts.parseNodeFactory.createModuleDeclaration(undefined, clean.name || factory.createIdentifier("_default"), factory.createModuleBlock([]), 16);
|
|
89943
90201
|
ts.setParent(fakespace_1, enclosingDeclaration);
|
|
89944
90202
|
fakespace_1.locals = ts.createSymbolTable(props);
|
|
89945
90203
|
fakespace_1.symbol = props[0].parent;
|
|
@@ -89964,19 +90222,19 @@ var ts;
|
|
|
89964
90222
|
declarations = ts.mapDefined(declarations, function (declaration) { return factory.updateModifiers(declaration, 0); });
|
|
89965
90223
|
}
|
|
89966
90224
|
else {
|
|
89967
|
-
declarations.push(factory.createExportDeclaration(undefined,
|
|
90225
|
+
declarations.push(factory.createExportDeclaration(undefined, false, factory.createNamedExports(ts.map(exportMappings_1, function (_a) {
|
|
89968
90226
|
var gen = _a[0], exp = _a[1];
|
|
89969
90227
|
return factory.createExportSpecifier(false, gen, exp);
|
|
89970
90228
|
}))));
|
|
89971
90229
|
}
|
|
89972
|
-
var namespaceDecl = factory.createModuleDeclaration(
|
|
90230
|
+
var namespaceDecl = factory.createModuleDeclaration(ensureModifiers(input), input.name, factory.createModuleBlock(declarations), 16);
|
|
89973
90231
|
if (!ts.hasEffectiveModifier(clean, 512)) {
|
|
89974
90232
|
return [clean, namespaceDecl];
|
|
89975
90233
|
}
|
|
89976
90234
|
var modifiers = factory.createModifiersFromModifierFlags((ts.getEffectiveModifierFlags(clean) & ~513) | 2);
|
|
89977
|
-
var cleanDeclaration = factory.updateFunctionDeclaration(clean,
|
|
89978
|
-
var namespaceDeclaration = factory.updateModuleDeclaration(namespaceDecl,
|
|
89979
|
-
var exportDefaultDeclaration = factory.createExportAssignment(undefined,
|
|
90235
|
+
var cleanDeclaration = factory.updateFunctionDeclaration(clean, modifiers, undefined, clean.name, clean.typeParameters, clean.parameters, clean.type, undefined);
|
|
90236
|
+
var namespaceDeclaration = factory.updateModuleDeclaration(namespaceDecl, modifiers, namespaceDecl.name, namespaceDecl.body);
|
|
90237
|
+
var exportDefaultDeclaration = factory.createExportAssignment(undefined, false, namespaceDecl.name);
|
|
89980
90238
|
if (ts.isSourceFile(input.parent)) {
|
|
89981
90239
|
resultHasExternalModuleIndicator = true;
|
|
89982
90240
|
}
|
|
@@ -90013,7 +90271,7 @@ var ts;
|
|
|
90013
90271
|
needsScopeFixMarker = oldNeedsScopeFix;
|
|
90014
90272
|
resultHasScopeMarker = oldHasScopeFix;
|
|
90015
90273
|
var mods = ensureModifiers(input);
|
|
90016
|
-
return cleanup(factory.updateModuleDeclaration(input,
|
|
90274
|
+
return cleanup(factory.updateModuleDeclaration(input, mods, ts.isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, body));
|
|
90017
90275
|
}
|
|
90018
90276
|
else {
|
|
90019
90277
|
needsDeclare = previousNeedsDeclare;
|
|
@@ -90023,7 +90281,7 @@ var ts;
|
|
|
90023
90281
|
var id = ts.getOriginalNodeId(inner);
|
|
90024
90282
|
var body = lateStatementReplacementMap.get(id);
|
|
90025
90283
|
lateStatementReplacementMap.delete(id);
|
|
90026
|
-
return cleanup(factory.updateModuleDeclaration(input,
|
|
90284
|
+
return cleanup(factory.updateModuleDeclaration(input, mods, input.name, body));
|
|
90027
90285
|
}
|
|
90028
90286
|
}
|
|
90029
90287
|
case 257: {
|
|
@@ -90040,7 +90298,7 @@ var ts;
|
|
|
90040
90298
|
return;
|
|
90041
90299
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(param);
|
|
90042
90300
|
if (param.name.kind === 79) {
|
|
90043
|
-
return preserveJsDoc(factory.createPropertyDeclaration(
|
|
90301
|
+
return preserveJsDoc(factory.createPropertyDeclaration(ensureModifiers(param), param.name, param.questionToken, ensureType(param, param.type), ensureNoInitializer(param)), param);
|
|
90044
90302
|
}
|
|
90045
90303
|
else {
|
|
90046
90304
|
return walkBindingPattern(param.name);
|
|
@@ -90055,7 +90313,7 @@ var ts;
|
|
|
90055
90313
|
elems = ts.concatenate(elems, walkBindingPattern(elem.name));
|
|
90056
90314
|
}
|
|
90057
90315
|
elems = elems || [];
|
|
90058
|
-
elems.push(factory.createPropertyDeclaration(
|
|
90316
|
+
elems.push(factory.createPropertyDeclaration(ensureModifiers(param), elem.name, undefined, ensureType(elem, undefined), undefined));
|
|
90059
90317
|
}
|
|
90060
90318
|
return elems;
|
|
90061
90319
|
}
|
|
@@ -90064,7 +90322,7 @@ var ts;
|
|
|
90064
90322
|
}
|
|
90065
90323
|
var hasPrivateIdentifier = ts.some(input.members, function (member) { return !!member.name && ts.isPrivateIdentifier(member.name); });
|
|
90066
90324
|
var privateIdentifier = hasPrivateIdentifier ? [
|
|
90067
|
-
factory.createPropertyDeclaration(undefined,
|
|
90325
|
+
factory.createPropertyDeclaration(undefined, factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)
|
|
90068
90326
|
] : undefined;
|
|
90069
90327
|
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
90070
90328
|
var members = factory.createNodeArray(memberNodes);
|
|
@@ -90089,18 +90347,18 @@ var ts;
|
|
|
90089
90347
|
}
|
|
90090
90348
|
return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104; })), visitDeclarationSubtree));
|
|
90091
90349
|
}));
|
|
90092
|
-
return [statement, cleanup(factory.updateClassDeclaration(input,
|
|
90350
|
+
return [statement, cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members))];
|
|
90093
90351
|
}
|
|
90094
90352
|
else {
|
|
90095
90353
|
var heritageClauses = transformHeritageClauses(input.heritageClauses);
|
|
90096
|
-
return cleanup(factory.updateClassDeclaration(input,
|
|
90354
|
+
return cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members));
|
|
90097
90355
|
}
|
|
90098
90356
|
}
|
|
90099
90357
|
case 237: {
|
|
90100
90358
|
return cleanup(transformVariableStatement(input));
|
|
90101
90359
|
}
|
|
90102
90360
|
case 260: {
|
|
90103
|
-
return cleanup(factory.updateEnumDeclaration(input,
|
|
90361
|
+
return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(ts.mapDefined(input.members, function (m) {
|
|
90104
90362
|
if (shouldStripInternal(m))
|
|
90105
90363
|
return;
|
|
90106
90364
|
var constValue = resolver.getConstantValue(m);
|
|
@@ -90108,7 +90366,7 @@ var ts;
|
|
|
90108
90366
|
}))));
|
|
90109
90367
|
}
|
|
90110
90368
|
}
|
|
90111
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.
|
|
90369
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.Debug.formatSyntaxKind(input.kind));
|
|
90112
90370
|
function cleanup(node) {
|
|
90113
90371
|
if (isEnclosingDeclaration(input)) {
|
|
90114
90372
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -90182,12 +90440,12 @@ var ts;
|
|
|
90182
90440
|
var currentFlags = ts.getEffectiveModifierFlags(node);
|
|
90183
90441
|
var newFlags = ensureModifierFlags(node);
|
|
90184
90442
|
if (currentFlags === newFlags) {
|
|
90185
|
-
return node.modifiers;
|
|
90443
|
+
return ts.visitArray(node.modifiers, function (n) { return ts.tryCast(n, ts.isModifier); }, ts.isModifier);
|
|
90186
90444
|
}
|
|
90187
90445
|
return factory.createModifiersFromModifierFlags(newFlags);
|
|
90188
90446
|
}
|
|
90189
90447
|
function ensureModifierFlags(node) {
|
|
90190
|
-
var mask =
|
|
90448
|
+
var mask = 257023 ^ (4 | 256 | 16384);
|
|
90191
90449
|
var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
|
|
90192
90450
|
var parentIsFile = node.parent.kind === 305;
|
|
90193
90451
|
if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
|
|
@@ -90225,7 +90483,7 @@ var ts;
|
|
|
90225
90483
|
return ts.factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
|
|
90226
90484
|
}
|
|
90227
90485
|
function maskModifierFlags(node, modifierMask, modifierAdditions) {
|
|
90228
|
-
if (modifierMask === void 0) { modifierMask =
|
|
90486
|
+
if (modifierMask === void 0) { modifierMask = 257023 ^ 4; }
|
|
90229
90487
|
if (modifierAdditions === void 0) { modifierAdditions = 0; }
|
|
90230
90488
|
var flags = (ts.getEffectiveModifierFlags(node) & modifierMask) | modifierAdditions;
|
|
90231
90489
|
if (flags & 512 && !(flags & 1)) {
|
|
@@ -92418,8 +92676,7 @@ var ts;
|
|
|
92418
92676
|
}
|
|
92419
92677
|
}
|
|
92420
92678
|
function emitParameter(node) {
|
|
92421
|
-
|
|
92422
|
-
emitModifiers(node, node.modifiers);
|
|
92679
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92423
92680
|
emit(node.dotDotDotToken);
|
|
92424
92681
|
emitNodeWithWriter(node.name, writeParameter);
|
|
92425
92682
|
emit(node.questionToken);
|
|
@@ -92429,14 +92686,13 @@ var ts;
|
|
|
92429
92686
|
else {
|
|
92430
92687
|
emitTypeAnnotation(node.type);
|
|
92431
92688
|
}
|
|
92432
|
-
emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.
|
|
92689
|
+
emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.pos, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
|
|
92433
92690
|
}
|
|
92434
92691
|
function emitDecorator(decorator) {
|
|
92435
92692
|
writePunctuation("@");
|
|
92436
92693
|
emitExpression(decorator.expression, parenthesizer.parenthesizeLeftSideOfAccess);
|
|
92437
92694
|
}
|
|
92438
92695
|
function emitPropertySignature(node) {
|
|
92439
|
-
emitDecorators(node, node.decorators);
|
|
92440
92696
|
emitModifiers(node, node.modifiers);
|
|
92441
92697
|
emitNodeWithWriter(node.name, writeProperty);
|
|
92442
92698
|
emit(node.questionToken);
|
|
@@ -92444,8 +92700,7 @@ var ts;
|
|
|
92444
92700
|
writeTrailingSemicolon();
|
|
92445
92701
|
}
|
|
92446
92702
|
function emitPropertyDeclaration(node) {
|
|
92447
|
-
|
|
92448
|
-
emitModifiers(node, node.modifiers);
|
|
92703
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92449
92704
|
emit(node.name);
|
|
92450
92705
|
emit(node.questionToken);
|
|
92451
92706
|
emit(node.exclamationToken);
|
|
@@ -92455,7 +92710,6 @@ var ts;
|
|
|
92455
92710
|
}
|
|
92456
92711
|
function emitMethodSignature(node) {
|
|
92457
92712
|
pushNameGenerationScope(node);
|
|
92458
|
-
emitDecorators(node, node.decorators);
|
|
92459
92713
|
emitModifiers(node, node.modifiers);
|
|
92460
92714
|
emit(node.name);
|
|
92461
92715
|
emit(node.questionToken);
|
|
@@ -92466,16 +92720,13 @@ var ts;
|
|
|
92466
92720
|
popNameGenerationScope(node);
|
|
92467
92721
|
}
|
|
92468
92722
|
function emitMethodDeclaration(node) {
|
|
92469
|
-
|
|
92470
|
-
emitModifiers(node, node.modifiers);
|
|
92723
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92471
92724
|
emit(node.asteriskToken);
|
|
92472
92725
|
emit(node.name);
|
|
92473
92726
|
emit(node.questionToken);
|
|
92474
92727
|
emitSignatureAndBody(node, emitSignatureHead);
|
|
92475
92728
|
}
|
|
92476
92729
|
function emitClassStaticBlockDeclaration(node) {
|
|
92477
|
-
emitDecorators(node, node.decorators);
|
|
92478
|
-
emitModifiers(node, node.modifiers);
|
|
92479
92730
|
writeKeyword("static");
|
|
92480
92731
|
emitBlockFunctionBody(node.body);
|
|
92481
92732
|
}
|
|
@@ -92485,8 +92736,7 @@ var ts;
|
|
|
92485
92736
|
emitSignatureAndBody(node, emitSignatureHead);
|
|
92486
92737
|
}
|
|
92487
92738
|
function emitAccessorDeclaration(node) {
|
|
92488
|
-
|
|
92489
|
-
emitModifiers(node, node.modifiers);
|
|
92739
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92490
92740
|
writeKeyword(node.kind === 172 ? "get" : "set");
|
|
92491
92741
|
writeSpace();
|
|
92492
92742
|
emit(node.name);
|
|
@@ -92494,8 +92744,6 @@ var ts;
|
|
|
92494
92744
|
}
|
|
92495
92745
|
function emitCallSignature(node) {
|
|
92496
92746
|
pushNameGenerationScope(node);
|
|
92497
|
-
emitDecorators(node, node.decorators);
|
|
92498
|
-
emitModifiers(node, node.modifiers);
|
|
92499
92747
|
emitTypeParameters(node, node.typeParameters);
|
|
92500
92748
|
emitParameters(node, node.parameters);
|
|
92501
92749
|
emitTypeAnnotation(node.type);
|
|
@@ -92504,8 +92752,6 @@ var ts;
|
|
|
92504
92752
|
}
|
|
92505
92753
|
function emitConstructSignature(node) {
|
|
92506
92754
|
pushNameGenerationScope(node);
|
|
92507
|
-
emitDecorators(node, node.decorators);
|
|
92508
|
-
emitModifiers(node, node.modifiers);
|
|
92509
92755
|
writeKeyword("new");
|
|
92510
92756
|
writeSpace();
|
|
92511
92757
|
emitTypeParameters(node, node.typeParameters);
|
|
@@ -92515,7 +92761,6 @@ var ts;
|
|
|
92515
92761
|
popNameGenerationScope(node);
|
|
92516
92762
|
}
|
|
92517
92763
|
function emitIndexSignature(node) {
|
|
92518
|
-
emitDecorators(node, node.decorators);
|
|
92519
92764
|
emitModifiers(node, node.modifiers);
|
|
92520
92765
|
emitParametersForIndexSignature(node, node.parameters);
|
|
92521
92766
|
emitTypeAnnotation(node.type);
|
|
@@ -92892,7 +93137,6 @@ var ts;
|
|
|
92892
93137
|
emitFunctionDeclarationOrExpression(node);
|
|
92893
93138
|
}
|
|
92894
93139
|
function emitArrowFunction(node) {
|
|
92895
|
-
emitDecorators(node, node.decorators);
|
|
92896
93140
|
emitModifiers(node, node.modifiers);
|
|
92897
93141
|
emitSignatureAndBody(node, emitArrowFunctionHead);
|
|
92898
93142
|
}
|
|
@@ -93343,7 +93587,6 @@ var ts;
|
|
|
93343
93587
|
emitFunctionDeclarationOrExpression(node);
|
|
93344
93588
|
}
|
|
93345
93589
|
function emitFunctionDeclarationOrExpression(node) {
|
|
93346
|
-
emitDecorators(node, node.decorators);
|
|
93347
93590
|
emitModifiers(node, node.modifiers);
|
|
93348
93591
|
writeKeyword("function");
|
|
93349
93592
|
emit(node.asteriskToken);
|
|
@@ -93395,8 +93638,8 @@ var ts;
|
|
|
93395
93638
|
if (!ts.nodeIsSynthesized(body) && currentSourceFile && !ts.rangeIsOnSingleLine(body, currentSourceFile)) {
|
|
93396
93639
|
return false;
|
|
93397
93640
|
}
|
|
93398
|
-
if (getLeadingLineTerminatorCount(body, body.statements, 2)
|
|
93399
|
-
|| getClosingLineTerminatorCount(body, body.statements, 2)) {
|
|
93641
|
+
if (getLeadingLineTerminatorCount(body, ts.firstOrUndefined(body.statements), 2)
|
|
93642
|
+
|| getClosingLineTerminatorCount(body, ts.lastOrUndefined(body.statements), 2, body.statements)) {
|
|
93400
93643
|
return false;
|
|
93401
93644
|
}
|
|
93402
93645
|
var previousStatement;
|
|
@@ -93443,8 +93686,7 @@ var ts;
|
|
|
93443
93686
|
}
|
|
93444
93687
|
function emitClassDeclarationOrExpression(node) {
|
|
93445
93688
|
ts.forEach(node.members, generateMemberNames);
|
|
93446
|
-
|
|
93447
|
-
emitModifiers(node, node.modifiers);
|
|
93689
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
93448
93690
|
writeKeyword("class");
|
|
93449
93691
|
if (node.name) {
|
|
93450
93692
|
writeSpace();
|
|
@@ -93465,7 +93707,6 @@ var ts;
|
|
|
93465
93707
|
}
|
|
93466
93708
|
}
|
|
93467
93709
|
function emitInterfaceDeclaration(node) {
|
|
93468
|
-
emitDecorators(node, node.decorators);
|
|
93469
93710
|
emitModifiers(node, node.modifiers);
|
|
93470
93711
|
writeKeyword("interface");
|
|
93471
93712
|
writeSpace();
|
|
@@ -93478,7 +93719,6 @@ var ts;
|
|
|
93478
93719
|
writePunctuation("}");
|
|
93479
93720
|
}
|
|
93480
93721
|
function emitTypeAliasDeclaration(node) {
|
|
93481
|
-
emitDecorators(node, node.decorators);
|
|
93482
93722
|
emitModifiers(node, node.modifiers);
|
|
93483
93723
|
writeKeyword("type");
|
|
93484
93724
|
writeSpace();
|
|
@@ -94237,12 +94477,47 @@ var ts;
|
|
|
94237
94477
|
emit(node);
|
|
94238
94478
|
write = savedWrite;
|
|
94239
94479
|
}
|
|
94240
|
-
function
|
|
94241
|
-
if (modifiers
|
|
94242
|
-
|
|
94243
|
-
|
|
94480
|
+
function emitDecoratorsAndModifiers(node, modifiers) {
|
|
94481
|
+
if (modifiers === null || modifiers === void 0 ? void 0 : modifiers.length) {
|
|
94482
|
+
if (ts.every(modifiers, ts.isModifier)) {
|
|
94483
|
+
return emitModifiers(node, modifiers);
|
|
94484
|
+
}
|
|
94485
|
+
if (ts.every(modifiers, ts.isDecorator)) {
|
|
94486
|
+
return emitDecorators(node, modifiers);
|
|
94487
|
+
}
|
|
94488
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(modifiers);
|
|
94489
|
+
var lastMode = void 0;
|
|
94490
|
+
var mode = void 0;
|
|
94491
|
+
var start = 0;
|
|
94492
|
+
var pos = 0;
|
|
94493
|
+
while (start < modifiers.length) {
|
|
94494
|
+
while (pos < modifiers.length) {
|
|
94495
|
+
var modifier = modifiers[pos];
|
|
94496
|
+
mode = ts.isDecorator(modifier) ? "decorators" : "modifiers";
|
|
94497
|
+
if (lastMode === undefined) {
|
|
94498
|
+
lastMode = mode;
|
|
94499
|
+
}
|
|
94500
|
+
else if (mode !== lastMode) {
|
|
94501
|
+
break;
|
|
94502
|
+
}
|
|
94503
|
+
pos++;
|
|
94504
|
+
}
|
|
94505
|
+
var textRange = { pos: -1, end: -1 };
|
|
94506
|
+
if (start === 0)
|
|
94507
|
+
textRange.pos = modifiers.pos;
|
|
94508
|
+
if (pos === modifiers.length - 1)
|
|
94509
|
+
textRange.end = modifiers.end;
|
|
94510
|
+
emitNodeListItems(emit, node, modifiers, lastMode === "modifiers" ? 2359808 : 2146305, undefined, start, pos - start, false, textRange);
|
|
94511
|
+
start = pos;
|
|
94512
|
+
lastMode = mode;
|
|
94513
|
+
pos++;
|
|
94514
|
+
}
|
|
94515
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(modifiers);
|
|
94244
94516
|
}
|
|
94245
94517
|
}
|
|
94518
|
+
function emitModifiers(node, modifiers) {
|
|
94519
|
+
emitList(node, modifiers, 2359808);
|
|
94520
|
+
}
|
|
94246
94521
|
function emitTypeAnnotation(node) {
|
|
94247
94522
|
if (node) {
|
|
94248
94523
|
writePunctuation(":");
|
|
@@ -94320,10 +94595,8 @@ var ts;
|
|
|
94320
94595
|
&& parameter.pos === parentNode.pos
|
|
94321
94596
|
&& ts.isArrowFunction(parentNode)
|
|
94322
94597
|
&& !parentNode.type
|
|
94323
|
-
&& !ts.some(parentNode.decorators)
|
|
94324
94598
|
&& !ts.some(parentNode.modifiers)
|
|
94325
94599
|
&& !ts.some(parentNode.typeParameters)
|
|
94326
|
-
&& !ts.some(parameter.decorators)
|
|
94327
94600
|
&& !ts.some(parameter.modifiers)
|
|
94328
94601
|
&& !parameter.dotDotDotToken
|
|
94329
94602
|
&& !parameter.questionToken
|
|
@@ -94379,12 +94652,8 @@ var ts;
|
|
|
94379
94652
|
}
|
|
94380
94653
|
var isEmpty = children === undefined || start >= children.length || count === 0;
|
|
94381
94654
|
if (isEmpty && format & 32768) {
|
|
94382
|
-
|
|
94383
|
-
|
|
94384
|
-
}
|
|
94385
|
-
if (onAfterEmitNodeArray) {
|
|
94386
|
-
onAfterEmitNodeArray(children);
|
|
94387
|
-
}
|
|
94655
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(children);
|
|
94656
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(children);
|
|
94388
94657
|
return;
|
|
94389
94658
|
}
|
|
94390
94659
|
if (format & 15360) {
|
|
@@ -94393,9 +94662,7 @@ var ts;
|
|
|
94393
94662
|
emitTrailingCommentsOfPosition(children.pos, true);
|
|
94394
94663
|
}
|
|
94395
94664
|
}
|
|
94396
|
-
|
|
94397
|
-
onBeforeEmitNodeArray(children);
|
|
94398
|
-
}
|
|
94665
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(children);
|
|
94399
94666
|
if (isEmpty) {
|
|
94400
94667
|
if (format & 1 && !(preserveSourceNewlines && (!parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile)))) {
|
|
94401
94668
|
writeLine();
|
|
@@ -94405,99 +94672,99 @@ var ts;
|
|
|
94405
94672
|
}
|
|
94406
94673
|
}
|
|
94407
94674
|
else {
|
|
94408
|
-
|
|
94409
|
-
|
|
94410
|
-
|
|
94411
|
-
|
|
94412
|
-
if (
|
|
94413
|
-
|
|
94414
|
-
shouldEmitInterveningComments = false;
|
|
94415
|
-
}
|
|
94416
|
-
else if (format & 256) {
|
|
94417
|
-
writeSpace();
|
|
94675
|
+
emitNodeListItems(emit, parentNode, children, format, parenthesizerRule, start, count, children.hasTrailingComma, children);
|
|
94676
|
+
}
|
|
94677
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(children);
|
|
94678
|
+
if (format & 15360) {
|
|
94679
|
+
if (isEmpty && children) {
|
|
94680
|
+
emitLeadingCommentsOfPosition(children.end);
|
|
94418
94681
|
}
|
|
94419
|
-
|
|
94420
|
-
|
|
94682
|
+
writePunctuation(getClosingBracket(format));
|
|
94683
|
+
}
|
|
94684
|
+
}
|
|
94685
|
+
function emitNodeListItems(emit, parentNode, children, format, parenthesizerRule, start, count, hasTrailingComma, childrenTextRange) {
|
|
94686
|
+
var mayEmitInterveningComments = (format & 262144) === 0;
|
|
94687
|
+
var shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
94688
|
+
var leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children[start], format);
|
|
94689
|
+
if (leadingLineTerminatorCount) {
|
|
94690
|
+
writeLine(leadingLineTerminatorCount);
|
|
94691
|
+
shouldEmitInterveningComments = false;
|
|
94692
|
+
}
|
|
94693
|
+
else if (format & 256) {
|
|
94694
|
+
writeSpace();
|
|
94695
|
+
}
|
|
94696
|
+
if (format & 128) {
|
|
94697
|
+
increaseIndent();
|
|
94698
|
+
}
|
|
94699
|
+
var emitListItem = getEmitListItem(emit, parenthesizerRule);
|
|
94700
|
+
var previousSibling;
|
|
94701
|
+
var previousSourceFileTextKind;
|
|
94702
|
+
var shouldDecreaseIndentAfterEmit = false;
|
|
94703
|
+
for (var i = 0; i < count; i++) {
|
|
94704
|
+
var child = children[start + i];
|
|
94705
|
+
if (format & 32) {
|
|
94706
|
+
writeLine();
|
|
94707
|
+
writeDelimiter(format);
|
|
94421
94708
|
}
|
|
94422
|
-
|
|
94423
|
-
|
|
94424
|
-
|
|
94425
|
-
var shouldDecreaseIndentAfterEmit = false;
|
|
94426
|
-
for (var i = 0; i < count; i++) {
|
|
94427
|
-
var child = children[start + i];
|
|
94428
|
-
if (format & 32) {
|
|
94429
|
-
writeLine();
|
|
94430
|
-
writeDelimiter(format);
|
|
94431
|
-
}
|
|
94432
|
-
else if (previousSibling) {
|
|
94433
|
-
if (format & 60 && previousSibling.end !== (parentNode ? parentNode.end : -1)) {
|
|
94434
|
-
emitLeadingCommentsOfPosition(previousSibling.end);
|
|
94435
|
-
}
|
|
94436
|
-
writeDelimiter(format);
|
|
94437
|
-
recordBundleFileInternalSectionEnd(previousSourceFileTextKind);
|
|
94438
|
-
var separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format);
|
|
94439
|
-
if (separatingLineTerminatorCount > 0) {
|
|
94440
|
-
if ((format & (3 | 128)) === 0) {
|
|
94441
|
-
increaseIndent();
|
|
94442
|
-
shouldDecreaseIndentAfterEmit = true;
|
|
94443
|
-
}
|
|
94444
|
-
writeLine(separatingLineTerminatorCount);
|
|
94445
|
-
shouldEmitInterveningComments = false;
|
|
94446
|
-
}
|
|
94447
|
-
else if (previousSibling && format & 512) {
|
|
94448
|
-
writeSpace();
|
|
94449
|
-
}
|
|
94450
|
-
}
|
|
94451
|
-
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
94452
|
-
if (shouldEmitInterveningComments) {
|
|
94453
|
-
var commentRange = ts.getCommentRange(child);
|
|
94454
|
-
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
94709
|
+
else if (previousSibling) {
|
|
94710
|
+
if (format & 60 && previousSibling.end !== (parentNode ? parentNode.end : -1)) {
|
|
94711
|
+
emitLeadingCommentsOfPosition(previousSibling.end);
|
|
94455
94712
|
}
|
|
94456
|
-
|
|
94457
|
-
|
|
94713
|
+
writeDelimiter(format);
|
|
94714
|
+
recordBundleFileInternalSectionEnd(previousSourceFileTextKind);
|
|
94715
|
+
var separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format);
|
|
94716
|
+
if (separatingLineTerminatorCount > 0) {
|
|
94717
|
+
if ((format & (3 | 128)) === 0) {
|
|
94718
|
+
increaseIndent();
|
|
94719
|
+
shouldDecreaseIndentAfterEmit = true;
|
|
94720
|
+
}
|
|
94721
|
+
writeLine(separatingLineTerminatorCount);
|
|
94722
|
+
shouldEmitInterveningComments = false;
|
|
94458
94723
|
}
|
|
94459
|
-
|
|
94460
|
-
|
|
94461
|
-
if (shouldDecreaseIndentAfterEmit) {
|
|
94462
|
-
decreaseIndent();
|
|
94463
|
-
shouldDecreaseIndentAfterEmit = false;
|
|
94724
|
+
else if (previousSibling && format & 512) {
|
|
94725
|
+
writeSpace();
|
|
94464
94726
|
}
|
|
94465
|
-
previousSibling = child;
|
|
94466
94727
|
}
|
|
94467
|
-
|
|
94468
|
-
|
|
94469
|
-
|
|
94470
|
-
|
|
94471
|
-
if (previousSibling && !skipTrailingComments) {
|
|
94472
|
-
emitTokenWithComment(27, previousSibling.end, writePunctuation, previousSibling);
|
|
94473
|
-
}
|
|
94474
|
-
else {
|
|
94475
|
-
writePunctuation(",");
|
|
94476
|
-
}
|
|
94728
|
+
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
94729
|
+
if (shouldEmitInterveningComments) {
|
|
94730
|
+
var commentRange = ts.getCommentRange(child);
|
|
94731
|
+
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
94477
94732
|
}
|
|
94478
|
-
|
|
94479
|
-
|
|
94733
|
+
else {
|
|
94734
|
+
shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
94480
94735
|
}
|
|
94481
|
-
|
|
94736
|
+
nextListElementPos = child.pos;
|
|
94737
|
+
emitListItem(child, emit, parenthesizerRule, i);
|
|
94738
|
+
if (shouldDecreaseIndentAfterEmit) {
|
|
94482
94739
|
decreaseIndent();
|
|
94740
|
+
shouldDecreaseIndentAfterEmit = false;
|
|
94483
94741
|
}
|
|
94484
|
-
|
|
94485
|
-
|
|
94486
|
-
|
|
94487
|
-
|
|
94742
|
+
previousSibling = child;
|
|
94743
|
+
}
|
|
94744
|
+
var emitFlags = previousSibling ? ts.getEmitFlags(previousSibling) : 0;
|
|
94745
|
+
var skipTrailingComments = commentsDisabled || !!(emitFlags & 1024);
|
|
94746
|
+
var emitTrailingComma = hasTrailingComma && (format & 64) && (format & 16);
|
|
94747
|
+
if (emitTrailingComma) {
|
|
94748
|
+
if (previousSibling && !skipTrailingComments) {
|
|
94749
|
+
emitTokenWithComment(27, previousSibling.end, writePunctuation, previousSibling);
|
|
94488
94750
|
}
|
|
94489
|
-
else
|
|
94490
|
-
|
|
94751
|
+
else {
|
|
94752
|
+
writePunctuation(",");
|
|
94491
94753
|
}
|
|
94492
94754
|
}
|
|
94493
|
-
if (
|
|
94494
|
-
|
|
94755
|
+
if (previousSibling && (parentNode ? parentNode.end : -1) !== previousSibling.end && (format & 60) && !skipTrailingComments) {
|
|
94756
|
+
emitLeadingCommentsOfPosition(emitTrailingComma && (childrenTextRange === null || childrenTextRange === void 0 ? void 0 : childrenTextRange.end) ? childrenTextRange.end : previousSibling.end);
|
|
94495
94757
|
}
|
|
94496
|
-
if (format &
|
|
94497
|
-
|
|
94498
|
-
|
|
94499
|
-
|
|
94500
|
-
|
|
94758
|
+
if (format & 128) {
|
|
94759
|
+
decreaseIndent();
|
|
94760
|
+
}
|
|
94761
|
+
recordBundleFileInternalSectionEnd(previousSourceFileTextKind);
|
|
94762
|
+
var closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start + count - 1], format, childrenTextRange);
|
|
94763
|
+
if (closingLineTerminatorCount) {
|
|
94764
|
+
writeLine(closingLineTerminatorCount);
|
|
94765
|
+
}
|
|
94766
|
+
else if (format & (2097152 | 256)) {
|
|
94767
|
+
writeSpace();
|
|
94501
94768
|
}
|
|
94502
94769
|
}
|
|
94503
94770
|
function writeLiteral(s) {
|
|
@@ -94621,31 +94888,30 @@ var ts;
|
|
|
94621
94888
|
decreaseIndent();
|
|
94622
94889
|
}
|
|
94623
94890
|
}
|
|
94624
|
-
function getLeadingLineTerminatorCount(parentNode,
|
|
94891
|
+
function getLeadingLineTerminatorCount(parentNode, firstChild, format) {
|
|
94625
94892
|
if (format & 2 || preserveSourceNewlines) {
|
|
94626
94893
|
if (format & 65536) {
|
|
94627
94894
|
return 1;
|
|
94628
94895
|
}
|
|
94629
|
-
|
|
94630
|
-
if (firstChild_1 === undefined) {
|
|
94896
|
+
if (firstChild === undefined) {
|
|
94631
94897
|
return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
|
|
94632
94898
|
}
|
|
94633
|
-
if (
|
|
94899
|
+
if (firstChild.pos === nextListElementPos) {
|
|
94634
94900
|
return 0;
|
|
94635
94901
|
}
|
|
94636
|
-
if (
|
|
94902
|
+
if (firstChild.kind === 11) {
|
|
94637
94903
|
return 0;
|
|
94638
94904
|
}
|
|
94639
94905
|
if (currentSourceFile && parentNode &&
|
|
94640
94906
|
!ts.positionIsSynthesized(parentNode.pos) &&
|
|
94641
|
-
!ts.nodeIsSynthesized(
|
|
94642
|
-
(!
|
|
94907
|
+
!ts.nodeIsSynthesized(firstChild) &&
|
|
94908
|
+
(!firstChild.parent || ts.getOriginalNode(firstChild.parent) === ts.getOriginalNode(parentNode))) {
|
|
94643
94909
|
if (preserveSourceNewlines) {
|
|
94644
|
-
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(
|
|
94910
|
+
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(firstChild.pos, parentNode.pos, currentSourceFile, includeComments); });
|
|
94645
94911
|
}
|
|
94646
|
-
return ts.rangeStartPositionsAreOnSameLine(parentNode,
|
|
94912
|
+
return ts.rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile) ? 0 : 1;
|
|
94647
94913
|
}
|
|
94648
|
-
if (synthesizedNodeStartsOnNewLine(
|
|
94914
|
+
if (synthesizedNodeStartsOnNewLine(firstChild, format)) {
|
|
94649
94915
|
return 1;
|
|
94650
94916
|
}
|
|
94651
94917
|
}
|
|
@@ -94677,18 +94943,17 @@ var ts;
|
|
|
94677
94943
|
}
|
|
94678
94944
|
return format & 1 ? 1 : 0;
|
|
94679
94945
|
}
|
|
94680
|
-
function getClosingLineTerminatorCount(parentNode,
|
|
94946
|
+
function getClosingLineTerminatorCount(parentNode, lastChild, format, childrenTextRange) {
|
|
94681
94947
|
if (format & 2 || preserveSourceNewlines) {
|
|
94682
94948
|
if (format & 65536) {
|
|
94683
94949
|
return 1;
|
|
94684
94950
|
}
|
|
94685
|
-
var lastChild = ts.lastOrUndefined(children);
|
|
94686
94951
|
if (lastChild === undefined) {
|
|
94687
94952
|
return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
|
|
94688
94953
|
}
|
|
94689
94954
|
if (currentSourceFile && parentNode && !ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
|
|
94690
94955
|
if (preserveSourceNewlines) {
|
|
94691
|
-
var end_1 =
|
|
94956
|
+
var end_1 = childrenTextRange && !ts.positionIsSynthesized(childrenTextRange.end) ? childrenTextRange.end : lastChild.end;
|
|
94692
94957
|
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndNextNonWhitespaceCharacter(end_1, parentNode.end, currentSourceFile, includeComments); });
|
|
94693
94958
|
}
|
|
94694
94959
|
return ts.rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile) ? 0 : 1;
|
|
@@ -94711,14 +94976,14 @@ var ts;
|
|
|
94711
94976
|
return lines;
|
|
94712
94977
|
}
|
|
94713
94978
|
function writeLineSeparatorsAndIndentBefore(node, parent) {
|
|
94714
|
-
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent,
|
|
94979
|
+
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, node, 0);
|
|
94715
94980
|
if (leadingNewlines) {
|
|
94716
94981
|
writeLinesAndIndent(leadingNewlines, false);
|
|
94717
94982
|
}
|
|
94718
94983
|
return !!leadingNewlines;
|
|
94719
94984
|
}
|
|
94720
94985
|
function writeLineSeparatorsAfter(node, parent) {
|
|
94721
|
-
var trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(parent,
|
|
94986
|
+
var trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(parent, node, 0, undefined);
|
|
94722
94987
|
if (trailingNewlines) {
|
|
94723
94988
|
writeLine(trailingNewlines);
|
|
94724
94989
|
}
|
|
@@ -97773,7 +98038,7 @@ var ts;
|
|
|
97773
98038
|
}
|
|
97774
98039
|
}
|
|
97775
98040
|
function walkArray(nodes, parent) {
|
|
97776
|
-
if (parent.
|
|
98041
|
+
if (ts.canHaveModifiers(parent) && parent.modifiers === nodes && ts.some(nodes, ts.isDecorator) && !options.experimentalDecorators) {
|
|
97777
98042
|
diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning));
|
|
97778
98043
|
}
|
|
97779
98044
|
switch (parent.kind) {
|
|
@@ -97800,7 +98065,7 @@ var ts;
|
|
|
97800
98065
|
if (nodes === parent.modifiers) {
|
|
97801
98066
|
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
|
|
97802
98067
|
var modifier = _a[_i];
|
|
97803
|
-
if (modifier.kind !== 124) {
|
|
98068
|
+
if (ts.isModifier(modifier) && modifier.kind !== 124) {
|
|
97804
98069
|
diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind)));
|
|
97805
98070
|
}
|
|
97806
98071
|
}
|
|
@@ -97808,7 +98073,7 @@ var ts;
|
|
|
97808
98073
|
}
|
|
97809
98074
|
break;
|
|
97810
98075
|
case 164:
|
|
97811
|
-
if (nodes === parent.modifiers) {
|
|
98076
|
+
if (nodes === parent.modifiers && ts.some(nodes, ts.isModifier)) {
|
|
97812
98077
|
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files));
|
|
97813
98078
|
return "skip";
|
|
97814
98079
|
}
|
|
@@ -97920,7 +98185,7 @@ var ts;
|
|
|
97920
98185
|
}
|
|
97921
98186
|
function createSyntheticImport(text, file) {
|
|
97922
98187
|
var externalHelpersModuleReference = ts.factory.createStringLiteral(text);
|
|
97923
|
-
var importDecl = ts.factory.createImportDeclaration(undefined, undefined,
|
|
98188
|
+
var importDecl = ts.factory.createImportDeclaration(undefined, undefined, externalHelpersModuleReference, undefined);
|
|
97924
98189
|
ts.addEmitFlags(importDecl, 67108864);
|
|
97925
98190
|
ts.setParent(externalHelpersModuleReference, importDecl);
|
|
97926
98191
|
ts.setParent(importDecl, file);
|
|
@@ -105855,6 +106120,7 @@ var ts;
|
|
|
105855
106120
|
}
|
|
105856
106121
|
})(ts || (ts = {}));
|
|
105857
106122
|
// This file actually uses arguments passed on commandline and executes it
|
|
106123
|
+
// enable deprecation logging
|
|
105858
106124
|
ts.Debug.loggingHost = {
|
|
105859
106125
|
log: function (_level, s) {
|
|
105860
106126
|
ts.sys.write("" + (s || "") + ts.sys.newLine);
|