typescript 4.8.0-dev.20220609 → 4.8.0-dev.20220610
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 +5 -2
- package/lib/de/diagnosticMessages.generated.json +5 -2
- package/lib/es/diagnosticMessages.generated.json +5 -2
- package/lib/fr/diagnosticMessages.generated.json +5 -2
- package/lib/it/diagnosticMessages.generated.json +5 -2
- package/lib/ja/diagnosticMessages.generated.json +5 -2
- package/lib/ko/diagnosticMessages.generated.json +5 -2
- package/lib/pl/diagnosticMessages.generated.json +5 -2
- package/lib/pt-br/diagnosticMessages.generated.json +5 -2
- package/lib/ru/diagnosticMessages.generated.json +5 -2
- package/lib/tr/diagnosticMessages.generated.json +5 -2
- package/lib/tsc.js +1088 -834
- package/lib/tsserver.js +2796 -1174
- package/lib/tsserverlibrary.d.ts +501 -100
- package/lib/tsserverlibrary.js +2768 -1173
- package/lib/typescript.d.ts +501 -100
- package/lib/typescript.js +2784 -1173
- package/lib/typescriptServices.d.ts +501 -100
- package/lib/typescriptServices.js +2784 -1173
- package/lib/typingsInstaller.js +1112 -979
- package/lib/zh-cn/diagnosticMessages.generated.json +5 -2
- package/lib/zh-tw/diagnosticMessages.generated.json +5 -2
- 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.20220610";
|
|
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) {
|
|
@@ -2604,6 +2612,7 @@ var ts;
|
|
|
2604
2612
|
warn ? createWarningDeprecation(name, errorAfter, since, options.message) :
|
|
2605
2613
|
ts.noop;
|
|
2606
2614
|
}
|
|
2615
|
+
Debug.createDeprecation = createDeprecation;
|
|
2607
2616
|
function wrapFunction(deprecation, func) {
|
|
2608
2617
|
return function () {
|
|
2609
2618
|
deprecation();
|
|
@@ -2611,7 +2620,8 @@ var ts;
|
|
|
2611
2620
|
};
|
|
2612
2621
|
}
|
|
2613
2622
|
function deprecate(func, options) {
|
|
2614
|
-
var
|
|
2623
|
+
var _a;
|
|
2624
|
+
var deprecation = createDeprecation((_a = options === null || options === void 0 ? void 0 : options.name) !== null && _a !== void 0 ? _a : getFunctionName(func), options);
|
|
2615
2625
|
return wrapFunction(deprecation, func);
|
|
2616
2626
|
}
|
|
2617
2627
|
Debug.deprecate = deprecate;
|
|
@@ -9601,6 +9611,18 @@ var ts;
|
|
|
9601
9611
|
}
|
|
9602
9612
|
}
|
|
9603
9613
|
ts.getAssignedName = getAssignedName;
|
|
9614
|
+
function getDecorators(node) {
|
|
9615
|
+
if (ts.hasDecorators(node)) {
|
|
9616
|
+
return ts.filter(node.modifiers, ts.isDecorator);
|
|
9617
|
+
}
|
|
9618
|
+
}
|
|
9619
|
+
ts.getDecorators = getDecorators;
|
|
9620
|
+
function getModifiers(node) {
|
|
9621
|
+
if (ts.hasSyntacticModifier(node, 125951)) {
|
|
9622
|
+
return ts.filter(node.modifiers, isModifier);
|
|
9623
|
+
}
|
|
9624
|
+
}
|
|
9625
|
+
ts.getModifiers = getModifiers;
|
|
9604
9626
|
function getJSDocParameterTagsWorker(param, noCache) {
|
|
9605
9627
|
if (param.name) {
|
|
9606
9628
|
if (ts.isIdentifier(param.name)) {
|
|
@@ -9805,6 +9827,9 @@ var ts;
|
|
|
9805
9827
|
if (node.typeParameters) {
|
|
9806
9828
|
return node.typeParameters;
|
|
9807
9829
|
}
|
|
9830
|
+
if (ts.canHaveIllegalTypeParameters(node) && node.typeParameters) {
|
|
9831
|
+
return node.typeParameters;
|
|
9832
|
+
}
|
|
9808
9833
|
if (ts.isInJSFile(node)) {
|
|
9809
9834
|
var decls = ts.getJSDocTypeParameterDeclarations(node);
|
|
9810
9835
|
if (decls.length) {
|
|
@@ -10141,6 +10166,10 @@ var ts;
|
|
|
10141
10166
|
}
|
|
10142
10167
|
}
|
|
10143
10168
|
ts.isMethodOrAccessor = isMethodOrAccessor;
|
|
10169
|
+
function isModifierLike(node) {
|
|
10170
|
+
return isModifier(node) || ts.isDecorator(node);
|
|
10171
|
+
}
|
|
10172
|
+
ts.isModifierLike = isModifierLike;
|
|
10144
10173
|
function isTypeElement(node) {
|
|
10145
10174
|
var kind = node.kind;
|
|
10146
10175
|
return kind === 175
|
|
@@ -10664,7 +10693,6 @@ var ts;
|
|
|
10664
10693
|
case 254:
|
|
10665
10694
|
case 164:
|
|
10666
10695
|
case 203:
|
|
10667
|
-
case 166:
|
|
10668
10696
|
case 167:
|
|
10669
10697
|
case 296:
|
|
10670
10698
|
case 299:
|
|
@@ -11137,10 +11165,11 @@ var ts;
|
|
|
11137
11165
|
}
|
|
11138
11166
|
ts.getTokenPosOfNode = getTokenPosOfNode;
|
|
11139
11167
|
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
|
|
11140
|
-
|
|
11168
|
+
var lastDecorator = !nodeIsMissing(node) && ts.canHaveModifiers(node) ? ts.findLast(node.modifiers, ts.isDecorator) : undefined;
|
|
11169
|
+
if (!lastDecorator) {
|
|
11141
11170
|
return getTokenPosOfNode(node, sourceFile);
|
|
11142
11171
|
}
|
|
11143
|
-
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text,
|
|
11172
|
+
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);
|
|
11144
11173
|
}
|
|
11145
11174
|
ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode;
|
|
11146
11175
|
function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) {
|
|
@@ -12392,7 +12421,7 @@ var ts;
|
|
|
12392
12421
|
}
|
|
12393
12422
|
ts.nodeCanBeDecorated = nodeCanBeDecorated;
|
|
12394
12423
|
function nodeIsDecorated(node, parent, grandparent) {
|
|
12395
|
-
return node
|
|
12424
|
+
return hasDecorators(node)
|
|
12396
12425
|
&& nodeCanBeDecorated(node, parent, grandparent);
|
|
12397
12426
|
}
|
|
12398
12427
|
ts.nodeIsDecorated = nodeIsDecorated;
|
|
@@ -14738,6 +14767,10 @@ var ts;
|
|
|
14738
14767
|
return hasEffectiveModifier(node, 64);
|
|
14739
14768
|
}
|
|
14740
14769
|
ts.hasEffectiveReadonlyModifier = hasEffectiveReadonlyModifier;
|
|
14770
|
+
function hasDecorators(node) {
|
|
14771
|
+
return hasSyntacticModifier(node, 131072);
|
|
14772
|
+
}
|
|
14773
|
+
ts.hasDecorators = hasDecorators;
|
|
14741
14774
|
function getSelectedEffectiveModifierFlags(node, flags) {
|
|
14742
14775
|
return getEffectiveModifierFlags(node) & flags;
|
|
14743
14776
|
}
|
|
@@ -14795,7 +14828,7 @@ var ts;
|
|
|
14795
14828
|
}
|
|
14796
14829
|
ts.getEffectiveModifierFlagsNoCache = getEffectiveModifierFlagsNoCache;
|
|
14797
14830
|
function getSyntacticModifierFlagsNoCache(node) {
|
|
14798
|
-
var flags = modifiersToFlags(node.modifiers);
|
|
14831
|
+
var flags = ts.canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0;
|
|
14799
14832
|
if (node.flags & 4 || (node.kind === 79 && node.isInJSDocNamespace)) {
|
|
14800
14833
|
flags |= 1;
|
|
14801
14834
|
}
|
|
@@ -14829,6 +14862,7 @@ var ts;
|
|
|
14829
14862
|
case 159: return 16384;
|
|
14830
14863
|
case 101: return 32768;
|
|
14831
14864
|
case 144: return 65536;
|
|
14865
|
+
case 165: return 131072;
|
|
14832
14866
|
}
|
|
14833
14867
|
return 0;
|
|
14834
14868
|
}
|
|
@@ -15163,14 +15197,16 @@ var ts;
|
|
|
15163
15197
|
}
|
|
15164
15198
|
ts.moveRangePos = moveRangePos;
|
|
15165
15199
|
function moveRangePastDecorators(node) {
|
|
15166
|
-
|
|
15167
|
-
|
|
15200
|
+
var lastDecorator = ts.canHaveModifiers(node) ? ts.findLast(node.modifiers, ts.isDecorator) : undefined;
|
|
15201
|
+
return lastDecorator && !positionIsSynthesized(lastDecorator.end)
|
|
15202
|
+
? moveRangePos(node, lastDecorator.end)
|
|
15168
15203
|
: node;
|
|
15169
15204
|
}
|
|
15170
15205
|
ts.moveRangePastDecorators = moveRangePastDecorators;
|
|
15171
15206
|
function moveRangePastModifiers(node) {
|
|
15172
|
-
|
|
15173
|
-
|
|
15207
|
+
var lastModifier = ts.canHaveModifiers(node) ? ts.lastOrUndefined(node.modifiers) : undefined;
|
|
15208
|
+
return lastModifier && !positionIsSynthesized(lastModifier.end)
|
|
15209
|
+
? moveRangePos(node, lastModifier.end)
|
|
15174
15210
|
: moveRangePastDecorators(node);
|
|
15175
15211
|
}
|
|
15176
15212
|
ts.moveRangePastModifiers = moveRangePastModifiers;
|
|
@@ -16859,8 +16895,12 @@ var ts;
|
|
|
16859
16895
|
return node.parent.templateSpans;
|
|
16860
16896
|
case 233:
|
|
16861
16897
|
return node.parent.templateSpans;
|
|
16862
|
-
case 165:
|
|
16863
|
-
|
|
16898
|
+
case 165: {
|
|
16899
|
+
var parent_2 = node.parent;
|
|
16900
|
+
return ts.canHaveDecorators(parent_2) ? parent_2.modifiers :
|
|
16901
|
+
ts.canHaveIllegalDecorators(parent_2) ? parent_2.decorators :
|
|
16902
|
+
undefined;
|
|
16903
|
+
}
|
|
16864
16904
|
case 291:
|
|
16865
16905
|
return node.parent.heritageClauses;
|
|
16866
16906
|
}
|
|
@@ -18039,23 +18079,22 @@ var ts;
|
|
|
18039
18079
|
function createBaseNode(kind) {
|
|
18040
18080
|
return baseFactory.createBaseNode(kind);
|
|
18041
18081
|
}
|
|
18042
|
-
function createBaseDeclaration(kind
|
|
18082
|
+
function createBaseDeclaration(kind) {
|
|
18043
18083
|
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
18084
|
node.symbol = undefined;
|
|
18050
18085
|
node.localSymbol = undefined;
|
|
18051
18086
|
node.locals = undefined;
|
|
18052
18087
|
node.nextContainer = undefined;
|
|
18053
18088
|
return node;
|
|
18054
18089
|
}
|
|
18055
|
-
function createBaseNamedDeclaration(kind,
|
|
18056
|
-
var node = createBaseDeclaration(kind
|
|
18090
|
+
function createBaseNamedDeclaration(kind, modifiers, name) {
|
|
18091
|
+
var node = createBaseDeclaration(kind);
|
|
18057
18092
|
name = asName(name);
|
|
18058
18093
|
node.name = name;
|
|
18094
|
+
if (ts.canHaveModifiers(node)) {
|
|
18095
|
+
node.modifiers = asNodeArray(modifiers);
|
|
18096
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers);
|
|
18097
|
+
}
|
|
18059
18098
|
if (name) {
|
|
18060
18099
|
switch (node.kind) {
|
|
18061
18100
|
case 169:
|
|
@@ -18074,16 +18113,16 @@ var ts;
|
|
|
18074
18113
|
}
|
|
18075
18114
|
return node;
|
|
18076
18115
|
}
|
|
18077
|
-
function createBaseGenericNamedDeclaration(kind,
|
|
18078
|
-
var node = createBaseNamedDeclaration(kind,
|
|
18116
|
+
function createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters) {
|
|
18117
|
+
var node = createBaseNamedDeclaration(kind, modifiers, name);
|
|
18079
18118
|
node.typeParameters = asNodeArray(typeParameters);
|
|
18080
18119
|
node.transformFlags |= propagateChildrenFlags(node.typeParameters);
|
|
18081
18120
|
if (typeParameters)
|
|
18082
18121
|
node.transformFlags |= 1;
|
|
18083
18122
|
return node;
|
|
18084
18123
|
}
|
|
18085
|
-
function createBaseSignatureDeclaration(kind,
|
|
18086
|
-
var node = createBaseGenericNamedDeclaration(kind,
|
|
18124
|
+
function createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type) {
|
|
18125
|
+
var node = createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters);
|
|
18087
18126
|
node.parameters = createNodeArray(parameters);
|
|
18088
18127
|
node.type = type;
|
|
18089
18128
|
node.transformFlags |=
|
|
@@ -18091,48 +18130,43 @@ var ts;
|
|
|
18091
18130
|
propagateChildFlags(node.type);
|
|
18092
18131
|
if (type)
|
|
18093
18132
|
node.transformFlags |= 1;
|
|
18133
|
+
node.typeArguments = undefined;
|
|
18094
18134
|
return node;
|
|
18095
18135
|
}
|
|
18096
|
-
function
|
|
18097
|
-
if (original
|
|
18136
|
+
function finishUpdateBaseSignatureDeclaration(updated, original) {
|
|
18137
|
+
if (updated !== original) {
|
|
18098
18138
|
updated.typeArguments = original.typeArguments;
|
|
18139
|
+
}
|
|
18099
18140
|
return update(updated, original);
|
|
18100
18141
|
}
|
|
18101
|
-
function createBaseFunctionLikeDeclaration(kind,
|
|
18102
|
-
var node = createBaseSignatureDeclaration(kind,
|
|
18142
|
+
function createBaseFunctionLikeDeclaration(kind, modifiers, name, typeParameters, parameters, type, body) {
|
|
18143
|
+
var node = createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type);
|
|
18103
18144
|
node.body = body;
|
|
18104
18145
|
node.transformFlags |= propagateChildFlags(node.body) & ~67108864;
|
|
18105
18146
|
if (!body)
|
|
18106
18147
|
node.transformFlags |= 1;
|
|
18107
18148
|
return node;
|
|
18108
18149
|
}
|
|
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);
|
|
18150
|
+
function createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses) {
|
|
18151
|
+
var node = createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters);
|
|
18118
18152
|
node.heritageClauses = asNodeArray(heritageClauses);
|
|
18119
18153
|
node.transformFlags |= propagateChildrenFlags(node.heritageClauses);
|
|
18120
18154
|
return node;
|
|
18121
18155
|
}
|
|
18122
|
-
function createBaseClassLikeDeclaration(kind,
|
|
18123
|
-
var node = createBaseInterfaceOrClassLikeDeclaration(kind,
|
|
18156
|
+
function createBaseClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses, members) {
|
|
18157
|
+
var node = createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses);
|
|
18124
18158
|
node.members = createNodeArray(members);
|
|
18125
18159
|
node.transformFlags |= propagateChildrenFlags(node.members);
|
|
18126
18160
|
return node;
|
|
18127
18161
|
}
|
|
18128
|
-
function createBaseBindingLikeDeclaration(kind,
|
|
18129
|
-
var node = createBaseNamedDeclaration(kind,
|
|
18162
|
+
function createBaseBindingLikeDeclaration(kind, modifiers, name, initializer) {
|
|
18163
|
+
var node = createBaseNamedDeclaration(kind, modifiers, name);
|
|
18130
18164
|
node.initializer = initializer;
|
|
18131
18165
|
node.transformFlags |= propagateChildFlags(node.initializer);
|
|
18132
18166
|
return node;
|
|
18133
18167
|
}
|
|
18134
|
-
function createBaseVariableLikeDeclaration(kind,
|
|
18135
|
-
var node = createBaseBindingLikeDeclaration(kind,
|
|
18168
|
+
function createBaseVariableLikeDeclaration(kind, modifiers, name, type, initializer) {
|
|
18169
|
+
var node = createBaseBindingLikeDeclaration(kind, modifiers, name, initializer);
|
|
18136
18170
|
node.type = type;
|
|
18137
18171
|
node.transformFlags |= propagateChildFlags(type);
|
|
18138
18172
|
if (type)
|
|
@@ -18393,40 +18427,14 @@ var ts;
|
|
|
18393
18427
|
? update(createComputedPropertyName(expression), node)
|
|
18394
18428
|
: node;
|
|
18395
18429
|
}
|
|
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);
|
|
18430
|
+
function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) {
|
|
18431
|
+
var node = createBaseNamedDeclaration(163, modifiers, name);
|
|
18411
18432
|
node.constraint = constraint;
|
|
18412
18433
|
node.default = defaultType;
|
|
18413
18434
|
node.transformFlags = 1;
|
|
18414
18435
|
return node;
|
|
18415
18436
|
}
|
|
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
|
-
}
|
|
18437
|
+
function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {
|
|
18430
18438
|
return node.modifiers !== modifiers
|
|
18431
18439
|
|| node.name !== name
|
|
18432
18440
|
|| node.constraint !== constraint
|
|
@@ -18434,8 +18442,8 @@ var ts;
|
|
|
18434
18442
|
? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node)
|
|
18435
18443
|
: node;
|
|
18436
18444
|
}
|
|
18437
|
-
function createParameterDeclaration(
|
|
18438
|
-
var node = createBaseVariableLikeDeclaration(164,
|
|
18445
|
+
function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
18446
|
+
var node = createBaseVariableLikeDeclaration(164, modifiers, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
18439
18447
|
node.dotDotDotToken = dotDotDotToken;
|
|
18440
18448
|
node.questionToken = questionToken;
|
|
18441
18449
|
if (ts.isThisIdentifier(node.name)) {
|
|
@@ -18454,15 +18462,14 @@ var ts;
|
|
|
18454
18462
|
}
|
|
18455
18463
|
return node;
|
|
18456
18464
|
}
|
|
18457
|
-
function updateParameterDeclaration(node,
|
|
18458
|
-
return node.
|
|
18459
|
-
|| node.modifiers !== modifiers
|
|
18465
|
+
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
18466
|
+
return node.modifiers !== modifiers
|
|
18460
18467
|
|| node.dotDotDotToken !== dotDotDotToken
|
|
18461
18468
|
|| node.name !== name
|
|
18462
18469
|
|| node.questionToken !== questionToken
|
|
18463
18470
|
|| node.type !== type
|
|
18464
18471
|
|| node.initializer !== initializer
|
|
18465
|
-
? update(createParameterDeclaration(
|
|
18472
|
+
? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node)
|
|
18466
18473
|
: node;
|
|
18467
18474
|
}
|
|
18468
18475
|
function createDecorator(expression) {
|
|
@@ -18481,10 +18488,11 @@ var ts;
|
|
|
18481
18488
|
: node;
|
|
18482
18489
|
}
|
|
18483
18490
|
function createPropertySignature(modifiers, name, questionToken, type) {
|
|
18484
|
-
var node = createBaseNamedDeclaration(166,
|
|
18491
|
+
var node = createBaseNamedDeclaration(166, modifiers, name);
|
|
18485
18492
|
node.type = type;
|
|
18486
18493
|
node.questionToken = questionToken;
|
|
18487
18494
|
node.transformFlags = 1;
|
|
18495
|
+
node.initializer = undefined;
|
|
18488
18496
|
return node;
|
|
18489
18497
|
}
|
|
18490
18498
|
function updatePropertySignature(node, modifiers, name, questionToken, type) {
|
|
@@ -18492,11 +18500,17 @@ var ts;
|
|
|
18492
18500
|
|| node.name !== name
|
|
18493
18501
|
|| node.questionToken !== questionToken
|
|
18494
18502
|
|| node.type !== type
|
|
18495
|
-
?
|
|
18503
|
+
? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node)
|
|
18496
18504
|
: node;
|
|
18497
18505
|
}
|
|
18498
|
-
function
|
|
18499
|
-
|
|
18506
|
+
function finishUpdatePropertySignature(updated, original) {
|
|
18507
|
+
if (updated !== original) {
|
|
18508
|
+
updated.initializer = original.initializer;
|
|
18509
|
+
}
|
|
18510
|
+
return update(updated, original);
|
|
18511
|
+
}
|
|
18512
|
+
function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
18513
|
+
var node = createBaseVariableLikeDeclaration(167, modifiers, name, type, initializer);
|
|
18500
18514
|
node.questionToken = questionOrExclamationToken && ts.isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
|
|
18501
18515
|
node.exclamationToken = questionOrExclamationToken && ts.isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
|
|
18502
18516
|
node.transformFlags |=
|
|
@@ -18511,19 +18525,18 @@ var ts;
|
|
|
18511
18525
|
}
|
|
18512
18526
|
return node;
|
|
18513
18527
|
}
|
|
18514
|
-
function updatePropertyDeclaration(node,
|
|
18515
|
-
return node.
|
|
18516
|
-
|| node.modifiers !== modifiers
|
|
18528
|
+
function updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
18529
|
+
return node.modifiers !== modifiers
|
|
18517
18530
|
|| node.name !== name
|
|
18518
18531
|
|| node.questionToken !== (questionOrExclamationToken !== undefined && ts.isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined)
|
|
18519
18532
|
|| node.exclamationToken !== (questionOrExclamationToken !== undefined && ts.isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined)
|
|
18520
18533
|
|| node.type !== type
|
|
18521
18534
|
|| node.initializer !== initializer
|
|
18522
|
-
? update(createPropertyDeclaration(
|
|
18535
|
+
? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node)
|
|
18523
18536
|
: node;
|
|
18524
18537
|
}
|
|
18525
18538
|
function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
18526
|
-
var node = createBaseSignatureDeclaration(168,
|
|
18539
|
+
var node = createBaseSignatureDeclaration(168, modifiers, name, typeParameters, parameters, type);
|
|
18527
18540
|
node.questionToken = questionToken;
|
|
18528
18541
|
node.transformFlags = 1;
|
|
18529
18542
|
return node;
|
|
@@ -18535,11 +18548,11 @@ var ts;
|
|
|
18535
18548
|
|| node.typeParameters !== typeParameters
|
|
18536
18549
|
|| node.parameters !== parameters
|
|
18537
18550
|
|| node.type !== type
|
|
18538
|
-
?
|
|
18551
|
+
? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node)
|
|
18539
18552
|
: node;
|
|
18540
18553
|
}
|
|
18541
|
-
function createMethodDeclaration(
|
|
18542
|
-
var node = createBaseFunctionLikeDeclaration(169,
|
|
18554
|
+
function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
18555
|
+
var node = createBaseFunctionLikeDeclaration(169, modifiers, name, typeParameters, parameters, type, body);
|
|
18543
18556
|
node.asteriskToken = asteriskToken;
|
|
18544
18557
|
node.questionToken = questionToken;
|
|
18545
18558
|
node.transformFlags |=
|
|
@@ -18560,11 +18573,11 @@ var ts;
|
|
|
18560
18573
|
else if (asteriskToken) {
|
|
18561
18574
|
node.transformFlags |= 2048;
|
|
18562
18575
|
}
|
|
18576
|
+
node.exclamationToken = undefined;
|
|
18563
18577
|
return node;
|
|
18564
18578
|
}
|
|
18565
|
-
function updateMethodDeclaration(node,
|
|
18566
|
-
return node.
|
|
18567
|
-
|| node.modifiers !== modifiers
|
|
18579
|
+
function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
18580
|
+
return node.modifiers !== modifiers
|
|
18568
18581
|
|| node.asteriskToken !== asteriskToken
|
|
18569
18582
|
|| node.name !== name
|
|
18570
18583
|
|| node.questionToken !== questionToken
|
|
@@ -18572,62 +18585,101 @@ var ts;
|
|
|
18572
18585
|
|| node.parameters !== parameters
|
|
18573
18586
|
|| node.type !== type
|
|
18574
18587
|
|| node.body !== body
|
|
18575
|
-
?
|
|
18588
|
+
? finishUpdateMethodDeclaration(createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
|
|
18576
18589
|
: node;
|
|
18577
18590
|
}
|
|
18578
|
-
function
|
|
18579
|
-
|
|
18591
|
+
function finishUpdateMethodDeclaration(updated, original) {
|
|
18592
|
+
if (updated !== original) {
|
|
18593
|
+
updated.exclamationToken = original.exclamationToken;
|
|
18594
|
+
}
|
|
18595
|
+
return update(updated, original);
|
|
18596
|
+
}
|
|
18597
|
+
function createClassStaticBlockDeclaration(body) {
|
|
18598
|
+
var node = createBaseGenericNamedDeclaration(170, undefined, undefined, undefined);
|
|
18580
18599
|
node.body = body;
|
|
18581
18600
|
node.transformFlags = propagateChildFlags(body) | 16777216;
|
|
18601
|
+
node.decorators = undefined;
|
|
18602
|
+
node.modifiers = undefined;
|
|
18582
18603
|
return node;
|
|
18583
18604
|
}
|
|
18584
|
-
function updateClassStaticBlockDeclaration(node,
|
|
18585
|
-
return node.
|
|
18586
|
-
|
|
18587
|
-
|| node.body !== body
|
|
18588
|
-
? update(createClassStaticBlockDeclaration(decorators, modifiers, body), node)
|
|
18605
|
+
function updateClassStaticBlockDeclaration(node, body) {
|
|
18606
|
+
return node.body !== body
|
|
18607
|
+
? finishUpdateClassStaticBlockDeclaration(createClassStaticBlockDeclaration(body), node)
|
|
18589
18608
|
: node;
|
|
18590
18609
|
}
|
|
18591
|
-
function
|
|
18592
|
-
|
|
18610
|
+
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
18611
|
+
if (updated !== original) {
|
|
18612
|
+
updated.decorators = original.decorators;
|
|
18613
|
+
updated.modifiers = original.modifiers;
|
|
18614
|
+
}
|
|
18615
|
+
return update(updated, original);
|
|
18616
|
+
}
|
|
18617
|
+
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
18618
|
+
var node = createBaseFunctionLikeDeclaration(171, modifiers, undefined, undefined, parameters, undefined, body);
|
|
18593
18619
|
node.transformFlags |= 1024;
|
|
18620
|
+
node.decorators = undefined;
|
|
18621
|
+
node.typeParameters = undefined;
|
|
18622
|
+
node.type = undefined;
|
|
18594
18623
|
return node;
|
|
18595
18624
|
}
|
|
18596
|
-
function updateConstructorDeclaration(node,
|
|
18597
|
-
return node.
|
|
18598
|
-
|| node.modifiers !== modifiers
|
|
18625
|
+
function updateConstructorDeclaration(node, modifiers, parameters, body) {
|
|
18626
|
+
return node.modifiers !== modifiers
|
|
18599
18627
|
|| node.parameters !== parameters
|
|
18600
18628
|
|| node.body !== body
|
|
18601
|
-
?
|
|
18629
|
+
? finishUpdateConstructorDeclaration(createConstructorDeclaration(modifiers, parameters, body), node)
|
|
18602
18630
|
: node;
|
|
18603
18631
|
}
|
|
18604
|
-
function
|
|
18605
|
-
|
|
18632
|
+
function finishUpdateConstructorDeclaration(updated, original) {
|
|
18633
|
+
if (updated !== original) {
|
|
18634
|
+
updated.decorators = original.decorators;
|
|
18635
|
+
updated.typeParameters = original.typeParameters;
|
|
18636
|
+
updated.type = original.type;
|
|
18637
|
+
}
|
|
18638
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18606
18639
|
}
|
|
18607
|
-
function
|
|
18608
|
-
|
|
18609
|
-
|
|
18640
|
+
function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {
|
|
18641
|
+
var node = createBaseFunctionLikeDeclaration(172, modifiers, name, undefined, parameters, type, body);
|
|
18642
|
+
node.typeParameters = undefined;
|
|
18643
|
+
return node;
|
|
18644
|
+
}
|
|
18645
|
+
function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) {
|
|
18646
|
+
return node.modifiers !== modifiers
|
|
18610
18647
|
|| node.name !== name
|
|
18611
18648
|
|| node.parameters !== parameters
|
|
18612
18649
|
|| node.type !== type
|
|
18613
18650
|
|| node.body !== body
|
|
18614
|
-
?
|
|
18651
|
+
? finishUpdateGetAccessorDeclaration(createGetAccessorDeclaration(modifiers, name, parameters, type, body), node)
|
|
18615
18652
|
: node;
|
|
18616
18653
|
}
|
|
18617
|
-
function
|
|
18618
|
-
|
|
18654
|
+
function finishUpdateGetAccessorDeclaration(updated, original) {
|
|
18655
|
+
if (updated !== original) {
|
|
18656
|
+
updated.typeParameters = original.typeParameters;
|
|
18657
|
+
}
|
|
18658
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18619
18659
|
}
|
|
18620
|
-
function
|
|
18621
|
-
|
|
18622
|
-
|
|
18660
|
+
function createSetAccessorDeclaration(modifiers, name, parameters, body) {
|
|
18661
|
+
var node = createBaseFunctionLikeDeclaration(173, modifiers, name, undefined, parameters, undefined, body);
|
|
18662
|
+
node.typeParameters = undefined;
|
|
18663
|
+
node.type = undefined;
|
|
18664
|
+
return node;
|
|
18665
|
+
}
|
|
18666
|
+
function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) {
|
|
18667
|
+
return node.modifiers !== modifiers
|
|
18623
18668
|
|| node.name !== name
|
|
18624
18669
|
|| node.parameters !== parameters
|
|
18625
18670
|
|| node.body !== body
|
|
18626
|
-
?
|
|
18671
|
+
? finishUpdateSetAccessorDeclaration(createSetAccessorDeclaration(modifiers, name, parameters, body), node)
|
|
18627
18672
|
: node;
|
|
18628
18673
|
}
|
|
18674
|
+
function finishUpdateSetAccessorDeclaration(updated, original) {
|
|
18675
|
+
if (updated !== original) {
|
|
18676
|
+
updated.typeParameters = original.typeParameters;
|
|
18677
|
+
updated.type = original.type;
|
|
18678
|
+
}
|
|
18679
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18680
|
+
}
|
|
18629
18681
|
function createCallSignature(typeParameters, parameters, type) {
|
|
18630
|
-
var node = createBaseSignatureDeclaration(174, undefined, undefined,
|
|
18682
|
+
var node = createBaseSignatureDeclaration(174, undefined, undefined, typeParameters, parameters, type);
|
|
18631
18683
|
node.transformFlags = 1;
|
|
18632
18684
|
return node;
|
|
18633
18685
|
}
|
|
@@ -18635,11 +18687,11 @@ var ts;
|
|
|
18635
18687
|
return node.typeParameters !== typeParameters
|
|
18636
18688
|
|| node.parameters !== parameters
|
|
18637
18689
|
|| node.type !== type
|
|
18638
|
-
?
|
|
18690
|
+
? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node)
|
|
18639
18691
|
: node;
|
|
18640
18692
|
}
|
|
18641
18693
|
function createConstructSignature(typeParameters, parameters, type) {
|
|
18642
|
-
var node = createBaseSignatureDeclaration(175, undefined, undefined,
|
|
18694
|
+
var node = createBaseSignatureDeclaration(175, undefined, undefined, typeParameters, parameters, type);
|
|
18643
18695
|
node.transformFlags = 1;
|
|
18644
18696
|
return node;
|
|
18645
18697
|
}
|
|
@@ -18647,20 +18699,19 @@ var ts;
|
|
|
18647
18699
|
return node.typeParameters !== typeParameters
|
|
18648
18700
|
|| node.parameters !== parameters
|
|
18649
18701
|
|| node.type !== type
|
|
18650
|
-
?
|
|
18702
|
+
? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node)
|
|
18651
18703
|
: node;
|
|
18652
18704
|
}
|
|
18653
|
-
function createIndexSignature(
|
|
18654
|
-
var node = createBaseSignatureDeclaration(176,
|
|
18705
|
+
function createIndexSignature(modifiers, parameters, type) {
|
|
18706
|
+
var node = createBaseSignatureDeclaration(176, modifiers, undefined, undefined, parameters, type);
|
|
18655
18707
|
node.transformFlags = 1;
|
|
18656
18708
|
return node;
|
|
18657
18709
|
}
|
|
18658
|
-
function updateIndexSignature(node,
|
|
18710
|
+
function updateIndexSignature(node, modifiers, parameters, type) {
|
|
18659
18711
|
return node.parameters !== parameters
|
|
18660
18712
|
|| node.type !== type
|
|
18661
|
-
|| node.decorators !== decorators
|
|
18662
18713
|
|| node.modifiers !== modifiers
|
|
18663
|
-
?
|
|
18714
|
+
? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node)
|
|
18664
18715
|
: node;
|
|
18665
18716
|
}
|
|
18666
18717
|
function createTemplateLiteralTypeSpan(type, literal) {
|
|
@@ -18708,17 +18759,24 @@ var ts;
|
|
|
18708
18759
|
: node;
|
|
18709
18760
|
}
|
|
18710
18761
|
function createFunctionTypeNode(typeParameters, parameters, type) {
|
|
18711
|
-
var node = createBaseSignatureDeclaration(179, undefined, undefined,
|
|
18762
|
+
var node = createBaseSignatureDeclaration(179, undefined, undefined, typeParameters, parameters, type);
|
|
18712
18763
|
node.transformFlags = 1;
|
|
18764
|
+
node.modifiers = undefined;
|
|
18713
18765
|
return node;
|
|
18714
18766
|
}
|
|
18715
18767
|
function updateFunctionTypeNode(node, typeParameters, parameters, type) {
|
|
18716
18768
|
return node.typeParameters !== typeParameters
|
|
18717
18769
|
|| node.parameters !== parameters
|
|
18718
18770
|
|| node.type !== type
|
|
18719
|
-
?
|
|
18771
|
+
? finishUpdateFunctionTypeNode(createFunctionTypeNode(typeParameters, parameters, type), node)
|
|
18720
18772
|
: node;
|
|
18721
18773
|
}
|
|
18774
|
+
function finishUpdateFunctionTypeNode(updated, original) {
|
|
18775
|
+
if (updated !== original) {
|
|
18776
|
+
updated.modifiers = original.modifiers;
|
|
18777
|
+
}
|
|
18778
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
18779
|
+
}
|
|
18722
18780
|
function createConstructorTypeNode() {
|
|
18723
18781
|
var args = [];
|
|
18724
18782
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -18729,7 +18787,7 @@ var ts;
|
|
|
18729
18787
|
ts.Debug.fail("Incorrect number of arguments specified.");
|
|
18730
18788
|
}
|
|
18731
18789
|
function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
|
|
18732
|
-
var node = createBaseSignatureDeclaration(180,
|
|
18790
|
+
var node = createBaseSignatureDeclaration(180, modifiers, undefined, typeParameters, parameters, type);
|
|
18733
18791
|
node.transformFlags = 1;
|
|
18734
18792
|
return node;
|
|
18735
18793
|
}
|
|
@@ -18750,7 +18808,7 @@ var ts;
|
|
|
18750
18808
|
|| node.typeParameters !== typeParameters
|
|
18751
18809
|
|| node.parameters !== parameters
|
|
18752
18810
|
|| node.type !== type
|
|
18753
|
-
?
|
|
18811
|
+
? finishUpdateBaseSignatureDeclaration(createConstructorTypeNode(modifiers, typeParameters, parameters, type), node)
|
|
18754
18812
|
: node;
|
|
18755
18813
|
}
|
|
18756
18814
|
function updateConstructorTypeNode2(node, typeParameters, parameters, type) {
|
|
@@ -18905,33 +18963,25 @@ var ts;
|
|
|
18905
18963
|
? update(createTemplateLiteralType(head, templateSpans), node)
|
|
18906
18964
|
: node;
|
|
18907
18965
|
}
|
|
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;
|
|
18966
|
+
function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf) {
|
|
18967
|
+
if (isTypeOf === void 0) { isTypeOf = false; }
|
|
18914
18968
|
var node = createBaseNode(200);
|
|
18915
18969
|
node.argument = argument;
|
|
18916
|
-
node.assertions =
|
|
18970
|
+
node.assertions = assertions;
|
|
18917
18971
|
node.qualifier = qualifier;
|
|
18918
18972
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
18919
18973
|
node.isTypeOf = isTypeOf;
|
|
18920
18974
|
node.transformFlags = 1;
|
|
18921
18975
|
return node;
|
|
18922
18976
|
}
|
|
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;
|
|
18977
|
+
function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf) {
|
|
18978
|
+
if (isTypeOf === void 0) { isTypeOf = node.isTypeOf; }
|
|
18929
18979
|
return node.argument !== argument
|
|
18930
|
-
|| node.assertions !==
|
|
18980
|
+
|| node.assertions !== assertions
|
|
18931
18981
|
|| node.qualifier !== qualifier
|
|
18932
18982
|
|| node.typeArguments !== typeArguments
|
|
18933
18983
|
|| node.isTypeOf !== isTypeOf
|
|
18934
|
-
? update(createImportTypeNode(argument,
|
|
18984
|
+
? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node)
|
|
18935
18985
|
: node;
|
|
18936
18986
|
}
|
|
18937
18987
|
function createParenthesizedType(type) {
|
|
@@ -19043,7 +19093,7 @@ var ts;
|
|
|
19043
19093
|
: node;
|
|
19044
19094
|
}
|
|
19045
19095
|
function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
|
|
19046
|
-
var node = createBaseBindingLikeDeclaration(203, undefined,
|
|
19096
|
+
var node = createBaseBindingLikeDeclaration(203, undefined, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
19047
19097
|
node.propertyName = asName(propertyName);
|
|
19048
19098
|
node.dotDotDotToken = dotDotDotToken;
|
|
19049
19099
|
node.transformFlags |=
|
|
@@ -19323,7 +19373,7 @@ var ts;
|
|
|
19323
19373
|
: node;
|
|
19324
19374
|
}
|
|
19325
19375
|
function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
19326
|
-
var node = createBaseFunctionLikeDeclaration(213,
|
|
19376
|
+
var node = createBaseFunctionLikeDeclaration(213, modifiers, name, typeParameters, parameters, type, body);
|
|
19327
19377
|
node.asteriskToken = asteriskToken;
|
|
19328
19378
|
node.transformFlags |= propagateChildFlags(node.asteriskToken);
|
|
19329
19379
|
if (node.typeParameters) {
|
|
@@ -19350,11 +19400,11 @@ var ts;
|
|
|
19350
19400
|
|| node.parameters !== parameters
|
|
19351
19401
|
|| node.type !== type
|
|
19352
19402
|
|| node.body !== body
|
|
19353
|
-
?
|
|
19403
|
+
? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
|
|
19354
19404
|
: node;
|
|
19355
19405
|
}
|
|
19356
19406
|
function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
19357
|
-
var node = createBaseFunctionLikeDeclaration(214,
|
|
19407
|
+
var node = createBaseFunctionLikeDeclaration(214, modifiers, undefined, typeParameters, parameters, type, parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body));
|
|
19358
19408
|
node.equalsGreaterThanToken = equalsGreaterThanToken !== null && equalsGreaterThanToken !== void 0 ? equalsGreaterThanToken : createToken(38);
|
|
19359
19409
|
node.transformFlags |=
|
|
19360
19410
|
propagateChildFlags(node.equalsGreaterThanToken) |
|
|
@@ -19371,7 +19421,7 @@ var ts;
|
|
|
19371
19421
|
|| node.type !== type
|
|
19372
19422
|
|| node.equalsGreaterThanToken !== equalsGreaterThanToken
|
|
19373
19423
|
|| node.body !== body
|
|
19374
|
-
?
|
|
19424
|
+
? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node)
|
|
19375
19425
|
: node;
|
|
19376
19426
|
}
|
|
19377
19427
|
function createDeleteExpression(expression) {
|
|
@@ -19639,19 +19689,18 @@ var ts;
|
|
|
19639
19689
|
? update(createSpreadElement(expression), node)
|
|
19640
19690
|
: node;
|
|
19641
19691
|
}
|
|
19642
|
-
function createClassExpression(
|
|
19643
|
-
var node = createBaseClassLikeDeclaration(226,
|
|
19692
|
+
function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
|
|
19693
|
+
var node = createBaseClassLikeDeclaration(226, modifiers, name, typeParameters, heritageClauses, members);
|
|
19644
19694
|
node.transformFlags |= 1024;
|
|
19645
19695
|
return node;
|
|
19646
19696
|
}
|
|
19647
|
-
function updateClassExpression(node,
|
|
19648
|
-
return node.
|
|
19649
|
-
|| node.modifiers !== modifiers
|
|
19697
|
+
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
19698
|
+
return node.modifiers !== modifiers
|
|
19650
19699
|
|| node.name !== name
|
|
19651
19700
|
|| node.typeParameters !== typeParameters
|
|
19652
19701
|
|| node.heritageClauses !== heritageClauses
|
|
19653
19702
|
|| node.members !== members
|
|
19654
|
-
? update(createClassExpression(
|
|
19703
|
+
? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
19655
19704
|
: node;
|
|
19656
19705
|
}
|
|
19657
19706
|
function createOmittedExpression() {
|
|
@@ -19776,10 +19825,12 @@ var ts;
|
|
|
19776
19825
|
: node;
|
|
19777
19826
|
}
|
|
19778
19827
|
function createVariableStatement(modifiers, declarationList) {
|
|
19779
|
-
var node = createBaseDeclaration(237
|
|
19828
|
+
var node = createBaseDeclaration(237);
|
|
19829
|
+
node.modifiers = asNodeArray(modifiers);
|
|
19780
19830
|
node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
|
|
19781
19831
|
node.transformFlags |=
|
|
19782
|
-
|
|
19832
|
+
propagateChildrenFlags(node.modifiers) |
|
|
19833
|
+
propagateChildFlags(node.declarationList);
|
|
19783
19834
|
if (ts.modifiersToFlags(node.modifiers) & 2) {
|
|
19784
19835
|
node.transformFlags = 1;
|
|
19785
19836
|
}
|
|
@@ -20034,7 +20085,7 @@ var ts;
|
|
|
20034
20085
|
return createBaseNode(253);
|
|
20035
20086
|
}
|
|
20036
20087
|
function createVariableDeclaration(name, exclamationToken, type, initializer) {
|
|
20037
|
-
var node = createBaseVariableLikeDeclaration(254, undefined,
|
|
20088
|
+
var node = createBaseVariableLikeDeclaration(254, undefined, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
|
|
20038
20089
|
node.exclamationToken = exclamationToken;
|
|
20039
20090
|
node.transformFlags |= propagateChildFlags(node.exclamationToken);
|
|
20040
20091
|
if (exclamationToken) {
|
|
@@ -20070,8 +20121,8 @@ var ts;
|
|
|
20070
20121
|
? update(createVariableDeclarationList(declarations, node.flags), node)
|
|
20071
20122
|
: node;
|
|
20072
20123
|
}
|
|
20073
|
-
function createFunctionDeclaration(
|
|
20074
|
-
var node = createBaseFunctionLikeDeclaration(256,
|
|
20124
|
+
function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
20125
|
+
var node = createBaseFunctionLikeDeclaration(256, modifiers, name, typeParameters, parameters, type, body);
|
|
20075
20126
|
node.asteriskToken = asteriskToken;
|
|
20076
20127
|
if (!node.body || ts.modifiersToFlags(node.modifiers) & 2) {
|
|
20077
20128
|
node.transformFlags = 1;
|
|
@@ -20092,22 +20143,28 @@ var ts;
|
|
|
20092
20143
|
node.transformFlags |= 2048;
|
|
20093
20144
|
}
|
|
20094
20145
|
}
|
|
20146
|
+
node.decorators = undefined;
|
|
20095
20147
|
return node;
|
|
20096
20148
|
}
|
|
20097
|
-
function updateFunctionDeclaration(node,
|
|
20098
|
-
return node.
|
|
20099
|
-
|| node.modifiers !== modifiers
|
|
20149
|
+
function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
20150
|
+
return node.modifiers !== modifiers
|
|
20100
20151
|
|| node.asteriskToken !== asteriskToken
|
|
20101
20152
|
|| node.name !== name
|
|
20102
20153
|
|| node.typeParameters !== typeParameters
|
|
20103
20154
|
|| node.parameters !== parameters
|
|
20104
20155
|
|| node.type !== type
|
|
20105
20156
|
|| node.body !== body
|
|
20106
|
-
?
|
|
20157
|
+
? finishUpdateFunctionDeclaration(createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node)
|
|
20107
20158
|
: node;
|
|
20108
20159
|
}
|
|
20109
|
-
function
|
|
20110
|
-
|
|
20160
|
+
function finishUpdateFunctionDeclaration(updated, original) {
|
|
20161
|
+
if (updated !== original) {
|
|
20162
|
+
updated.decorators = original.decorators;
|
|
20163
|
+
}
|
|
20164
|
+
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
20165
|
+
}
|
|
20166
|
+
function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
20167
|
+
var node = createBaseClassLikeDeclaration(257, modifiers, name, typeParameters, heritageClauses, members);
|
|
20111
20168
|
if (ts.modifiersToFlags(node.modifiers) & 2) {
|
|
20112
20169
|
node.transformFlags = 1;
|
|
20113
20170
|
}
|
|
@@ -20119,67 +20176,85 @@ var ts;
|
|
|
20119
20176
|
}
|
|
20120
20177
|
return node;
|
|
20121
20178
|
}
|
|
20122
|
-
function updateClassDeclaration(node,
|
|
20123
|
-
return node.
|
|
20124
|
-
|| node.modifiers !== modifiers
|
|
20179
|
+
function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
20180
|
+
return node.modifiers !== modifiers
|
|
20125
20181
|
|| node.name !== name
|
|
20126
20182
|
|| node.typeParameters !== typeParameters
|
|
20127
20183
|
|| node.heritageClauses !== heritageClauses
|
|
20128
20184
|
|| node.members !== members
|
|
20129
|
-
? update(createClassDeclaration(
|
|
20185
|
+
? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
20130
20186
|
: node;
|
|
20131
20187
|
}
|
|
20132
|
-
function createInterfaceDeclaration(
|
|
20133
|
-
var node = createBaseInterfaceOrClassLikeDeclaration(258,
|
|
20188
|
+
function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
20189
|
+
var node = createBaseInterfaceOrClassLikeDeclaration(258, modifiers, name, typeParameters, heritageClauses);
|
|
20134
20190
|
node.members = createNodeArray(members);
|
|
20135
20191
|
node.transformFlags = 1;
|
|
20192
|
+
node.decorators = undefined;
|
|
20136
20193
|
return node;
|
|
20137
20194
|
}
|
|
20138
|
-
function updateInterfaceDeclaration(node,
|
|
20139
|
-
return node.
|
|
20140
|
-
|| node.modifiers !== modifiers
|
|
20195
|
+
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
20196
|
+
return node.modifiers !== modifiers
|
|
20141
20197
|
|| node.name !== name
|
|
20142
20198
|
|| node.typeParameters !== typeParameters
|
|
20143
20199
|
|| node.heritageClauses !== heritageClauses
|
|
20144
20200
|
|| node.members !== members
|
|
20145
|
-
?
|
|
20201
|
+
? finishUpdateInterfaceDeclaration(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node)
|
|
20146
20202
|
: node;
|
|
20147
20203
|
}
|
|
20148
|
-
function
|
|
20149
|
-
|
|
20204
|
+
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
20205
|
+
if (updated !== original) {
|
|
20206
|
+
updated.decorators = original.decorators;
|
|
20207
|
+
}
|
|
20208
|
+
return update(updated, original);
|
|
20209
|
+
}
|
|
20210
|
+
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
20211
|
+
var node = createBaseGenericNamedDeclaration(259, modifiers, name, typeParameters);
|
|
20150
20212
|
node.type = type;
|
|
20151
20213
|
node.transformFlags = 1;
|
|
20214
|
+
node.decorators = undefined;
|
|
20152
20215
|
return node;
|
|
20153
20216
|
}
|
|
20154
|
-
function updateTypeAliasDeclaration(node,
|
|
20155
|
-
return node.
|
|
20156
|
-
|| node.modifiers !== modifiers
|
|
20217
|
+
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
20218
|
+
return node.modifiers !== modifiers
|
|
20157
20219
|
|| node.name !== name
|
|
20158
20220
|
|| node.typeParameters !== typeParameters
|
|
20159
20221
|
|| node.type !== type
|
|
20160
|
-
?
|
|
20222
|
+
? finishUpdateTypeAliasDeclaration(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node)
|
|
20161
20223
|
: node;
|
|
20162
20224
|
}
|
|
20163
|
-
function
|
|
20164
|
-
|
|
20225
|
+
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
20226
|
+
if (updated !== original) {
|
|
20227
|
+
updated.decorators = original.decorators;
|
|
20228
|
+
}
|
|
20229
|
+
return update(updated, original);
|
|
20230
|
+
}
|
|
20231
|
+
function createEnumDeclaration(modifiers, name, members) {
|
|
20232
|
+
var node = createBaseNamedDeclaration(260, modifiers, name);
|
|
20165
20233
|
node.members = createNodeArray(members);
|
|
20166
20234
|
node.transformFlags |=
|
|
20167
20235
|
propagateChildrenFlags(node.members) |
|
|
20168
20236
|
1;
|
|
20169
20237
|
node.transformFlags &= ~67108864;
|
|
20238
|
+
node.decorators = undefined;
|
|
20170
20239
|
return node;
|
|
20171
20240
|
}
|
|
20172
|
-
function updateEnumDeclaration(node,
|
|
20173
|
-
return node.
|
|
20174
|
-
|| node.modifiers !== modifiers
|
|
20241
|
+
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
20242
|
+
return node.modifiers !== modifiers
|
|
20175
20243
|
|| node.name !== name
|
|
20176
20244
|
|| node.members !== members
|
|
20177
|
-
?
|
|
20245
|
+
? finishUpdateEnumDeclaration(createEnumDeclaration(modifiers, name, members), node)
|
|
20178
20246
|
: node;
|
|
20179
20247
|
}
|
|
20180
|
-
function
|
|
20248
|
+
function finishUpdateEnumDeclaration(updated, original) {
|
|
20249
|
+
if (updated !== original) {
|
|
20250
|
+
updated.decorators = original.decorators;
|
|
20251
|
+
}
|
|
20252
|
+
return update(updated, original);
|
|
20253
|
+
}
|
|
20254
|
+
function createModuleDeclaration(modifiers, name, body, flags) {
|
|
20181
20255
|
if (flags === void 0) { flags = 0; }
|
|
20182
|
-
var node = createBaseDeclaration(261
|
|
20256
|
+
var node = createBaseDeclaration(261);
|
|
20257
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20183
20258
|
node.flags |= flags & (16 | 4 | 1024);
|
|
20184
20259
|
node.name = name;
|
|
20185
20260
|
node.body = body;
|
|
@@ -20188,21 +20263,28 @@ var ts;
|
|
|
20188
20263
|
}
|
|
20189
20264
|
else {
|
|
20190
20265
|
node.transformFlags |=
|
|
20191
|
-
|
|
20266
|
+
propagateChildrenFlags(node.modifiers) |
|
|
20267
|
+
propagateChildFlags(node.name) |
|
|
20192
20268
|
propagateChildFlags(node.body) |
|
|
20193
20269
|
1;
|
|
20194
20270
|
}
|
|
20195
20271
|
node.transformFlags &= ~67108864;
|
|
20272
|
+
node.decorators = undefined;
|
|
20196
20273
|
return node;
|
|
20197
20274
|
}
|
|
20198
|
-
function updateModuleDeclaration(node,
|
|
20199
|
-
return node.
|
|
20200
|
-
|| node.modifiers !== modifiers
|
|
20275
|
+
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
20276
|
+
return node.modifiers !== modifiers
|
|
20201
20277
|
|| node.name !== name
|
|
20202
20278
|
|| node.body !== body
|
|
20203
|
-
?
|
|
20279
|
+
? finishUpdateModuleDeclaration(createModuleDeclaration(modifiers, name, body, node.flags), node)
|
|
20204
20280
|
: node;
|
|
20205
20281
|
}
|
|
20282
|
+
function finishUpdateModuleDeclaration(updated, original) {
|
|
20283
|
+
if (updated !== original) {
|
|
20284
|
+
updated.decorators = original.decorators;
|
|
20285
|
+
}
|
|
20286
|
+
return update(updated, original);
|
|
20287
|
+
}
|
|
20206
20288
|
function createModuleBlock(statements) {
|
|
20207
20289
|
var node = createBaseNode(262);
|
|
20208
20290
|
node.statements = createNodeArray(statements);
|
|
@@ -20226,36 +20308,52 @@ var ts;
|
|
|
20226
20308
|
: node;
|
|
20227
20309
|
}
|
|
20228
20310
|
function createNamespaceExportDeclaration(name) {
|
|
20229
|
-
var node = createBaseNamedDeclaration(264, undefined,
|
|
20311
|
+
var node = createBaseNamedDeclaration(264, undefined, name);
|
|
20230
20312
|
node.transformFlags = 1;
|
|
20313
|
+
node.decorators = undefined;
|
|
20314
|
+
node.modifiers = undefined;
|
|
20231
20315
|
return node;
|
|
20232
20316
|
}
|
|
20233
20317
|
function updateNamespaceExportDeclaration(node, name) {
|
|
20234
20318
|
return node.name !== name
|
|
20235
|
-
?
|
|
20319
|
+
? finishUpdateNamespaceExportDeclaration(createNamespaceExportDeclaration(name), node)
|
|
20236
20320
|
: node;
|
|
20237
20321
|
}
|
|
20238
|
-
function
|
|
20239
|
-
|
|
20322
|
+
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
20323
|
+
if (updated !== original) {
|
|
20324
|
+
updated.decorators = original.decorators;
|
|
20325
|
+
updated.modifiers = original.modifiers;
|
|
20326
|
+
}
|
|
20327
|
+
return update(updated, original);
|
|
20328
|
+
}
|
|
20329
|
+
function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) {
|
|
20330
|
+
var node = createBaseNamedDeclaration(265, modifiers, name);
|
|
20240
20331
|
node.isTypeOnly = isTypeOnly;
|
|
20241
20332
|
node.moduleReference = moduleReference;
|
|
20242
20333
|
node.transformFlags |= propagateChildFlags(node.moduleReference);
|
|
20243
20334
|
if (!ts.isExternalModuleReference(node.moduleReference))
|
|
20244
20335
|
node.transformFlags |= 1;
|
|
20245
20336
|
node.transformFlags &= ~67108864;
|
|
20337
|
+
node.decorators = undefined;
|
|
20246
20338
|
return node;
|
|
20247
20339
|
}
|
|
20248
|
-
function updateImportEqualsDeclaration(node,
|
|
20249
|
-
return node.
|
|
20250
|
-
|| node.modifiers !== modifiers
|
|
20340
|
+
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
20341
|
+
return node.modifiers !== modifiers
|
|
20251
20342
|
|| node.isTypeOnly !== isTypeOnly
|
|
20252
20343
|
|| node.name !== name
|
|
20253
20344
|
|| node.moduleReference !== moduleReference
|
|
20254
|
-
?
|
|
20345
|
+
? finishUpdateImportEqualsDeclaration(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node)
|
|
20255
20346
|
: node;
|
|
20256
20347
|
}
|
|
20257
|
-
function
|
|
20258
|
-
|
|
20348
|
+
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
20349
|
+
if (updated !== original) {
|
|
20350
|
+
updated.decorators = original.decorators;
|
|
20351
|
+
}
|
|
20352
|
+
return update(updated, original);
|
|
20353
|
+
}
|
|
20354
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
20355
|
+
var node = createBaseDeclaration(266);
|
|
20356
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20259
20357
|
node.importClause = importClause;
|
|
20260
20358
|
node.moduleSpecifier = moduleSpecifier;
|
|
20261
20359
|
node.assertClause = assertClause;
|
|
@@ -20263,17 +20361,23 @@ var ts;
|
|
|
20263
20361
|
propagateChildFlags(node.importClause) |
|
|
20264
20362
|
propagateChildFlags(node.moduleSpecifier);
|
|
20265
20363
|
node.transformFlags &= ~67108864;
|
|
20364
|
+
node.decorators = undefined;
|
|
20266
20365
|
return node;
|
|
20267
20366
|
}
|
|
20268
|
-
function updateImportDeclaration(node,
|
|
20269
|
-
return node.
|
|
20270
|
-
|| node.modifiers !== modifiers
|
|
20367
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
20368
|
+
return node.modifiers !== modifiers
|
|
20271
20369
|
|| node.importClause !== importClause
|
|
20272
20370
|
|| node.moduleSpecifier !== moduleSpecifier
|
|
20273
20371
|
|| node.assertClause !== assertClause
|
|
20274
|
-
?
|
|
20372
|
+
? finishUpdateImportDeclaration(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node)
|
|
20275
20373
|
: node;
|
|
20276
20374
|
}
|
|
20375
|
+
function finishUpdateImportDeclaration(updated, original) {
|
|
20376
|
+
if (updated !== original) {
|
|
20377
|
+
updated.decorators = original.decorators;
|
|
20378
|
+
}
|
|
20379
|
+
return update(updated, original);
|
|
20380
|
+
}
|
|
20277
20381
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
20278
20382
|
var node = createBaseNode(267);
|
|
20279
20383
|
node.isTypeOnly = isTypeOnly;
|
|
@@ -20389,45 +20493,60 @@ var ts;
|
|
|
20389
20493
|
? update(createImportSpecifier(isTypeOnly, propertyName, name), node)
|
|
20390
20494
|
: node;
|
|
20391
20495
|
}
|
|
20392
|
-
function createExportAssignment(
|
|
20393
|
-
var node = createBaseDeclaration(271
|
|
20496
|
+
function createExportAssignment(modifiers, isExportEquals, expression) {
|
|
20497
|
+
var node = createBaseDeclaration(271);
|
|
20498
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20394
20499
|
node.isExportEquals = isExportEquals;
|
|
20395
20500
|
node.expression = isExportEquals
|
|
20396
20501
|
? parenthesizerRules().parenthesizeRightSideOfBinary(63, undefined, expression)
|
|
20397
20502
|
: parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
|
|
20398
|
-
node.transformFlags |= propagateChildFlags(node.expression);
|
|
20503
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
20399
20504
|
node.transformFlags &= ~67108864;
|
|
20505
|
+
node.decorators = undefined;
|
|
20400
20506
|
return node;
|
|
20401
20507
|
}
|
|
20402
|
-
function updateExportAssignment(node,
|
|
20403
|
-
return node.
|
|
20404
|
-
|| node.modifiers !== modifiers
|
|
20508
|
+
function updateExportAssignment(node, modifiers, expression) {
|
|
20509
|
+
return node.modifiers !== modifiers
|
|
20405
20510
|
|| node.expression !== expression
|
|
20406
|
-
?
|
|
20511
|
+
? finishUpdateExportAssignment(createExportAssignment(modifiers, node.isExportEquals, expression), node)
|
|
20407
20512
|
: node;
|
|
20408
20513
|
}
|
|
20409
|
-
function
|
|
20410
|
-
|
|
20514
|
+
function finishUpdateExportAssignment(updated, original) {
|
|
20515
|
+
if (updated !== original) {
|
|
20516
|
+
updated.decorators = original.decorators;
|
|
20517
|
+
}
|
|
20518
|
+
return update(updated, original);
|
|
20519
|
+
}
|
|
20520
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
20521
|
+
var node = createBaseDeclaration(272);
|
|
20522
|
+
node.modifiers = asNodeArray(modifiers);
|
|
20411
20523
|
node.isTypeOnly = isTypeOnly;
|
|
20412
20524
|
node.exportClause = exportClause;
|
|
20413
20525
|
node.moduleSpecifier = moduleSpecifier;
|
|
20414
20526
|
node.assertClause = assertClause;
|
|
20415
20527
|
node.transformFlags |=
|
|
20416
|
-
|
|
20528
|
+
propagateChildrenFlags(node.modifiers) |
|
|
20529
|
+
propagateChildFlags(node.exportClause) |
|
|
20417
20530
|
propagateChildFlags(node.moduleSpecifier);
|
|
20418
20531
|
node.transformFlags &= ~67108864;
|
|
20532
|
+
node.decorators = undefined;
|
|
20419
20533
|
return node;
|
|
20420
20534
|
}
|
|
20421
|
-
function updateExportDeclaration(node,
|
|
20422
|
-
return node.
|
|
20423
|
-
|| node.modifiers !== modifiers
|
|
20535
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
20536
|
+
return node.modifiers !== modifiers
|
|
20424
20537
|
|| node.isTypeOnly !== isTypeOnly
|
|
20425
20538
|
|| node.exportClause !== exportClause
|
|
20426
20539
|
|| node.moduleSpecifier !== moduleSpecifier
|
|
20427
20540
|
|| node.assertClause !== assertClause
|
|
20428
|
-
?
|
|
20541
|
+
? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node)
|
|
20429
20542
|
: node;
|
|
20430
20543
|
}
|
|
20544
|
+
function finishUpdateExportDeclaration(updated, original) {
|
|
20545
|
+
if (updated !== original) {
|
|
20546
|
+
updated.decorators = original.decorators;
|
|
20547
|
+
}
|
|
20548
|
+
return update(updated, original);
|
|
20549
|
+
}
|
|
20431
20550
|
function createNamedExports(elements) {
|
|
20432
20551
|
var node = createBaseNode(273);
|
|
20433
20552
|
node.elements = createNodeArray(elements);
|
|
@@ -20459,7 +20578,7 @@ var ts;
|
|
|
20459
20578
|
: node;
|
|
20460
20579
|
}
|
|
20461
20580
|
function createMissingDeclaration() {
|
|
20462
|
-
var node = createBaseDeclaration(276
|
|
20581
|
+
var node = createBaseDeclaration(276);
|
|
20463
20582
|
return node;
|
|
20464
20583
|
}
|
|
20465
20584
|
function createExternalModuleReference(expression) {
|
|
@@ -20499,7 +20618,7 @@ var ts;
|
|
|
20499
20618
|
: node;
|
|
20500
20619
|
}
|
|
20501
20620
|
function createJSDocFunctionType(parameters, type) {
|
|
20502
|
-
var node = createBaseSignatureDeclaration(317, undefined, undefined, undefined,
|
|
20621
|
+
var node = createBaseSignatureDeclaration(317, undefined, undefined, undefined, parameters, type);
|
|
20503
20622
|
return node;
|
|
20504
20623
|
}
|
|
20505
20624
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
@@ -21038,57 +21157,61 @@ var ts;
|
|
|
21038
21157
|
: node;
|
|
21039
21158
|
}
|
|
21040
21159
|
function createPropertyAssignment(name, initializer) {
|
|
21041
|
-
var node = createBaseNamedDeclaration(296, undefined,
|
|
21160
|
+
var node = createBaseNamedDeclaration(296, undefined, name);
|
|
21042
21161
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
21043
21162
|
node.transformFlags |=
|
|
21044
21163
|
propagateChildFlags(node.name) |
|
|
21045
21164
|
propagateChildFlags(node.initializer);
|
|
21165
|
+
node.decorators = undefined;
|
|
21166
|
+
node.modifiers = undefined;
|
|
21167
|
+
node.questionToken = undefined;
|
|
21168
|
+
node.exclamationToken = undefined;
|
|
21046
21169
|
return node;
|
|
21047
21170
|
}
|
|
21171
|
+
function updatePropertyAssignment(node, name, initializer) {
|
|
21172
|
+
return node.name !== name
|
|
21173
|
+
|| node.initializer !== initializer
|
|
21174
|
+
? finishUpdatePropertyAssignment(createPropertyAssignment(name, initializer), node)
|
|
21175
|
+
: node;
|
|
21176
|
+
}
|
|
21048
21177
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
21049
|
-
if (original
|
|
21178
|
+
if (updated !== original) {
|
|
21050
21179
|
updated.decorators = original.decorators;
|
|
21051
|
-
if (original.modifiers)
|
|
21052
21180
|
updated.modifiers = original.modifiers;
|
|
21053
|
-
if (original.questionToken)
|
|
21054
21181
|
updated.questionToken = original.questionToken;
|
|
21055
|
-
if (original.exclamationToken)
|
|
21056
21182
|
updated.exclamationToken = original.exclamationToken;
|
|
21183
|
+
}
|
|
21057
21184
|
return update(updated, original);
|
|
21058
21185
|
}
|
|
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
21186
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
21066
|
-
var node = createBaseNamedDeclaration(297, undefined,
|
|
21187
|
+
var node = createBaseNamedDeclaration(297, undefined, name);
|
|
21067
21188
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
21068
21189
|
node.transformFlags |=
|
|
21069
21190
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
21070
21191
|
1024;
|
|
21192
|
+
node.equalsToken = undefined;
|
|
21193
|
+
node.decorators = undefined;
|
|
21194
|
+
node.modifiers = undefined;
|
|
21195
|
+
node.questionToken = undefined;
|
|
21196
|
+
node.exclamationToken = undefined;
|
|
21071
21197
|
return node;
|
|
21072
21198
|
}
|
|
21199
|
+
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
21200
|
+
return node.name !== name
|
|
21201
|
+
|| node.objectAssignmentInitializer !== objectAssignmentInitializer
|
|
21202
|
+
? finishUpdateShorthandPropertyAssignment(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
|
|
21203
|
+
: node;
|
|
21204
|
+
}
|
|
21073
21205
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
21074
|
-
if (original
|
|
21206
|
+
if (updated !== original) {
|
|
21207
|
+
updated.equalsToken = original.equalsToken;
|
|
21075
21208
|
updated.decorators = original.decorators;
|
|
21076
|
-
if (original.modifiers)
|
|
21077
21209
|
updated.modifiers = original.modifiers;
|
|
21078
|
-
if (original.equalsToken)
|
|
21079
|
-
updated.equalsToken = original.equalsToken;
|
|
21080
|
-
if (original.questionToken)
|
|
21081
21210
|
updated.questionToken = original.questionToken;
|
|
21082
|
-
if (original.exclamationToken)
|
|
21083
21211
|
updated.exclamationToken = original.exclamationToken;
|
|
21212
|
+
}
|
|
21084
21213
|
return update(updated, original);
|
|
21085
21214
|
}
|
|
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
21215
|
function createSpreadAssignment(expression) {
|
|
21093
21216
|
var node = createBaseNode(298);
|
|
21094
21217
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
@@ -21339,10 +21462,10 @@ var ts;
|
|
|
21339
21462
|
return createVoidExpression(createNumericLiteral("0"));
|
|
21340
21463
|
}
|
|
21341
21464
|
function createExportDefault(expression) {
|
|
21342
|
-
return createExportAssignment(undefined,
|
|
21465
|
+
return createExportAssignment(undefined, false, expression);
|
|
21343
21466
|
}
|
|
21344
21467
|
function createExternalModuleExport(exportName) {
|
|
21345
|
-
return createExportDeclaration(undefined,
|
|
21468
|
+
return createExportDeclaration(undefined, false, createNamedExports([
|
|
21346
21469
|
createExportSpecifier(false, undefined, exportName)
|
|
21347
21470
|
]));
|
|
21348
21471
|
}
|
|
@@ -21509,7 +21632,7 @@ var ts;
|
|
|
21509
21632
|
}
|
|
21510
21633
|
function createAssignmentTargetWrapper(paramName, expression) {
|
|
21511
21634
|
return createPropertyAccessExpression(createParenthesizedExpression(createObjectLiteralExpression([
|
|
21512
|
-
createSetAccessorDeclaration(undefined,
|
|
21635
|
+
createSetAccessorDeclaration(undefined, "value", [createParameterDeclaration(undefined, undefined, paramName, undefined, undefined, undefined)], createBlock([
|
|
21513
21636
|
createExpressionStatement(expression)
|
|
21514
21637
|
]))
|
|
21515
21638
|
])), "value");
|
|
@@ -21685,30 +21808,32 @@ var ts;
|
|
|
21685
21808
|
else {
|
|
21686
21809
|
modifierArray = modifiers;
|
|
21687
21810
|
}
|
|
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.
|
|
21811
|
+
return ts.isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) :
|
|
21812
|
+
ts.isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) :
|
|
21813
|
+
ts.isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) :
|
|
21814
|
+
ts.isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) :
|
|
21815
|
+
ts.isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a = node.questionToken) !== null && _a !== void 0 ? _a : node.exclamationToken, node.type, node.initializer) :
|
|
21816
|
+
ts.isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) :
|
|
21817
|
+
ts.isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21818
|
+
ts.isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) :
|
|
21819
|
+
ts.isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) :
|
|
21820
|
+
ts.isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) :
|
|
21821
|
+
ts.isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) :
|
|
21822
|
+
ts.isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21823
|
+
ts.isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) :
|
|
21824
|
+
ts.isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21825
|
+
ts.isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) :
|
|
21826
|
+
ts.isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) :
|
|
21827
|
+
ts.isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21828
|
+
ts.isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) :
|
|
21829
|
+
ts.isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) :
|
|
21830
|
+
ts.isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) :
|
|
21831
|
+
ts.isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) :
|
|
21832
|
+
ts.isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) :
|
|
21833
|
+
ts.isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) :
|
|
21834
|
+
ts.isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) :
|
|
21835
|
+
ts.isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) :
|
|
21836
|
+
ts.Debug.assertNever(node);
|
|
21712
21837
|
}
|
|
21713
21838
|
function asNodeArray(array) {
|
|
21714
21839
|
return array ? createNodeArray(array) : undefined;
|
|
@@ -22958,6 +23083,10 @@ var ts;
|
|
|
22958
23083
|
return node.kind === 126;
|
|
22959
23084
|
}
|
|
22960
23085
|
ts.isAbstractModifier = isAbstractModifier;
|
|
23086
|
+
function isOverrideModifier(node) {
|
|
23087
|
+
return node.kind === 159;
|
|
23088
|
+
}
|
|
23089
|
+
ts.isOverrideModifier = isOverrideModifier;
|
|
22961
23090
|
function isSuperKeyword(node) {
|
|
22962
23091
|
return node.kind === 106;
|
|
22963
23092
|
}
|
|
@@ -23722,7 +23851,7 @@ var ts;
|
|
|
23722
23851
|
var ts;
|
|
23723
23852
|
(function (ts) {
|
|
23724
23853
|
function createEmptyExports(factory) {
|
|
23725
|
-
return factory.createExportDeclaration(undefined,
|
|
23854
|
+
return factory.createExportDeclaration(undefined, false, factory.createNamedExports([]), undefined);
|
|
23726
23855
|
}
|
|
23727
23856
|
ts.createEmptyExports = createEmptyExports;
|
|
23728
23857
|
function createMemberAccessForPropertyName(factory, target, memberName, location) {
|
|
@@ -23856,8 +23985,8 @@ var ts;
|
|
|
23856
23985
|
return ts.setTextRange(factory.createObjectDefinePropertyCall(receiver, createExpressionForPropertyName(factory, property.name), factory.createPropertyDescriptor({
|
|
23857
23986
|
enumerable: factory.createFalse(),
|
|
23858
23987
|
configurable: true,
|
|
23859
|
-
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(getAccessor
|
|
23860
|
-
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(setAccessor
|
|
23988
|
+
get: getAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(getAccessor), undefined, undefined, undefined, getAccessor.parameters, undefined, getAccessor.body), getAccessor), getAccessor),
|
|
23989
|
+
set: setAccessor && ts.setTextRange(ts.setOriginalNode(factory.createFunctionExpression(ts.getModifiers(setAccessor), undefined, undefined, undefined, setAccessor.parameters, undefined, setAccessor.body), setAccessor), setAccessor)
|
|
23861
23990
|
}, !multiLine)), firstAccessor);
|
|
23862
23991
|
}
|
|
23863
23992
|
return undefined;
|
|
@@ -23869,7 +23998,7 @@ var ts;
|
|
|
23869
23998
|
return ts.setOriginalNode(ts.setTextRange(factory.createAssignment(createMemberAccessForPropertyName(factory, receiver, property.name, property.name), factory.cloneNode(property.name)), property), property);
|
|
23870
23999
|
}
|
|
23871
24000
|
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
|
|
24001
|
+
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
24002
|
}
|
|
23874
24003
|
function createExpressionForObjectLiteralElementLike(factory, node, property, receiver) {
|
|
23875
24004
|
if (property.name && ts.isPrivateIdentifier(property.name)) {
|
|
@@ -24047,7 +24176,7 @@ var ts;
|
|
|
24047
24176
|
}
|
|
24048
24177
|
}
|
|
24049
24178
|
if (namedBindings) {
|
|
24050
|
-
var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined,
|
|
24179
|
+
var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined, nodeFactory.createImportClause(false, undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText), undefined);
|
|
24051
24180
|
ts.addEmitFlags(externalHelpersImportDeclaration, 67108864);
|
|
24052
24181
|
return externalHelpersImportDeclaration;
|
|
24053
24182
|
}
|
|
@@ -24256,9 +24385,55 @@ var ts;
|
|
|
24256
24385
|
}
|
|
24257
24386
|
}
|
|
24258
24387
|
ts.getJSDocTypeAliasName = getJSDocTypeAliasName;
|
|
24259
|
-
function
|
|
24388
|
+
function canHaveIllegalType(node) {
|
|
24389
|
+
var kind = node.kind;
|
|
24390
|
+
return kind === 171
|
|
24391
|
+
|| kind === 173;
|
|
24392
|
+
}
|
|
24393
|
+
ts.canHaveIllegalType = canHaveIllegalType;
|
|
24394
|
+
function canHaveIllegalTypeParameters(node) {
|
|
24395
|
+
var kind = node.kind;
|
|
24396
|
+
return kind === 171
|
|
24397
|
+
|| kind === 172
|
|
24398
|
+
|| kind === 173;
|
|
24399
|
+
}
|
|
24400
|
+
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
24401
|
+
function canHaveDecorators(node) {
|
|
24260
24402
|
var kind = node.kind;
|
|
24261
24403
|
return kind === 164
|
|
24404
|
+
|| kind === 167
|
|
24405
|
+
|| kind === 169
|
|
24406
|
+
|| kind === 172
|
|
24407
|
+
|| kind === 173
|
|
24408
|
+
|| kind === 226
|
|
24409
|
+
|| kind === 257;
|
|
24410
|
+
}
|
|
24411
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
24412
|
+
function canHaveIllegalDecorators(node) {
|
|
24413
|
+
var kind = node.kind;
|
|
24414
|
+
return kind === 296
|
|
24415
|
+
|| kind === 297
|
|
24416
|
+
|| kind === 256
|
|
24417
|
+
|| kind === 171
|
|
24418
|
+
|| kind === 176
|
|
24419
|
+
|| kind === 170
|
|
24420
|
+
|| kind === 276
|
|
24421
|
+
|| kind === 237
|
|
24422
|
+
|| kind === 258
|
|
24423
|
+
|| kind === 259
|
|
24424
|
+
|| kind === 260
|
|
24425
|
+
|| kind === 261
|
|
24426
|
+
|| kind === 265
|
|
24427
|
+
|| kind === 266
|
|
24428
|
+
|| kind === 264
|
|
24429
|
+
|| kind === 272
|
|
24430
|
+
|| kind === 271;
|
|
24431
|
+
}
|
|
24432
|
+
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
24433
|
+
function canHaveModifiers(node) {
|
|
24434
|
+
var kind = node.kind;
|
|
24435
|
+
return kind === 163
|
|
24436
|
+
|| kind === 164
|
|
24262
24437
|
|| kind === 166
|
|
24263
24438
|
|| kind === 167
|
|
24264
24439
|
|| kind === 168
|
|
@@ -24267,6 +24442,7 @@ var ts;
|
|
|
24267
24442
|
|| kind === 172
|
|
24268
24443
|
|| kind === 173
|
|
24269
24444
|
|| kind === 176
|
|
24445
|
+
|| kind === 180
|
|
24270
24446
|
|| kind === 213
|
|
24271
24447
|
|| kind === 214
|
|
24272
24448
|
|| kind === 226
|
|
@@ -24283,6 +24459,16 @@ var ts;
|
|
|
24283
24459
|
|| kind === 272;
|
|
24284
24460
|
}
|
|
24285
24461
|
ts.canHaveModifiers = canHaveModifiers;
|
|
24462
|
+
function canHaveIllegalModifiers(node) {
|
|
24463
|
+
var kind = node.kind;
|
|
24464
|
+
return kind === 170
|
|
24465
|
+
|| kind === 296
|
|
24466
|
+
|| kind === 297
|
|
24467
|
+
|| kind === 179
|
|
24468
|
+
|| kind === 276
|
|
24469
|
+
|| kind === 264;
|
|
24470
|
+
}
|
|
24471
|
+
ts.canHaveIllegalModifiers = canHaveIllegalModifiers;
|
|
24286
24472
|
ts.isTypeNodeOrTypeParameterDeclaration = ts.or(ts.isTypeNode, ts.isTypeParameterDeclaration);
|
|
24287
24473
|
ts.isQuestionOrExclamationToken = ts.or(ts.isQuestionToken, ts.isExclamationToken);
|
|
24288
24474
|
ts.isIdentifierOrThisTypeNode = ts.or(ts.isIdentifier, ts.isThisTypeNode);
|
|
@@ -24565,7 +24751,7 @@ var ts;
|
|
|
24565
24751
|
}
|
|
24566
24752
|
ts.isFileProbablyExternalModule = isFileProbablyExternalModule;
|
|
24567
24753
|
function isAnExternalModuleIndicatorNode(node) {
|
|
24568
|
-
return hasModifierOfKind(node, 93)
|
|
24754
|
+
return ts.canHaveModifiers(node) && hasModifierOfKind(node, 93)
|
|
24569
24755
|
|| ts.isImportEqualsDeclaration(node) && ts.isExternalModuleReference(node.moduleReference)
|
|
24570
24756
|
|| ts.isImportDeclaration(node)
|
|
24571
24757
|
|| ts.isExportAssignment(node)
|
|
@@ -24610,24 +24796,21 @@ var ts;
|
|
|
24610
24796
|
case 298:
|
|
24611
24797
|
return visitNode(cbNode, node.expression);
|
|
24612
24798
|
case 164:
|
|
24613
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24614
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24799
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24615
24800
|
visitNode(cbNode, node.dotDotDotToken) ||
|
|
24616
24801
|
visitNode(cbNode, node.name) ||
|
|
24617
24802
|
visitNode(cbNode, node.questionToken) ||
|
|
24618
24803
|
visitNode(cbNode, node.type) ||
|
|
24619
24804
|
visitNode(cbNode, node.initializer);
|
|
24620
24805
|
case 167:
|
|
24621
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24622
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24806
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24623
24807
|
visitNode(cbNode, node.name) ||
|
|
24624
24808
|
visitNode(cbNode, node.questionToken) ||
|
|
24625
24809
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24626
24810
|
visitNode(cbNode, node.type) ||
|
|
24627
24811
|
visitNode(cbNode, node.initializer);
|
|
24628
24812
|
case 166:
|
|
24629
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24630
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24813
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24631
24814
|
visitNode(cbNode, node.name) ||
|
|
24632
24815
|
visitNode(cbNode, node.questionToken) ||
|
|
24633
24816
|
visitNode(cbNode, node.type) ||
|
|
@@ -24637,45 +24820,97 @@ var ts;
|
|
|
24637
24820
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24638
24821
|
visitNode(cbNode, node.name) ||
|
|
24639
24822
|
visitNode(cbNode, node.questionToken) ||
|
|
24823
|
+
visitNode(cbNode, node.exclamationToken) ||
|
|
24640
24824
|
visitNode(cbNode, node.initializer);
|
|
24641
24825
|
case 254:
|
|
24642
|
-
return
|
|
24643
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24644
|
-
visitNode(cbNode, node.name) ||
|
|
24826
|
+
return visitNode(cbNode, node.name) ||
|
|
24645
24827
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24646
24828
|
visitNode(cbNode, node.type) ||
|
|
24647
24829
|
visitNode(cbNode, node.initializer);
|
|
24648
24830
|
case 203:
|
|
24649
|
-
return
|
|
24650
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24651
|
-
visitNode(cbNode, node.dotDotDotToken) ||
|
|
24831
|
+
return visitNode(cbNode, node.dotDotDotToken) ||
|
|
24652
24832
|
visitNode(cbNode, node.propertyName) ||
|
|
24653
24833
|
visitNode(cbNode, node.name) ||
|
|
24654
24834
|
visitNode(cbNode, node.initializer);
|
|
24655
|
-
case 179:
|
|
24656
|
-
case 180:
|
|
24657
|
-
case 174:
|
|
24658
|
-
case 175:
|
|
24659
24835
|
case 176:
|
|
24660
24836
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24661
24837
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24662
24838
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24663
24839
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24664
24840
|
visitNode(cbNode, node.type);
|
|
24841
|
+
case 180:
|
|
24842
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24843
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24844
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24845
|
+
visitNode(cbNode, node.type);
|
|
24846
|
+
case 179:
|
|
24847
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24848
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24849
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24850
|
+
visitNode(cbNode, node.type);
|
|
24851
|
+
case 174:
|
|
24852
|
+
case 175:
|
|
24853
|
+
return visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24854
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24855
|
+
visitNode(cbNode, node.type);
|
|
24665
24856
|
case 169:
|
|
24857
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24858
|
+
visitNode(cbNode, node.asteriskToken) ||
|
|
24859
|
+
visitNode(cbNode, node.name) ||
|
|
24860
|
+
visitNode(cbNode, node.questionToken) ||
|
|
24861
|
+
visitNode(cbNode, node.exclamationToken) ||
|
|
24862
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24863
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24864
|
+
visitNode(cbNode, node.type) ||
|
|
24865
|
+
visitNode(cbNode, node.body);
|
|
24666
24866
|
case 168:
|
|
24867
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24868
|
+
visitNode(cbNode, node.name) ||
|
|
24869
|
+
visitNode(cbNode, node.questionToken) ||
|
|
24870
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24871
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24872
|
+
visitNode(cbNode, node.type);
|
|
24667
24873
|
case 171:
|
|
24874
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24875
|
+
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24876
|
+
visitNode(cbNode, node.name) ||
|
|
24877
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24878
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24879
|
+
visitNode(cbNode, node.type) ||
|
|
24880
|
+
visitNode(cbNode, node.body);
|
|
24668
24881
|
case 172:
|
|
24882
|
+
return 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);
|
|
24669
24888
|
case 173:
|
|
24670
|
-
|
|
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);
|
|
24671
24895
|
case 256:
|
|
24672
|
-
case 214:
|
|
24673
24896
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24674
24897
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24675
24898
|
visitNode(cbNode, node.asteriskToken) ||
|
|
24676
24899
|
visitNode(cbNode, node.name) ||
|
|
24677
|
-
|
|
24678
|
-
|
|
24900
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24901
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24902
|
+
visitNode(cbNode, node.type) ||
|
|
24903
|
+
visitNode(cbNode, node.body);
|
|
24904
|
+
case 213:
|
|
24905
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24906
|
+
visitNode(cbNode, node.asteriskToken) ||
|
|
24907
|
+
visitNode(cbNode, node.name) ||
|
|
24908
|
+
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24909
|
+
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24910
|
+
visitNode(cbNode, node.type) ||
|
|
24911
|
+
visitNode(cbNode, node.body);
|
|
24912
|
+
case 214:
|
|
24913
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24679
24914
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24680
24915
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24681
24916
|
visitNode(cbNode, node.type) ||
|
|
@@ -24875,8 +25110,7 @@ var ts;
|
|
|
24875
25110
|
return visitNode(cbNode, node.expression);
|
|
24876
25111
|
case 257:
|
|
24877
25112
|
case 226:
|
|
24878
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
24879
|
-
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
25113
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24880
25114
|
visitNode(cbNode, node.name) ||
|
|
24881
25115
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24882
25116
|
visitNodes(cbNode, cbNodes, node.heritageClauses) ||
|
|
@@ -24927,7 +25161,8 @@ var ts;
|
|
|
24927
25161
|
return visitNode(cbNode, node.name) ||
|
|
24928
25162
|
visitNode(cbNode, node.value);
|
|
24929
25163
|
case 264:
|
|
24930
|
-
return
|
|
25164
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
25165
|
+
visitNode(cbNode, node.name);
|
|
24931
25166
|
case 268:
|
|
24932
25167
|
return visitNode(cbNode, node.name);
|
|
24933
25168
|
case 274:
|
|
@@ -24950,13 +25185,17 @@ var ts;
|
|
|
24950
25185
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24951
25186
|
visitNode(cbNode, node.expression);
|
|
24952
25187
|
case 223:
|
|
24953
|
-
return visitNode(cbNode, node.head) ||
|
|
25188
|
+
return visitNode(cbNode, node.head) ||
|
|
25189
|
+
visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
24954
25190
|
case 233:
|
|
24955
|
-
return visitNode(cbNode, node.expression) ||
|
|
25191
|
+
return visitNode(cbNode, node.expression) ||
|
|
25192
|
+
visitNode(cbNode, node.literal);
|
|
24956
25193
|
case 198:
|
|
24957
|
-
return visitNode(cbNode, node.head) ||
|
|
25194
|
+
return visitNode(cbNode, node.head) ||
|
|
25195
|
+
visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
24958
25196
|
case 199:
|
|
24959
|
-
return visitNode(cbNode, node.type) ||
|
|
25197
|
+
return visitNode(cbNode, node.type) ||
|
|
25198
|
+
visitNode(cbNode, node.literal);
|
|
24960
25199
|
case 162:
|
|
24961
25200
|
return visitNode(cbNode, node.expression);
|
|
24962
25201
|
case 291:
|
|
@@ -24967,7 +25206,8 @@ var ts;
|
|
|
24967
25206
|
case 277:
|
|
24968
25207
|
return visitNode(cbNode, node.expression);
|
|
24969
25208
|
case 276:
|
|
24970
|
-
return visitNodes(cbNode, cbNodes, node.decorators)
|
|
25209
|
+
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
25210
|
+
visitNodes(cbNode, cbNodes, node.modifiers);
|
|
24971
25211
|
case 351:
|
|
24972
25212
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
24973
25213
|
case 278:
|
|
@@ -26783,7 +27023,7 @@ var ts;
|
|
|
26783
27023
|
name = parseIdentifierName();
|
|
26784
27024
|
parseExpected(58);
|
|
26785
27025
|
}
|
|
26786
|
-
return finishNode(factory.createParameterDeclaration(undefined, undefined,
|
|
27026
|
+
return finishNode(factory.createParameterDeclaration(undefined, undefined, name, undefined, parseJSDocType(), undefined), pos);
|
|
26787
27027
|
}
|
|
26788
27028
|
function parseJSDocType() {
|
|
26789
27029
|
scanner.setInJSDocType(true);
|
|
@@ -26876,7 +27116,7 @@ var ts;
|
|
|
26876
27116
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
26877
27117
|
var decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : parseDecorators();
|
|
26878
27118
|
if (token() === 108) {
|
|
26879
|
-
var node_1 = factory.createParameterDeclaration(decorators, undefined,
|
|
27119
|
+
var node_1 = factory.createParameterDeclaration(decorators, undefined, createIdentifier(true), undefined, parseTypeAnnotation(), undefined);
|
|
26880
27120
|
if (decorators) {
|
|
26881
27121
|
parseErrorAtRange(decorators[0], ts.Diagnostics.Decorators_may_not_be_applied_to_this_parameters);
|
|
26882
27122
|
}
|
|
@@ -26884,12 +27124,12 @@ var ts;
|
|
|
26884
27124
|
}
|
|
26885
27125
|
var savedTopLevel = topLevel;
|
|
26886
27126
|
topLevel = false;
|
|
26887
|
-
var modifiers = parseModifiers();
|
|
27127
|
+
var modifiers = combineDecoratorsAndModifiers(decorators, parseModifiers());
|
|
26888
27128
|
var dotDotDotToken = parseOptionalToken(25);
|
|
26889
27129
|
if (!allowAmbiguity && !isParameterNameStart()) {
|
|
26890
27130
|
return undefined;
|
|
26891
27131
|
}
|
|
26892
|
-
var node = withJSDoc(finishNode(factory.createParameterDeclaration(
|
|
27132
|
+
var node = withJSDoc(finishNode(factory.createParameterDeclaration(modifiers, dotDotDotToken, parseNameOfParameter(modifiers), parseOptionalToken(57), parseTypeAnnotation(), parseInitializer()), pos), hasJSDoc);
|
|
26893
27133
|
topLevel = savedTopLevel;
|
|
26894
27134
|
return node;
|
|
26895
27135
|
}
|
|
@@ -26987,7 +27227,8 @@ var ts;
|
|
|
26987
27227
|
var parameters = parseBracketedList(16, function () { return parseParameter(false); }, 22, 23);
|
|
26988
27228
|
var type = parseTypeAnnotation();
|
|
26989
27229
|
parseTypeMemberSemicolon();
|
|
26990
|
-
var node = factory.createIndexSignature(
|
|
27230
|
+
var node = factory.createIndexSignature(modifiers, parameters, type);
|
|
27231
|
+
node.decorators = decorators;
|
|
26991
27232
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
26992
27233
|
}
|
|
26993
27234
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -27711,7 +27952,7 @@ var ts;
|
|
|
27711
27952
|
}
|
|
27712
27953
|
function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
|
|
27713
27954
|
ts.Debug.assert(token() === 38, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
27714
|
-
var parameter = factory.createParameterDeclaration(undefined, undefined,
|
|
27955
|
+
var parameter = factory.createParameterDeclaration(undefined, undefined, identifier, undefined, undefined, undefined);
|
|
27715
27956
|
finishNode(parameter, identifier.pos);
|
|
27716
27957
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
27717
27958
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
@@ -29381,7 +29622,8 @@ var ts;
|
|
|
29381
29622
|
var type = parseReturnType(58, false);
|
|
29382
29623
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected);
|
|
29383
29624
|
setAwaitContext(savedAwaitContext);
|
|
29384
|
-
var node = factory.createFunctionDeclaration(
|
|
29625
|
+
var node = factory.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
29626
|
+
node.decorators = decorators;
|
|
29385
29627
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29386
29628
|
}
|
|
29387
29629
|
function parseConstructorName() {
|
|
@@ -29402,7 +29644,8 @@ var ts;
|
|
|
29402
29644
|
var parameters = parseParameters(0);
|
|
29403
29645
|
var type = parseReturnType(58, false);
|
|
29404
29646
|
var body = parseFunctionBlockOrSemicolon(0, ts.Diagnostics.or_expected);
|
|
29405
|
-
var node = factory.createConstructorDeclaration(
|
|
29647
|
+
var node = factory.createConstructorDeclaration(modifiers, parameters, body);
|
|
29648
|
+
node.decorators = decorators;
|
|
29406
29649
|
node.typeParameters = typeParameters;
|
|
29407
29650
|
node.type = type;
|
|
29408
29651
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
@@ -29416,7 +29659,7 @@ var ts;
|
|
|
29416
29659
|
var parameters = parseParameters(isGenerator | isAsync);
|
|
29417
29660
|
var type = parseReturnType(58, false);
|
|
29418
29661
|
var body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage);
|
|
29419
|
-
var node = factory.createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body);
|
|
29662
|
+
var node = factory.createMethodDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), asteriskToken, name, questionToken, typeParameters, parameters, type, body);
|
|
29420
29663
|
node.exclamationToken = exclamationToken;
|
|
29421
29664
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29422
29665
|
}
|
|
@@ -29425,7 +29668,7 @@ var ts;
|
|
|
29425
29668
|
var type = parseTypeAnnotation();
|
|
29426
29669
|
var initializer = doOutsideOfContext(8192 | 32768 | 4096, parseInitializer);
|
|
29427
29670
|
parseSemicolonAfterPropertyName(name, type, initializer);
|
|
29428
|
-
var node = factory.createPropertyDeclaration(decorators, modifiers, name, questionToken || exclamationToken, type, initializer);
|
|
29671
|
+
var node = factory.createPropertyDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, questionToken || exclamationToken, type, initializer);
|
|
29429
29672
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29430
29673
|
}
|
|
29431
29674
|
function parsePropertyOrMethodDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29444,10 +29687,10 @@ var ts;
|
|
|
29444
29687
|
var type = parseReturnType(58, false);
|
|
29445
29688
|
var body = parseFunctionBlockOrSemicolon(0);
|
|
29446
29689
|
var node = kind === 172
|
|
29447
|
-
? factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body)
|
|
29448
|
-
: factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body);
|
|
29690
|
+
? factory.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body)
|
|
29691
|
+
: factory.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body);
|
|
29449
29692
|
node.typeParameters = typeParameters;
|
|
29450
|
-
if (
|
|
29693
|
+
if (ts.isSetAccessorDeclaration(node))
|
|
29451
29694
|
node.type = type;
|
|
29452
29695
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29453
29696
|
}
|
|
@@ -29494,7 +29737,10 @@ var ts;
|
|
|
29494
29737
|
function parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
29495
29738
|
parseExpectedToken(124);
|
|
29496
29739
|
var body = parseClassStaticBlockBody();
|
|
29497
|
-
|
|
29740
|
+
var node = withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
29741
|
+
node.decorators = decorators;
|
|
29742
|
+
node.modifiers = modifiers;
|
|
29743
|
+
return node;
|
|
29498
29744
|
}
|
|
29499
29745
|
function parseClassStaticBlockBody() {
|
|
29500
29746
|
var savedYieldContext = inYieldContext();
|
|
@@ -29553,6 +29799,15 @@ var ts;
|
|
|
29553
29799
|
}
|
|
29554
29800
|
return finishNode(factory.createToken(kind), pos);
|
|
29555
29801
|
}
|
|
29802
|
+
function combineDecoratorsAndModifiers(decorators, modifiers) {
|
|
29803
|
+
if (!decorators)
|
|
29804
|
+
return modifiers;
|
|
29805
|
+
if (!modifiers)
|
|
29806
|
+
return decorators;
|
|
29807
|
+
var decoratorsAndModifiers = factory.createNodeArray(ts.concatenate(decorators, modifiers));
|
|
29808
|
+
ts.setTextRangePosEnd(decoratorsAndModifiers, decorators.pos, modifiers.end);
|
|
29809
|
+
return decoratorsAndModifiers;
|
|
29810
|
+
}
|
|
29556
29811
|
function parseModifiers(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
29557
29812
|
var pos = getNodePos();
|
|
29558
29813
|
var list, modifier, hasSeenStatic = false;
|
|
@@ -29647,8 +29902,8 @@ var ts;
|
|
|
29647
29902
|
}
|
|
29648
29903
|
setAwaitContext(savedAwaitContext);
|
|
29649
29904
|
var node = kind === 257
|
|
29650
|
-
? factory.createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members)
|
|
29651
|
-
: factory.createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members);
|
|
29905
|
+
? factory.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members)
|
|
29906
|
+
: factory.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members);
|
|
29652
29907
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29653
29908
|
}
|
|
29654
29909
|
function parseNameOfClassDeclarationOrExpression() {
|
|
@@ -29698,7 +29953,8 @@ var ts;
|
|
|
29698
29953
|
var typeParameters = parseTypeParameters();
|
|
29699
29954
|
var heritageClauses = parseHeritageClauses();
|
|
29700
29955
|
var members = parseObjectTypeMembers();
|
|
29701
|
-
var node = factory.createInterfaceDeclaration(
|
|
29956
|
+
var node = factory.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
29957
|
+
node.decorators = decorators;
|
|
29702
29958
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29703
29959
|
}
|
|
29704
29960
|
function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29708,7 +29964,8 @@ var ts;
|
|
|
29708
29964
|
parseExpected(63);
|
|
29709
29965
|
var type = token() === 138 && tryParse(parseKeywordAndNoDot) || parseType();
|
|
29710
29966
|
parseSemicolon();
|
|
29711
|
-
var node = factory.createTypeAliasDeclaration(
|
|
29967
|
+
var node = factory.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
29968
|
+
node.decorators = decorators;
|
|
29712
29969
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29713
29970
|
}
|
|
29714
29971
|
function parseEnumMember() {
|
|
@@ -29729,7 +29986,8 @@ var ts;
|
|
|
29729
29986
|
else {
|
|
29730
29987
|
members = createMissingList();
|
|
29731
29988
|
}
|
|
29732
|
-
var node = factory.createEnumDeclaration(
|
|
29989
|
+
var node = factory.createEnumDeclaration(modifiers, name, members);
|
|
29990
|
+
node.decorators = decorators;
|
|
29733
29991
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29734
29992
|
}
|
|
29735
29993
|
function parseModuleBlock() {
|
|
@@ -29750,7 +30008,8 @@ var ts;
|
|
|
29750
30008
|
var body = parseOptional(24)
|
|
29751
30009
|
? parseModuleOrNamespaceDeclaration(getNodePos(), false, undefined, undefined, 4 | namespaceFlag)
|
|
29752
30010
|
: parseModuleBlock();
|
|
29753
|
-
var node = factory.createModuleDeclaration(
|
|
30011
|
+
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30012
|
+
node.decorators = decorators;
|
|
29754
30013
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29755
30014
|
}
|
|
29756
30015
|
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29771,7 +30030,8 @@ var ts;
|
|
|
29771
30030
|
else {
|
|
29772
30031
|
parseSemicolon();
|
|
29773
30032
|
}
|
|
29774
|
-
var node = factory.createModuleDeclaration(
|
|
30033
|
+
var node = factory.createModuleDeclaration(modifiers, name, body, flags);
|
|
30034
|
+
node.decorators = decorators;
|
|
29775
30035
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29776
30036
|
}
|
|
29777
30037
|
function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -29843,7 +30103,8 @@ var ts;
|
|
|
29843
30103
|
assertClause = parseAssertClause();
|
|
29844
30104
|
}
|
|
29845
30105
|
parseSemicolon();
|
|
29846
|
-
var node = factory.createImportDeclaration(
|
|
30106
|
+
var node = factory.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
30107
|
+
node.decorators = decorators;
|
|
29847
30108
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29848
30109
|
}
|
|
29849
30110
|
function parseAssertEntry() {
|
|
@@ -29885,7 +30146,8 @@ var ts;
|
|
|
29885
30146
|
parseExpected(63);
|
|
29886
30147
|
var moduleReference = parseModuleReference();
|
|
29887
30148
|
parseSemicolon();
|
|
29888
|
-
var node = factory.createImportEqualsDeclaration(
|
|
30149
|
+
var node = factory.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
30150
|
+
node.decorators = decorators;
|
|
29889
30151
|
var finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
29890
30152
|
return finished;
|
|
29891
30153
|
}
|
|
@@ -30031,7 +30293,8 @@ var ts;
|
|
|
30031
30293
|
}
|
|
30032
30294
|
parseSemicolon();
|
|
30033
30295
|
setAwaitContext(savedAwaitContext);
|
|
30034
|
-
var node = factory.createExportDeclaration(
|
|
30296
|
+
var node = factory.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
30297
|
+
node.decorators = decorators;
|
|
30035
30298
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30036
30299
|
}
|
|
30037
30300
|
function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
|
|
@@ -30047,7 +30310,8 @@ var ts;
|
|
|
30047
30310
|
var expression = parseAssignmentExpressionOrHigher();
|
|
30048
30311
|
parseSemicolon();
|
|
30049
30312
|
setAwaitContext(savedAwaitContext);
|
|
30050
|
-
var node = factory.createExportAssignment(
|
|
30313
|
+
var node = factory.createExportAssignment(modifiers, isExportEquals, expression);
|
|
30314
|
+
node.decorators = decorators;
|
|
30051
30315
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
30052
30316
|
}
|
|
30053
30317
|
var JSDocParser;
|
|
@@ -30756,7 +31020,7 @@ var ts;
|
|
|
30756
31020
|
var typeNameOrNamespaceName = parseJSDocIdentifierName();
|
|
30757
31021
|
if (parseOptional(24)) {
|
|
30758
31022
|
var body = parseJSDocTypeNameWithNamespace(true);
|
|
30759
|
-
var jsDocNamespaceNode = factory.createModuleDeclaration(undefined,
|
|
31023
|
+
var jsDocNamespaceNode = factory.createModuleDeclaration(undefined, typeNameOrNamespaceName, body, nested ? 4 : undefined);
|
|
30760
31024
|
return finishNode(jsDocNamespaceNode, pos);
|
|
30761
31025
|
}
|
|
30762
31026
|
if (nested) {
|
|
@@ -37779,8 +38043,6 @@ var ts;
|
|
|
37779
38043
|
}
|
|
37780
38044
|
function bindBindingElementFlow(node) {
|
|
37781
38045
|
if (ts.isBindingPattern(node.name)) {
|
|
37782
|
-
bindEach(node.decorators);
|
|
37783
|
-
bindEach(node.modifiers);
|
|
37784
38046
|
bind(node.dotDotDotToken);
|
|
37785
38047
|
bind(node.propertyName);
|
|
37786
38048
|
bind(node.initializer);
|
|
@@ -38651,7 +38913,7 @@ var ts;
|
|
|
38651
38913
|
}
|
|
38652
38914
|
}
|
|
38653
38915
|
function bindNamespaceExportDeclaration(node) {
|
|
38654
|
-
if (
|
|
38916
|
+
if (ts.some(node.modifiers)) {
|
|
38655
38917
|
file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
|
|
38656
38918
|
}
|
|
38657
38919
|
var diag = !ts.isSourceFile(node.parent) ? ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level
|
|
@@ -43683,7 +43945,7 @@ var ts;
|
|
|
43683
43945
|
var id = ids_1[_i];
|
|
43684
43946
|
qualifier = qualifier ? ts.factory.createQualifiedName(qualifier, id) : id;
|
|
43685
43947
|
}
|
|
43686
|
-
return ts.factory.updateImportTypeNode(root, root.argument, qualifier, typeArguments, root.isTypeOf);
|
|
43948
|
+
return ts.factory.updateImportTypeNode(root, root.argument, root.assertions, qualifier, typeArguments, root.isTypeOf);
|
|
43687
43949
|
}
|
|
43688
43950
|
else {
|
|
43689
43951
|
var typeArguments = root.typeArguments;
|
|
@@ -43914,7 +44176,7 @@ var ts;
|
|
|
43914
44176
|
function indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, typeNode) {
|
|
43915
44177
|
var name = ts.getNameFromIndexInfo(indexInfo) || "x";
|
|
43916
44178
|
var indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context);
|
|
43917
|
-
var indexingParameter = ts.factory.createParameterDeclaration(undefined, undefined,
|
|
44179
|
+
var indexingParameter = ts.factory.createParameterDeclaration(undefined, undefined, name, undefined, indexerTypeNode, undefined);
|
|
43918
44180
|
if (!typeNode) {
|
|
43919
44181
|
typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context);
|
|
43920
44182
|
}
|
|
@@ -43922,7 +44184,7 @@ var ts;
|
|
|
43922
44184
|
context.encounteredError = true;
|
|
43923
44185
|
}
|
|
43924
44186
|
context.approximateLength += (name.length + 4);
|
|
43925
|
-
return ts.factory.createIndexSignature(
|
|
44187
|
+
return ts.factory.createIndexSignature(indexInfo.isReadonly ? [ts.factory.createToken(145)] : undefined, [indexingParameter], typeNode);
|
|
43926
44188
|
}
|
|
43927
44189
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
43928
44190
|
var _a, _b, _c, _d;
|
|
@@ -43973,15 +44235,15 @@ var ts;
|
|
|
43973
44235
|
var node = kind === 174 ? ts.factory.createCallSignature(typeParameters, parameters, returnTypeNode) :
|
|
43974
44236
|
kind === 175 ? ts.factory.createConstructSignature(typeParameters, parameters, returnTypeNode) :
|
|
43975
44237
|
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(
|
|
44238
|
+
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) :
|
|
44239
|
+
kind === 171 ? ts.factory.createConstructorDeclaration(modifiers, parameters, undefined) :
|
|
44240
|
+
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) :
|
|
44241
|
+
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) :
|
|
44242
|
+
kind === 176 ? ts.factory.createIndexSignature(modifiers, parameters, returnTypeNode) :
|
|
43981
44243
|
kind === 317 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
|
|
43982
44244
|
kind === 179 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
43983
44245
|
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(
|
|
44246
|
+
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
44247
|
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
44248
|
kind === 214 ? ts.factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, undefined, ts.factory.createBlock([])) :
|
|
43987
44249
|
ts.Debug.assertNever(kind);
|
|
@@ -43997,7 +44259,7 @@ var ts;
|
|
|
43997
44259
|
if (signature.declaration) {
|
|
43998
44260
|
var thisTag = ts.getJSDocThisTag(signature.declaration);
|
|
43999
44261
|
if (thisTag && thisTag.typeExpression) {
|
|
44000
|
-
return ts.factory.createParameterDeclaration(undefined, undefined,
|
|
44262
|
+
return ts.factory.createParameterDeclaration(undefined, undefined, "this", undefined, typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context));
|
|
44001
44263
|
}
|
|
44002
44264
|
}
|
|
44003
44265
|
}
|
|
@@ -44026,7 +44288,7 @@ var ts;
|
|
|
44026
44288
|
parameterType = getOptionalType(parameterType);
|
|
44027
44289
|
}
|
|
44028
44290
|
var parameterTypeNode = serializeTypeForDeclaration(context, parameterType, parameterSymbol, context.enclosingDeclaration, privateSymbolVisitor, bundledImports);
|
|
44029
|
-
var modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && parameterDeclaration
|
|
44291
|
+
var modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && ts.canHaveModifiers(parameterDeclaration) ? ts.map(ts.getModifiers(parameterDeclaration), ts.factory.cloneNode) : undefined;
|
|
44030
44292
|
var isRest = parameterDeclaration && ts.isRestParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 32768;
|
|
44031
44293
|
var dotDotDotToken = isRest ? ts.factory.createToken(25) : undefined;
|
|
44032
44294
|
var name = parameterDeclaration ? parameterDeclaration.name ?
|
|
@@ -44037,7 +44299,7 @@ var ts;
|
|
|
44037
44299
|
ts.symbolName(parameterSymbol);
|
|
44038
44300
|
var isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 16384;
|
|
44039
44301
|
var questionToken = isOptional ? ts.factory.createToken(57) : undefined;
|
|
44040
|
-
var parameterNode = ts.factory.createParameterDeclaration(
|
|
44302
|
+
var parameterNode = ts.factory.createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, parameterTypeNode, undefined);
|
|
44041
44303
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
44042
44304
|
return parameterNode;
|
|
44043
44305
|
function cloneBindingName(node) {
|
|
@@ -44645,15 +44907,15 @@ var ts;
|
|
|
44645
44907
|
return ts.setOriginalNode(ts.factory.createKeywordTypeNode(130), node);
|
|
44646
44908
|
}
|
|
44647
44909
|
if ((ts.isExpressionWithTypeArguments(node) || ts.isTypeReferenceNode(node)) && ts.isJSDocIndexSignature(node)) {
|
|
44648
|
-
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined,
|
|
44910
|
+
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
44911
|
}
|
|
44650
44912
|
if (ts.isJSDocFunctionType(node)) {
|
|
44651
44913
|
if (ts.isJSDocConstructSignature(node)) {
|
|
44652
44914
|
var newTypeNode_1;
|
|
44653
|
-
return ts.factory.createConstructorTypeNode(
|
|
44915
|
+
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
44916
|
}
|
|
44655
44917
|
else {
|
|
44656
|
-
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined,
|
|
44918
|
+
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
44919
|
}
|
|
44658
44920
|
}
|
|
44659
44921
|
if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(node, 788968, true))) {
|
|
@@ -44667,7 +44929,7 @@ var ts;
|
|
|
44667
44929
|
!(ts.length(node.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))))) {
|
|
44668
44930
|
return ts.setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node);
|
|
44669
44931
|
}
|
|
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);
|
|
44932
|
+
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
44933
|
}
|
|
44672
44934
|
if (ts.isEntityName(node) || ts.isEntityNameExpression(node)) {
|
|
44673
44935
|
var _a = trackExistingEntityName(node, context, includePrivateSymbol), introducesError = _a.introducesError, result = _a.node;
|
|
@@ -44718,7 +44980,7 @@ var ts;
|
|
|
44718
44980
|
}
|
|
44719
44981
|
function symbolTableToDeclarationStatements(symbolTable, context, bundled) {
|
|
44720
44982
|
var serializePropertySymbolForClass = makeSerializePropertySymbol(ts.factory.createPropertyDeclaration, 169, true);
|
|
44721
|
-
var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (
|
|
44983
|
+
var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (mods, name, question, type) { return ts.factory.createPropertySignature(mods, name, question, type); }, 168, false);
|
|
44722
44984
|
var enclosingDeclaration = context.enclosingDeclaration;
|
|
44723
44985
|
var results = [];
|
|
44724
44986
|
var visitedSymbols = new ts.Set();
|
|
@@ -44770,7 +45032,7 @@ var ts;
|
|
|
44770
45032
|
var name_3 = ns.name;
|
|
44771
45033
|
var body = ns.body;
|
|
44772
45034
|
if (ts.length(excessExports)) {
|
|
44773
|
-
ns = ts.factory.updateModuleDeclaration(ns, ns.
|
|
45035
|
+
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
45036
|
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, nsIndex), true), [ns], false), statements.slice(nsIndex + 1), true);
|
|
44775
45037
|
}
|
|
44776
45038
|
if (!ts.find(statements, function (s) { return s !== ns && ts.nodeHasName(s, name_3); })) {
|
|
@@ -44788,7 +45050,7 @@ var ts;
|
|
|
44788
45050
|
var exports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
|
|
44789
45051
|
if (ts.length(exports) > 1) {
|
|
44790
45052
|
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,
|
|
45053
|
+
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
45054
|
}
|
|
44793
45055
|
var reexports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
|
|
44794
45056
|
if (ts.length(reexports) > 1) {
|
|
@@ -44797,7 +45059,7 @@ var ts;
|
|
|
44797
45059
|
var _loop_9 = function (group_1) {
|
|
44798
45060
|
if (group_1.length > 1) {
|
|
44799
45061
|
statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return group_1.indexOf(s) === -1; }), true), [
|
|
44800
|
-
ts.factory.createExportDeclaration(undefined,
|
|
45062
|
+
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
45063
|
], false);
|
|
44802
45064
|
}
|
|
44803
45065
|
};
|
|
@@ -44831,7 +45093,7 @@ var ts;
|
|
|
44831
45093
|
ts.orderedRemoveItemAt(statements, index);
|
|
44832
45094
|
}
|
|
44833
45095
|
else {
|
|
44834
|
-
statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.
|
|
45096
|
+
statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.modifiers, exportDecl.isTypeOnly, ts.factory.updateNamedExports(exportDecl.exportClause, replacements), exportDecl.moduleSpecifier, exportDecl.assertClause);
|
|
44835
45097
|
}
|
|
44836
45098
|
}
|
|
44837
45099
|
return statements;
|
|
@@ -44956,7 +45218,7 @@ var ts;
|
|
|
44956
45218
|
if (propertyAccessRequire && ts.isBinaryExpression(propertyAccessRequire.parent) && ts.isIdentifier(propertyAccessRequire.parent.right)
|
|
44957
45219
|
&& ((_d = type.symbol) === null || _d === void 0 ? void 0 : _d.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
|
|
44958
45220
|
var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
|
|
44959
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45221
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, alias, localName)])), 0);
|
|
44960
45222
|
context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551);
|
|
44961
45223
|
}
|
|
44962
45224
|
else {
|
|
@@ -44965,7 +45227,7 @@ var ts;
|
|
|
44965
45227
|
], flags)), textRange);
|
|
44966
45228
|
addResult(statement, name !== localName ? modifierFlags & ~1 : modifierFlags);
|
|
44967
45229
|
if (name !== localName && !isPrivate) {
|
|
44968
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45230
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, name, localName)])), 0);
|
|
44969
45231
|
needsExportDeclaration = false;
|
|
44970
45232
|
needsPostExportDefault = false;
|
|
44971
45233
|
}
|
|
@@ -45006,15 +45268,15 @@ var ts;
|
|
|
45006
45268
|
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
|
|
45007
45269
|
if (!resolvedModule)
|
|
45008
45270
|
continue;
|
|
45009
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45271
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, undefined, ts.factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))), 0);
|
|
45010
45272
|
}
|
|
45011
45273
|
}
|
|
45012
45274
|
}
|
|
45013
45275
|
if (needsPostExportDefault) {
|
|
45014
|
-
addResult(ts.factory.createExportAssignment(undefined,
|
|
45276
|
+
addResult(ts.factory.createExportAssignment(undefined, false, ts.factory.createIdentifier(getInternalSymbolName(symbol, symbolName))), 0);
|
|
45015
45277
|
}
|
|
45016
45278
|
else if (needsExportDeclaration) {
|
|
45017
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45279
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, getInternalSymbolName(symbol, symbolName), symbolName)])), 0);
|
|
45018
45280
|
}
|
|
45019
45281
|
}
|
|
45020
45282
|
function includePrivateSymbol(symbol) {
|
|
@@ -45072,7 +45334,7 @@ var ts;
|
|
|
45072
45334
|
&& ts.isJSDocTypeExpression(jsdocAliasDecl.typeExpression)
|
|
45073
45335
|
&& serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled)
|
|
45074
45336
|
|| typeToTypeNodeHelper(aliasType, context);
|
|
45075
|
-
addResult(ts.setSyntheticLeadingComments(ts.factory.createTypeAliasDeclaration(undefined,
|
|
45337
|
+
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
45338
|
context.flags = oldFlags;
|
|
45077
45339
|
context.enclosingDeclaration = oldEnclosingDecl;
|
|
45078
45340
|
}
|
|
@@ -45087,7 +45349,7 @@ var ts;
|
|
|
45087
45349
|
var constructSignatures = serializeSignatures(1, interfaceType, baseType, 175);
|
|
45088
45350
|
var indexSignatures = serializeIndexSignatures(interfaceType, baseType);
|
|
45089
45351
|
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,
|
|
45352
|
+
addResult(ts.factory.createInterfaceDeclaration(undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), constructSignatures, true), callSignatures, true), members, true)), modifierFlags);
|
|
45091
45353
|
}
|
|
45092
45354
|
function getNamespaceMembersForSerialization(symbol) {
|
|
45093
45355
|
return !symbol.exports ? [] : ts.filter(ts.arrayFrom(symbol.exports.values()), isNamespaceMember);
|
|
@@ -45107,7 +45369,7 @@ var ts;
|
|
|
45107
45369
|
if (ts.length(mergedMembers)) {
|
|
45108
45370
|
var containingFile_1 = ts.getSourceFileOfNode(context.enclosingDeclaration);
|
|
45109
45371
|
var localName = getInternalSymbolName(symbol, symbolName);
|
|
45110
|
-
var nsBody = ts.factory.createModuleBlock([ts.factory.createExportDeclaration(undefined,
|
|
45372
|
+
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
45373
|
var _a, _b;
|
|
45112
45374
|
var name = ts.unescapeLeadingUnderscores(s.escapedName);
|
|
45113
45375
|
var localName = getInternalSymbolName(s, name);
|
|
@@ -45121,11 +45383,11 @@ var ts;
|
|
|
45121
45383
|
var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName;
|
|
45122
45384
|
return ts.factory.createExportSpecifier(false, name === targetName ? undefined : targetName, name);
|
|
45123
45385
|
})))]);
|
|
45124
|
-
addResult(ts.factory.createModuleDeclaration(undefined,
|
|
45386
|
+
addResult(ts.factory.createModuleDeclaration(undefined, ts.factory.createIdentifier(localName), nsBody, 16), 0);
|
|
45125
45387
|
}
|
|
45126
45388
|
}
|
|
45127
45389
|
function serializeEnum(symbol, symbolName, modifierFlags) {
|
|
45128
|
-
addResult(ts.factory.createEnumDeclaration(
|
|
45390
|
+
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
45391
|
var initializedValue = p.declarations && p.declarations[0] && ts.isEnumMember(p.declarations[0]) ? getConstantValue(p.declarations[0]) : undefined;
|
|
45130
45392
|
return ts.factory.createEnumMember(ts.unescapeLeadingUnderscores(p.escapedName), initializedValue === undefined ? undefined :
|
|
45131
45393
|
typeof initializedValue === "string" ? ts.factory.createStringLiteral(initializedValue) :
|
|
@@ -45163,7 +45425,7 @@ var ts;
|
|
|
45163
45425
|
}) ? "local" : "remote";
|
|
45164
45426
|
});
|
|
45165
45427
|
var localProps = localVsRemoteMap.get("local") || ts.emptyArray;
|
|
45166
|
-
var fakespace = ts.parseNodeFactory.createModuleDeclaration(undefined,
|
|
45428
|
+
var fakespace = ts.parseNodeFactory.createModuleDeclaration(undefined, ts.factory.createIdentifier(localName), ts.factory.createModuleBlock([]), 16);
|
|
45167
45429
|
ts.setParent(fakespace, enclosingDeclaration);
|
|
45168
45430
|
fakespace.locals = ts.createSymbolTable(props);
|
|
45169
45431
|
fakespace.symbol = props[0].parent;
|
|
@@ -45179,9 +45441,9 @@ var ts;
|
|
|
45179
45441
|
addingDeclare = oldAddingDeclare;
|
|
45180
45442
|
var declarations = results;
|
|
45181
45443
|
results = oldResults;
|
|
45182
|
-
var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(undefined,
|
|
45444
|
+
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
45445
|
var exportModifierStripped = ts.every(defaultReplaced, function (d) { return ts.hasSyntacticModifier(d, 1); }) ? ts.map(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
45184
|
-
fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.
|
|
45446
|
+
fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.modifiers, fakespace.name, ts.factory.createModuleBlock(exportModifierStripped));
|
|
45185
45447
|
addResult(fakespace, modifierFlags);
|
|
45186
45448
|
}
|
|
45187
45449
|
}
|
|
@@ -45247,7 +45509,7 @@ var ts;
|
|
|
45247
45509
|
return !!valueDecl && ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name);
|
|
45248
45510
|
});
|
|
45249
45511
|
var privateProperties = hasPrivateIdentifier ?
|
|
45250
|
-
[ts.factory.createPropertyDeclaration(undefined,
|
|
45512
|
+
[ts.factory.createPropertyDeclaration(undefined, ts.factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)] :
|
|
45251
45513
|
ts.emptyArray;
|
|
45252
45514
|
var publicProperties = ts.flatMap(publicSymbolProps, function (p) { return serializePropertySymbolForClass(p, false, baseTypes[0]); });
|
|
45253
45515
|
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 +45518,11 @@ var ts;
|
|
|
45256
45518
|
ts.isInJSFile(symbol.valueDeclaration) &&
|
|
45257
45519
|
!ts.some(getSignaturesOfType(staticType, 1));
|
|
45258
45520
|
var constructors = isNonConstructableClassLikeInJsFile ?
|
|
45259
|
-
[ts.factory.createConstructorDeclaration(
|
|
45521
|
+
[ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(8), [], undefined)] :
|
|
45260
45522
|
serializeSignatures(1, staticType, staticBaseType, 171);
|
|
45261
45523
|
var indexSignatures = serializeIndexSignatures(classType, baseTypes[0]);
|
|
45262
45524
|
context.enclosingDeclaration = oldEnclosing;
|
|
45263
|
-
addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined,
|
|
45525
|
+
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
45526
|
}
|
|
45265
45527
|
function getSomeTargetNameFromDeclarations(declarations) {
|
|
45266
45528
|
return ts.firstDefined(declarations, function (d) {
|
|
@@ -45302,7 +45564,7 @@ var ts;
|
|
|
45302
45564
|
if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.kind) === 254) {
|
|
45303
45565
|
var specifier_1 = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
45304
45566
|
var propertyName = node.propertyName;
|
|
45305
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45567
|
+
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
45568
|
break;
|
|
45307
45569
|
}
|
|
45308
45570
|
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 +45579,8 @@ var ts;
|
|
|
45317
45579
|
var initializer = node.initializer;
|
|
45318
45580
|
var uniqueName = ts.factory.createUniqueName(localName);
|
|
45319
45581
|
var specifier_2 = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
45320
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45321
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45582
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, uniqueName, ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(specifier_2))), 0);
|
|
45583
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(localName), ts.factory.createQualifiedName(uniqueName, initializer.name)), modifierFlags);
|
|
45322
45584
|
break;
|
|
45323
45585
|
}
|
|
45324
45586
|
case 265:
|
|
@@ -45327,7 +45589,7 @@ var ts;
|
|
|
45327
45589
|
break;
|
|
45328
45590
|
}
|
|
45329
45591
|
var isLocalImport = !(target.flags & 512) && !ts.isVariableDeclaration(node);
|
|
45330
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45592
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(localName), isLocalImport
|
|
45331
45593
|
? symbolToName(target, context, 67108863, false)
|
|
45332
45594
|
: ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)))), isLocalImport ? modifierFlags : 0);
|
|
45333
45595
|
break;
|
|
@@ -45335,16 +45597,16 @@ var ts;
|
|
|
45335
45597
|
addResult(ts.factory.createNamespaceExportDeclaration(ts.idText(node.name)), 0);
|
|
45336
45598
|
break;
|
|
45337
45599
|
case 267:
|
|
45338
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45600
|
+
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
45601
|
break;
|
|
45340
45602
|
case 268:
|
|
45341
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45603
|
+
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
45604
|
break;
|
|
45343
45605
|
case 274:
|
|
45344
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45606
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamespaceExport(ts.factory.createIdentifier(localName)), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))), 0);
|
|
45345
45607
|
break;
|
|
45346
45608
|
case 270:
|
|
45347
|
-
addResult(ts.factory.createImportDeclaration(undefined,
|
|
45609
|
+
addResult(ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([
|
|
45348
45610
|
ts.factory.createImportSpecifier(false, localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
|
|
45349
45611
|
])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)), undefined), 0);
|
|
45350
45612
|
break;
|
|
@@ -45370,7 +45632,7 @@ var ts;
|
|
|
45370
45632
|
}
|
|
45371
45633
|
}
|
|
45372
45634
|
function serializeExportSpecifier(localName, targetName, specifier) {
|
|
45373
|
-
addResult(ts.factory.createExportDeclaration(undefined,
|
|
45635
|
+
addResult(ts.factory.createExportDeclaration(undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, localName !== targetName ? targetName : undefined, localName)]), specifier), 0);
|
|
45374
45636
|
}
|
|
45375
45637
|
function serializeMaybeAliasAssignment(symbol) {
|
|
45376
45638
|
if (symbol.flags & 4194304) {
|
|
@@ -45392,7 +45654,7 @@ var ts;
|
|
|
45392
45654
|
var oldTrack = context.tracker.trackSymbol;
|
|
45393
45655
|
context.tracker.trackSymbol = function () { return false; };
|
|
45394
45656
|
if (isExportAssignmentCompatibleSymbolName) {
|
|
45395
|
-
results.push(ts.factory.createExportAssignment(undefined,
|
|
45657
|
+
results.push(ts.factory.createExportAssignment(undefined, isExportEquals, symbolToExpression(target, context, 67108863)));
|
|
45396
45658
|
}
|
|
45397
45659
|
else {
|
|
45398
45660
|
if (first_1 === expr && first_1) {
|
|
@@ -45403,7 +45665,7 @@ var ts;
|
|
|
45403
45665
|
}
|
|
45404
45666
|
else {
|
|
45405
45667
|
var varName = getUnusedName(name, symbol);
|
|
45406
|
-
addResult(ts.factory.createImportEqualsDeclaration(undefined,
|
|
45668
|
+
addResult(ts.factory.createImportEqualsDeclaration(undefined, false, ts.factory.createIdentifier(varName), symbolToName(target, context, 67108863, false)), 0);
|
|
45407
45669
|
serializeExportSpecifier(name, varName);
|
|
45408
45670
|
}
|
|
45409
45671
|
}
|
|
@@ -45425,7 +45687,7 @@ var ts;
|
|
|
45425
45687
|
: 0);
|
|
45426
45688
|
}
|
|
45427
45689
|
if (isExportAssignmentCompatibleSymbolName) {
|
|
45428
|
-
results.push(ts.factory.createExportAssignment(undefined,
|
|
45690
|
+
results.push(ts.factory.createExportAssignment(undefined, isExportEquals, ts.factory.createIdentifier(varName)));
|
|
45429
45691
|
return true;
|
|
45430
45692
|
}
|
|
45431
45693
|
else if (name !== varName) {
|
|
@@ -45469,22 +45731,22 @@ var ts;
|
|
|
45469
45731
|
if (p.flags & 98304 && useAccessors) {
|
|
45470
45732
|
var result = [];
|
|
45471
45733
|
if (p.flags & 65536) {
|
|
45472
|
-
result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(
|
|
45734
|
+
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
45735
|
}
|
|
45474
45736
|
if (p.flags & 32768) {
|
|
45475
45737
|
var isPrivate_1 = modifierFlags & 8;
|
|
45476
|
-
result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(
|
|
45738
|
+
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
45739
|
}
|
|
45478
45740
|
return result;
|
|
45479
45741
|
}
|
|
45480
45742
|
else if (p.flags & (4 | 3 | 98304)) {
|
|
45481
|
-
return ts.setTextRange(createProperty(
|
|
45743
|
+
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
45744
|
}
|
|
45483
45745
|
if (p.flags & (8192 | 16)) {
|
|
45484
45746
|
var type = getTypeOfSymbol(p);
|
|
45485
45747
|
var signatures = getSignaturesOfType(type, 0);
|
|
45486
45748
|
if (flag & 8) {
|
|
45487
|
-
return ts.setTextRange(createProperty(
|
|
45749
|
+
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
45750
|
}
|
|
45489
45751
|
var results_1 = [];
|
|
45490
45752
|
for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
|
|
@@ -45537,7 +45799,7 @@ var ts;
|
|
|
45537
45799
|
}
|
|
45538
45800
|
}
|
|
45539
45801
|
if (privateProtected) {
|
|
45540
|
-
return [ts.setTextRange(ts.factory.createConstructorDeclaration(
|
|
45802
|
+
return [ts.setTextRange(ts.factory.createConstructorDeclaration(ts.factory.createModifiersFromModifierFlags(privateProtected), [], undefined), signatures[0].declaration)];
|
|
45541
45803
|
}
|
|
45542
45804
|
}
|
|
45543
45805
|
var results = [];
|
|
@@ -60177,7 +60439,7 @@ var ts;
|
|
|
60177
60439
|
}
|
|
60178
60440
|
function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) {
|
|
60179
60441
|
if (ts.isPropertyDeclaration(container) && ts.hasStaticModifier(container) &&
|
|
60180
|
-
container.initializer && ts.textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && ts.
|
|
60442
|
+
container.initializer && ts.textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && ts.hasDecorators(container.parent)) {
|
|
60181
60443
|
error(thisExpression, ts.Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class);
|
|
60182
60444
|
}
|
|
60183
60445
|
}
|
|
@@ -60765,7 +61027,7 @@ var ts;
|
|
|
60765
61027
|
if (decl && (ts.isPropertyDeclaration(decl) || ts.isPropertySignature(decl))) {
|
|
60766
61028
|
var overallAnnotation = ts.getEffectiveTypeAnnotationNode(decl);
|
|
60767
61029
|
return (overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper)) ||
|
|
60768
|
-
(decl.initializer && getTypeOfExpression(binaryExpression.left));
|
|
61030
|
+
(ts.isPropertyDeclaration(decl) ? decl.initializer && getTypeOfExpression(binaryExpression.left) : undefined);
|
|
60769
61031
|
}
|
|
60770
61032
|
if (kind === 0) {
|
|
60771
61033
|
return getTypeOfExpression(binaryExpression.left);
|
|
@@ -62773,9 +63035,9 @@ var ts;
|
|
|
62773
63035
|
function getSuggestedSymbolForNonexistentProperty(name, containingType) {
|
|
62774
63036
|
var props = getPropertiesOfType(containingType);
|
|
62775
63037
|
if (typeof name !== "string") {
|
|
62776
|
-
var
|
|
62777
|
-
if (ts.isPropertyAccessExpression(
|
|
62778
|
-
props = ts.filter(props, function (prop) { return isValidPropertyAccessForCompletions(
|
|
63038
|
+
var parent_3 = name.parent;
|
|
63039
|
+
if (ts.isPropertyAccessExpression(parent_3)) {
|
|
63040
|
+
props = ts.filter(props, function (prop) { return isValidPropertyAccessForCompletions(parent_3, containingType, prop); });
|
|
62779
63041
|
}
|
|
62780
63042
|
name = ts.idText(name);
|
|
62781
63043
|
}
|
|
@@ -64350,7 +64612,7 @@ var ts;
|
|
|
64350
64612
|
var exports = namespace && getExportsOfSymbol(namespace);
|
|
64351
64613
|
var typeSymbol = exports && getSymbol(exports, JsxNames.Element, 788968);
|
|
64352
64614
|
var returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968, node);
|
|
64353
|
-
var declaration = ts.factory.createFunctionTypeNode(undefined, [ts.factory.createParameterDeclaration(undefined, undefined,
|
|
64615
|
+
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
64616
|
var parameterSymbol = createSymbol(1, "props");
|
|
64355
64617
|
parameterSymbol.type = result;
|
|
64356
64618
|
return createSignature(declaration, undefined, undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, undefined, 1, 0);
|
|
@@ -68611,16 +68873,16 @@ var ts;
|
|
|
68611
68873
|
return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
|
|
68612
68874
|
}
|
|
68613
68875
|
function checkDecorators(node) {
|
|
68614
|
-
if (!node.
|
|
68615
|
-
return;
|
|
68616
|
-
}
|
|
68617
|
-
if (!ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
68876
|
+
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node) || !node.modifiers || !ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
68618
68877
|
return;
|
|
68619
68878
|
}
|
|
68620
68879
|
if (!compilerOptions.experimentalDecorators) {
|
|
68621
68880
|
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
68881
|
}
|
|
68623
|
-
var firstDecorator = node.
|
|
68882
|
+
var firstDecorator = ts.find(node.modifiers, ts.isDecorator);
|
|
68883
|
+
if (!firstDecorator) {
|
|
68884
|
+
return;
|
|
68885
|
+
}
|
|
68624
68886
|
checkExternalEmitHelpers(firstDecorator, 8);
|
|
68625
68887
|
if (node.kind === 164) {
|
|
68626
68888
|
checkExternalEmitHelpers(firstDecorator, 32);
|
|
@@ -68663,7 +68925,12 @@ var ts;
|
|
|
68663
68925
|
break;
|
|
68664
68926
|
}
|
|
68665
68927
|
}
|
|
68666
|
-
|
|
68928
|
+
for (var _f = 0, _g = node.modifiers; _f < _g.length; _f++) {
|
|
68929
|
+
var modifier = _g[_f];
|
|
68930
|
+
if (ts.isDecorator(modifier)) {
|
|
68931
|
+
checkDecorator(modifier);
|
|
68932
|
+
}
|
|
68933
|
+
}
|
|
68667
68934
|
}
|
|
68668
68935
|
function checkFunctionDeclaration(node) {
|
|
68669
68936
|
addLazyDiagnostic(checkFunctionDeclarationDiagnostics);
|
|
@@ -69295,7 +69562,7 @@ var ts;
|
|
|
69295
69562
|
}
|
|
69296
69563
|
if (node.name.kind === 162) {
|
|
69297
69564
|
checkComputedPropertyName(node.name);
|
|
69298
|
-
if (node.initializer) {
|
|
69565
|
+
if (ts.hasOnlyExpressionInitializer(node) && node.initializer) {
|
|
69299
69566
|
checkExpressionCached(node.initializer);
|
|
69300
69567
|
}
|
|
69301
69568
|
}
|
|
@@ -69328,12 +69595,12 @@ var ts;
|
|
|
69328
69595
|
}
|
|
69329
69596
|
ts.forEach(node.name.elements, checkSourceElement);
|
|
69330
69597
|
}
|
|
69331
|
-
if (
|
|
69598
|
+
if (ts.isParameter(node) && node.initializer && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
|
|
69332
69599
|
error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
|
|
69333
69600
|
return;
|
|
69334
69601
|
}
|
|
69335
69602
|
if (ts.isBindingPattern(node.name)) {
|
|
69336
|
-
var needCheckInitializer = node.initializer && node.parent.parent.kind !== 243;
|
|
69603
|
+
var needCheckInitializer = ts.hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 243;
|
|
69337
69604
|
var needCheckWidenedType = !ts.some(node.name.elements, ts.not(ts.isOmittedExpression));
|
|
69338
69605
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
69339
69606
|
var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
@@ -69364,7 +69631,7 @@ var ts;
|
|
|
69364
69631
|
}
|
|
69365
69632
|
var type = convertAutoToAny(getTypeOfSymbol(symbol));
|
|
69366
69633
|
if (node === symbol.valueDeclaration) {
|
|
69367
|
-
var initializer = ts.getEffectiveInitializer(node);
|
|
69634
|
+
var initializer = ts.hasOnlyExpressionInitializer(node) && ts.getEffectiveInitializer(node);
|
|
69368
69635
|
if (initializer) {
|
|
69369
69636
|
var isJSObjectLiteralInitializer = ts.isInJSFile(node) &&
|
|
69370
69637
|
ts.isObjectLiteralExpression(initializer) &&
|
|
@@ -69387,7 +69654,7 @@ var ts;
|
|
|
69387
69654
|
!(symbol.flags & 67108864)) {
|
|
69388
69655
|
errorNextVariableOrPropertyDeclarationMustHaveSameType(symbol.valueDeclaration, type, node, declarationType);
|
|
69389
69656
|
}
|
|
69390
|
-
if (node.initializer) {
|
|
69657
|
+
if (ts.hasOnlyExpressionInitializer(node) && node.initializer) {
|
|
69391
69658
|
checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(node.initializer), declarationType, node, node.initializer, undefined);
|
|
69392
69659
|
}
|
|
69393
69660
|
if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
|
|
@@ -70551,8 +70818,9 @@ var ts;
|
|
|
70551
70818
|
registerForUnusedIdentifiersCheck(node);
|
|
70552
70819
|
}
|
|
70553
70820
|
function checkClassDeclaration(node) {
|
|
70554
|
-
|
|
70555
|
-
|
|
70821
|
+
var firstDecorator = ts.find(node.modifiers, ts.isDecorator);
|
|
70822
|
+
if (firstDecorator && ts.some(node.members, function (p) { return ts.hasStaticModifier(p) && ts.isPrivateIdentifierClassElementDeclaration(p); })) {
|
|
70823
|
+
grammarErrorOnNode(firstDecorator, ts.Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);
|
|
70556
70824
|
}
|
|
70557
70825
|
if (!node.name && !ts.hasSyntacticModifier(node, 512)) {
|
|
70558
70826
|
grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);
|
|
@@ -73801,7 +74069,10 @@ var ts;
|
|
|
73801
74069
|
return checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
|
73802
74070
|
}
|
|
73803
74071
|
function checkGrammarDecorators(node) {
|
|
73804
|
-
if (
|
|
74072
|
+
if (ts.canHaveIllegalDecorators(node) && ts.some(node.decorators)) {
|
|
74073
|
+
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
|
|
74074
|
+
}
|
|
74075
|
+
if (!ts.canHaveDecorators(node) || !ts.hasDecorators(node)) {
|
|
73805
74076
|
return false;
|
|
73806
74077
|
}
|
|
73807
74078
|
if (!ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
|
|
@@ -73814,7 +74085,7 @@ var ts;
|
|
|
73814
74085
|
}
|
|
73815
74086
|
else if (node.kind === 172 || node.kind === 173) {
|
|
73816
74087
|
var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
|
|
73817
|
-
if (accessors.firstAccessor
|
|
74088
|
+
if (ts.hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) {
|
|
73818
74089
|
return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
|
|
73819
74090
|
}
|
|
73820
74091
|
}
|
|
@@ -73829,6 +74100,8 @@ var ts;
|
|
|
73829
74100
|
var flags = 0;
|
|
73830
74101
|
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
|
|
73831
74102
|
var modifier = _a[_i];
|
|
74103
|
+
if (ts.isDecorator(modifier))
|
|
74104
|
+
continue;
|
|
73832
74105
|
if (modifier.kind !== 145) {
|
|
73833
74106
|
if (node.kind === 166 || node.kind === 168) {
|
|
73834
74107
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
|
|
@@ -74108,6 +74381,13 @@ var ts;
|
|
|
74108
74381
|
case 164:
|
|
74109
74382
|
case 163:
|
|
74110
74383
|
return false;
|
|
74384
|
+
case 170:
|
|
74385
|
+
case 296:
|
|
74386
|
+
case 297:
|
|
74387
|
+
case 264:
|
|
74388
|
+
case 179:
|
|
74389
|
+
case 276:
|
|
74390
|
+
return true;
|
|
74111
74391
|
default:
|
|
74112
74392
|
if (node.parent.kind === 262 || node.parent.kind === 305) {
|
|
74113
74393
|
return false;
|
|
@@ -74118,20 +74398,26 @@ var ts;
|
|
|
74118
74398
|
case 257:
|
|
74119
74399
|
case 180:
|
|
74120
74400
|
return nodeHasAnyModifiersExcept(node, 126);
|
|
74401
|
+
case 226:
|
|
74121
74402
|
case 258:
|
|
74122
74403
|
case 237:
|
|
74123
74404
|
case 259:
|
|
74124
|
-
case 170:
|
|
74125
74405
|
return true;
|
|
74126
74406
|
case 260:
|
|
74127
74407
|
return nodeHasAnyModifiersExcept(node, 85);
|
|
74128
74408
|
default:
|
|
74129
|
-
ts.Debug.
|
|
74409
|
+
ts.Debug.assertNever(node);
|
|
74130
74410
|
}
|
|
74131
74411
|
}
|
|
74132
74412
|
}
|
|
74133
74413
|
function nodeHasAnyModifiersExcept(node, allowedModifier) {
|
|
74134
|
-
|
|
74414
|
+
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
|
|
74415
|
+
var modifier = _a[_i];
|
|
74416
|
+
if (ts.isDecorator(modifier))
|
|
74417
|
+
continue;
|
|
74418
|
+
return modifier.kind !== allowedModifier;
|
|
74419
|
+
}
|
|
74420
|
+
return false;
|
|
74135
74421
|
}
|
|
74136
74422
|
function checkGrammarAsyncModifier(node, asyncModifier) {
|
|
74137
74423
|
switch (node.kind) {
|
|
@@ -74413,19 +74699,25 @@ var ts;
|
|
|
74413
74699
|
if (name.kind === 80) {
|
|
74414
74700
|
grammarErrorOnNode(name, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
|
|
74415
74701
|
}
|
|
74416
|
-
if (prop.modifiers) {
|
|
74702
|
+
if (ts.canHaveModifiers(prop) && prop.modifiers) {
|
|
74417
74703
|
for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
|
|
74418
74704
|
var mod = _c[_b];
|
|
74419
|
-
if (mod.kind !== 131 || prop.kind !== 169) {
|
|
74705
|
+
if (ts.isModifier(mod) && (mod.kind !== 131 || prop.kind !== 169)) {
|
|
74420
74706
|
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
|
|
74421
74707
|
}
|
|
74422
74708
|
}
|
|
74423
74709
|
}
|
|
74710
|
+
else if (ts.canHaveIllegalModifiers(prop) && prop.modifiers) {
|
|
74711
|
+
for (var _d = 0, _e = prop.modifiers; _d < _e.length; _d++) {
|
|
74712
|
+
var mod = _e[_d];
|
|
74713
|
+
grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
|
|
74714
|
+
}
|
|
74715
|
+
}
|
|
74424
74716
|
var currentKind = void 0;
|
|
74425
74717
|
switch (prop.kind) {
|
|
74426
74718
|
case 297:
|
|
74427
|
-
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
74428
74719
|
case 296:
|
|
74720
|
+
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
74429
74721
|
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
|
|
74430
74722
|
if (name.kind === 8) {
|
|
74431
74723
|
checkGrammarNumericLiteral(name);
|
|
@@ -75002,7 +75294,7 @@ var ts;
|
|
|
75002
75294
|
}
|
|
75003
75295
|
}
|
|
75004
75296
|
function checkGrammarConstructorTypeAnnotation(node) {
|
|
75005
|
-
var type = ts.getEffectiveReturnTypeNode(node);
|
|
75297
|
+
var type = node.type || ts.getEffectiveReturnTypeNode(node);
|
|
75006
75298
|
if (type) {
|
|
75007
75299
|
return grammarErrorOnNode(type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);
|
|
75008
75300
|
}
|
|
@@ -75026,6 +75318,7 @@ var ts;
|
|
|
75026
75318
|
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
75319
|
return true;
|
|
75028
75320
|
}
|
|
75321
|
+
ts.Debug.assertNode(node, ts.isPropertySignature);
|
|
75029
75322
|
if (node.initializer) {
|
|
75030
75323
|
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
|
|
75031
75324
|
}
|
|
@@ -75034,6 +75327,7 @@ var ts;
|
|
|
75034
75327
|
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
75328
|
return true;
|
|
75036
75329
|
}
|
|
75330
|
+
ts.Debug.assertNode(node, ts.isPropertySignature);
|
|
75037
75331
|
if (node.initializer) {
|
|
75038
75332
|
return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_type_literal_property_cannot_have_an_initializer);
|
|
75039
75333
|
}
|
|
@@ -75355,7 +75649,6 @@ var ts;
|
|
|
75355
75649
|
if (nodes === undefined || visitor === undefined) {
|
|
75356
75650
|
return nodes;
|
|
75357
75651
|
}
|
|
75358
|
-
var updated;
|
|
75359
75652
|
var length = nodes.length;
|
|
75360
75653
|
if (start === undefined || start < 0) {
|
|
75361
75654
|
start = 0;
|
|
@@ -75367,18 +75660,48 @@ var ts;
|
|
|
75367
75660
|
var pos = -1;
|
|
75368
75661
|
var end = -1;
|
|
75369
75662
|
if (start > 0 || count < length) {
|
|
75370
|
-
updated = [];
|
|
75371
75663
|
hasTrailingComma = nodes.hasTrailingComma && start + count === length;
|
|
75372
75664
|
}
|
|
75665
|
+
else {
|
|
75666
|
+
pos = nodes.pos;
|
|
75667
|
+
end = nodes.end;
|
|
75668
|
+
hasTrailingComma = nodes.hasTrailingComma;
|
|
75669
|
+
}
|
|
75670
|
+
var updated = visitArrayWorker(nodes, visitor, test, start, count);
|
|
75671
|
+
if (updated !== nodes) {
|
|
75672
|
+
var updatedArray = ts.factory.createNodeArray(updated, hasTrailingComma);
|
|
75673
|
+
ts.setTextRangePosEnd(updatedArray, pos, end);
|
|
75674
|
+
return updatedArray;
|
|
75675
|
+
}
|
|
75676
|
+
return nodes;
|
|
75677
|
+
}
|
|
75678
|
+
ts.visitNodes = visitNodes;
|
|
75679
|
+
function visitArray(nodes, visitor, test, start, count) {
|
|
75680
|
+
if (nodes === undefined) {
|
|
75681
|
+
return nodes;
|
|
75682
|
+
}
|
|
75683
|
+
var length = nodes.length;
|
|
75684
|
+
if (start === undefined || start < 0) {
|
|
75685
|
+
start = 0;
|
|
75686
|
+
}
|
|
75687
|
+
if (count === undefined || count > length - start) {
|
|
75688
|
+
count = length - start;
|
|
75689
|
+
}
|
|
75690
|
+
return visitArrayWorker(nodes, visitor, test, start, count);
|
|
75691
|
+
}
|
|
75692
|
+
ts.visitArray = visitArray;
|
|
75693
|
+
function visitArrayWorker(nodes, visitor, test, start, count) {
|
|
75694
|
+
var updated;
|
|
75695
|
+
var length = nodes.length;
|
|
75696
|
+
if (start > 0 || count < length) {
|
|
75697
|
+
updated = [];
|
|
75698
|
+
}
|
|
75373
75699
|
for (var i = 0; i < count; i++) {
|
|
75374
75700
|
var node = nodes[i + start];
|
|
75375
75701
|
var visited = node !== undefined ? visitor(node) : undefined;
|
|
75376
75702
|
if (updated !== undefined || visited === undefined || visited !== node) {
|
|
75377
75703
|
if (updated === undefined) {
|
|
75378
75704
|
updated = nodes.slice(0, i);
|
|
75379
|
-
hasTrailingComma = nodes.hasTrailingComma;
|
|
75380
|
-
pos = nodes.pos;
|
|
75381
|
-
end = nodes.end;
|
|
75382
75705
|
}
|
|
75383
75706
|
if (visited) {
|
|
75384
75707
|
if (ts.isArray(visited)) {
|
|
@@ -75395,14 +75718,8 @@ var ts;
|
|
|
75395
75718
|
}
|
|
75396
75719
|
}
|
|
75397
75720
|
}
|
|
75398
|
-
|
|
75399
|
-
var updatedArray = ts.factory.createNodeArray(updated, hasTrailingComma);
|
|
75400
|
-
ts.setTextRangePosEnd(updatedArray, pos, end);
|
|
75401
|
-
return updatedArray;
|
|
75402
|
-
}
|
|
75403
|
-
return nodes;
|
|
75721
|
+
return updated !== null && updated !== void 0 ? updated : nodes;
|
|
75404
75722
|
}
|
|
75405
|
-
ts.visitNodes = visitNodes;
|
|
75406
75723
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor) {
|
|
75407
75724
|
if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
|
|
75408
75725
|
context.startLexicalEnvironment();
|
|
@@ -75458,14 +75775,14 @@ var ts;
|
|
|
75458
75775
|
factory.createConditionalExpression(factory.createStrictEquality(factory.getGeneratedNameForNode(parameter), factory.createVoidZero()), undefined, parameter.initializer, undefined, factory.getGeneratedNameForNode(parameter)) :
|
|
75459
75776
|
factory.getGeneratedNameForNode(parameter)),
|
|
75460
75777
|
])));
|
|
75461
|
-
return factory.updateParameterDeclaration(parameter, parameter.
|
|
75778
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, factory.getGeneratedNameForNode(parameter), parameter.questionToken, parameter.type, undefined);
|
|
75462
75779
|
}
|
|
75463
75780
|
function addDefaultValueAssignmentForInitializer(parameter, name, initializer, context) {
|
|
75464
75781
|
var factory = context.factory;
|
|
75465
75782
|
context.addInitializationStatement(factory.createIfStatement(factory.createTypeCheck(factory.cloneNode(name), "undefined"), ts.setEmitFlags(ts.setTextRange(factory.createBlock([
|
|
75466
75783
|
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
75784
|
]), parameter), 1 | 32 | 384 | 1536)));
|
|
75468
|
-
return factory.updateParameterDeclaration(parameter, parameter.
|
|
75785
|
+
return factory.updateParameterDeclaration(parameter, parameter.modifiers, parameter.dotDotDotToken, parameter.name, parameter.questionToken, parameter.type, undefined);
|
|
75469
75786
|
}
|
|
75470
75787
|
function visitFunctionBody(node, visitor, context, nodeVisitor) {
|
|
75471
75788
|
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
@@ -75524,7 +75841,7 @@ var ts;
|
|
|
75524
75841
|
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
75842
|
case 164:
|
|
75526
75843
|
ts.Debug.type(node);
|
|
75527
|
-
return factory.updateParameterDeclaration(node, nodesVisitor(node.
|
|
75844
|
+
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
75845
|
case 165:
|
|
75529
75846
|
ts.Debug.type(node);
|
|
75530
75847
|
return factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
@@ -75533,27 +75850,27 @@ var ts;
|
|
|
75533
75850
|
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
75851
|
case 167:
|
|
75535
75852
|
ts.Debug.type(node);
|
|
75536
|
-
return factory.updatePropertyDeclaration(node, nodesVisitor(node.
|
|
75853
|
+
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
75854
|
case 168:
|
|
75538
75855
|
ts.Debug.type(node);
|
|
75539
75856
|
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
75857
|
case 169:
|
|
75541
75858
|
ts.Debug.type(node);
|
|
75542
|
-
return factory.updateMethodDeclaration(node, nodesVisitor(node.
|
|
75859
|
+
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
75860
|
case 171:
|
|
75544
75861
|
ts.Debug.type(node);
|
|
75545
|
-
return factory.updateConstructorDeclaration(node, nodesVisitor(node.
|
|
75862
|
+
return factory.updateConstructorDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75546
75863
|
case 172:
|
|
75547
75864
|
ts.Debug.type(node);
|
|
75548
|
-
return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.
|
|
75865
|
+
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
75866
|
case 173:
|
|
75550
75867
|
ts.Debug.type(node);
|
|
75551
|
-
return factory.updateSetAccessorDeclaration(node, nodesVisitor(node.
|
|
75868
|
+
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
75869
|
case 170:
|
|
75553
75870
|
ts.Debug.type(node);
|
|
75554
75871
|
context.startLexicalEnvironment();
|
|
75555
75872
|
context.suspendLexicalEnvironment();
|
|
75556
|
-
return factory.updateClassStaticBlockDeclaration(node,
|
|
75873
|
+
return factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
75557
75874
|
case 174:
|
|
75558
75875
|
ts.Debug.type(node);
|
|
75559
75876
|
return factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
@@ -75562,7 +75879,7 @@ var ts;
|
|
|
75562
75879
|
return factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75563
75880
|
case 176:
|
|
75564
75881
|
ts.Debug.type(node);
|
|
75565
|
-
return factory.updateIndexSignature(node, nodesVisitor(node.
|
|
75882
|
+
return factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
75566
75883
|
case 177:
|
|
75567
75884
|
ts.Debug.type(node);
|
|
75568
75885
|
return factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
@@ -75724,7 +76041,7 @@ var ts;
|
|
|
75724
76041
|
return factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
75725
76042
|
case 226:
|
|
75726
76043
|
ts.Debug.type(node);
|
|
75727
|
-
return factory.updateClassExpression(node, nodesVisitor(node.
|
|
76044
|
+
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
76045
|
case 228:
|
|
75729
76046
|
ts.Debug.type(node);
|
|
75730
76047
|
return factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
@@ -75803,22 +76120,22 @@ var ts;
|
|
|
75803
76120
|
return factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
|
|
75804
76121
|
case 256:
|
|
75805
76122
|
ts.Debug.type(node);
|
|
75806
|
-
return factory.updateFunctionDeclaration(node, nodesVisitor(node.
|
|
76123
|
+
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
76124
|
case 257:
|
|
75808
76125
|
ts.Debug.type(node);
|
|
75809
|
-
return factory.updateClassDeclaration(node, nodesVisitor(node.
|
|
76126
|
+
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
76127
|
case 258:
|
|
75811
76128
|
ts.Debug.type(node);
|
|
75812
|
-
return factory.updateInterfaceDeclaration(node, nodesVisitor(node.
|
|
76129
|
+
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
76130
|
case 259:
|
|
75814
76131
|
ts.Debug.type(node);
|
|
75815
|
-
return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.
|
|
76132
|
+
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
76133
|
case 260:
|
|
75817
76134
|
ts.Debug.type(node);
|
|
75818
|
-
return factory.updateEnumDeclaration(node, nodesVisitor(node.
|
|
76135
|
+
return factory.updateEnumDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
|
|
75819
76136
|
case 261:
|
|
75820
76137
|
ts.Debug.type(node);
|
|
75821
|
-
return factory.updateModuleDeclaration(node, nodesVisitor(node.
|
|
76138
|
+
return factory.updateModuleDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isModuleName), nodeVisitor(node.body, visitor, ts.isModuleBody));
|
|
75822
76139
|
case 262:
|
|
75823
76140
|
ts.Debug.type(node);
|
|
75824
76141
|
return factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
|
|
@@ -75830,10 +76147,10 @@ var ts;
|
|
|
75830
76147
|
return factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
75831
76148
|
case 265:
|
|
75832
76149
|
ts.Debug.type(node);
|
|
75833
|
-
return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.
|
|
76150
|
+
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
76151
|
case 266:
|
|
75835
76152
|
ts.Debug.type(node);
|
|
75836
|
-
return factory.updateImportDeclaration(node, nodesVisitor(node.
|
|
76153
|
+
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
76154
|
case 293:
|
|
75838
76155
|
ts.Debug.type(node);
|
|
75839
76156
|
return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
|
|
@@ -75857,10 +76174,10 @@ var ts;
|
|
|
75857
76174
|
return factory.updateImportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
|
|
75858
76175
|
case 271:
|
|
75859
76176
|
ts.Debug.type(node);
|
|
75860
|
-
return factory.updateExportAssignment(node, nodesVisitor(node.
|
|
76177
|
+
return factory.updateExportAssignment(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
75861
76178
|
case 272:
|
|
75862
76179
|
ts.Debug.type(node);
|
|
75863
|
-
return factory.updateExportDeclaration(node, nodesVisitor(node.
|
|
76180
|
+
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
76181
|
case 273:
|
|
75865
76182
|
ts.Debug.type(node);
|
|
75866
76183
|
return factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
|
|
@@ -76849,20 +77166,20 @@ var ts;
|
|
|
76849
77166
|
var numParameters = firstParameterIsThis ? parameters.length - 1 : parameters.length;
|
|
76850
77167
|
for (var i = 0; i < numParameters; i++) {
|
|
76851
77168
|
var parameter = parameters[i + firstParameterOffset];
|
|
76852
|
-
if (decorators || parameter
|
|
77169
|
+
if (decorators || ts.hasDecorators(parameter)) {
|
|
76853
77170
|
if (!decorators) {
|
|
76854
77171
|
decorators = new Array(numParameters);
|
|
76855
77172
|
}
|
|
76856
|
-
decorators[i] = parameter
|
|
77173
|
+
decorators[i] = ts.getDecorators(parameter);
|
|
76857
77174
|
}
|
|
76858
77175
|
}
|
|
76859
77176
|
}
|
|
76860
77177
|
return decorators;
|
|
76861
77178
|
}
|
|
76862
77179
|
function getAllDecoratorsOfClass(node) {
|
|
76863
|
-
var decorators = node
|
|
77180
|
+
var decorators = ts.getDecorators(node);
|
|
76864
77181
|
var parameters = getDecoratorsOfParameters(ts.getFirstConstructorWithBody(node));
|
|
76865
|
-
if (!decorators && !parameters) {
|
|
77182
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76866
77183
|
return undefined;
|
|
76867
77184
|
}
|
|
76868
77185
|
return {
|
|
@@ -76890,36 +77207,38 @@ var ts;
|
|
|
76890
77207
|
return undefined;
|
|
76891
77208
|
}
|
|
76892
77209
|
var _a = ts.getAllAccessorDeclarations(parent.members, accessor), firstAccessor = _a.firstAccessor, secondAccessor = _a.secondAccessor, getAccessor = _a.getAccessor, setAccessor = _a.setAccessor;
|
|
76893
|
-
var firstAccessorWithDecorators = firstAccessor
|
|
77210
|
+
var firstAccessorWithDecorators = ts.hasDecorators(firstAccessor) ? firstAccessor :
|
|
77211
|
+
secondAccessor && ts.hasDecorators(secondAccessor) ? secondAccessor :
|
|
77212
|
+
undefined;
|
|
76894
77213
|
if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) {
|
|
76895
77214
|
return undefined;
|
|
76896
77215
|
}
|
|
76897
|
-
var decorators = firstAccessorWithDecorators
|
|
77216
|
+
var decorators = ts.getDecorators(firstAccessorWithDecorators);
|
|
76898
77217
|
var parameters = getDecoratorsOfParameters(setAccessor);
|
|
76899
|
-
if (!decorators && !parameters) {
|
|
77218
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76900
77219
|
return undefined;
|
|
76901
77220
|
}
|
|
76902
77221
|
return {
|
|
76903
77222
|
decorators: decorators,
|
|
76904
77223
|
parameters: parameters,
|
|
76905
|
-
getDecorators: getAccessor
|
|
76906
|
-
setDecorators: setAccessor
|
|
77224
|
+
getDecorators: getAccessor && ts.getDecorators(getAccessor),
|
|
77225
|
+
setDecorators: setAccessor && ts.getDecorators(setAccessor)
|
|
76907
77226
|
};
|
|
76908
77227
|
}
|
|
76909
77228
|
function getAllDecoratorsOfMethod(method) {
|
|
76910
77229
|
if (!method.body) {
|
|
76911
77230
|
return undefined;
|
|
76912
77231
|
}
|
|
76913
|
-
var decorators = method
|
|
77232
|
+
var decorators = ts.getDecorators(method);
|
|
76914
77233
|
var parameters = getDecoratorsOfParameters(method);
|
|
76915
|
-
if (!decorators && !parameters) {
|
|
77234
|
+
if (!ts.some(decorators) && !ts.some(parameters)) {
|
|
76916
77235
|
return undefined;
|
|
76917
77236
|
}
|
|
76918
77237
|
return { decorators: decorators, parameters: parameters };
|
|
76919
77238
|
}
|
|
76920
77239
|
function getAllDecoratorsOfProperty(property) {
|
|
76921
|
-
var decorators = property
|
|
76922
|
-
if (!decorators) {
|
|
77240
|
+
var decorators = ts.getDecorators(property);
|
|
77241
|
+
if (!ts.some(decorators)) {
|
|
76923
77242
|
return undefined;
|
|
76924
77243
|
}
|
|
76925
77244
|
return { decorators: decorators };
|
|
@@ -77524,6 +77843,8 @@ var ts;
|
|
|
77524
77843
|
}
|
|
77525
77844
|
}
|
|
77526
77845
|
function modifierVisitor(node) {
|
|
77846
|
+
if (ts.isDecorator(node))
|
|
77847
|
+
return undefined;
|
|
77527
77848
|
if (ts.modifierToFlag(node.kind) & 116958) {
|
|
77528
77849
|
return undefined;
|
|
77529
77850
|
}
|
|
@@ -77676,14 +77997,14 @@ var ts;
|
|
|
77676
77997
|
return !!(node.transformFlags & 8192);
|
|
77677
77998
|
}
|
|
77678
77999
|
function isClassLikeDeclarationWithTypeScriptSyntax(node) {
|
|
77679
|
-
return ts.
|
|
78000
|
+
return ts.hasDecorators(node)
|
|
77680
78001
|
|| ts.some(node.typeParameters)
|
|
77681
78002
|
|| ts.some(node.heritageClauses, hasTypeScriptClassSyntax)
|
|
77682
78003
|
|| ts.some(node.members, hasTypeScriptClassSyntax);
|
|
77683
78004
|
}
|
|
77684
78005
|
function visitClassDeclaration(node) {
|
|
77685
78006
|
if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !(currentNamespace && ts.hasSyntacticModifier(node, 1))) {
|
|
77686
|
-
return factory.updateClassDeclaration(node, ts.
|
|
78007
|
+
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
78008
|
}
|
|
77688
78009
|
var staticProperties = ts.getProperties(node, true, true);
|
|
77689
78010
|
var facts = getClassFacts(node, staticProperties);
|
|
@@ -77691,12 +78012,12 @@ var ts;
|
|
|
77691
78012
|
context.startLexicalEnvironment();
|
|
77692
78013
|
}
|
|
77693
78014
|
var name = node.name || (facts & 5 ? factory.getGeneratedNameForNode(node) : undefined);
|
|
77694
|
-
var allDecorators =
|
|
78015
|
+
var allDecorators = ts.getAllDecoratorsOfClass(node);
|
|
77695
78016
|
var decorators = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
|
|
77696
78017
|
var modifiers = !(facts & 128)
|
|
77697
78018
|
? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
|
|
77698
78019
|
: ts.elideNodes(factory, node.modifiers);
|
|
77699
|
-
var classStatement = factory.updateClassDeclaration(node, decorators, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node));
|
|
78020
|
+
var classStatement = factory.updateClassDeclaration(node, ts.concatenate(decorators, modifiers), name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node));
|
|
77700
78021
|
var emitFlags = ts.getEmitFlags(node);
|
|
77701
78022
|
if (facts & 1) {
|
|
77702
78023
|
emitFlags |= 32;
|
|
@@ -77743,9 +78064,9 @@ var ts;
|
|
|
77743
78064
|
return ts.singleOrMany(statements);
|
|
77744
78065
|
}
|
|
77745
78066
|
function visitClassExpression(node) {
|
|
77746
|
-
var allDecorators =
|
|
78067
|
+
var allDecorators = ts.getAllDecoratorsOfClass(node);
|
|
77747
78068
|
var decorators = transformAllDecoratorsOfDeclaration(node, node, allDecorators);
|
|
77748
|
-
return factory.updateClassExpression(node, decorators,
|
|
78069
|
+
return factory.updateClassExpression(node, decorators, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), isClassLikeDeclarationWithTypeScriptSyntax(node) ?
|
|
77749
78070
|
transformClassMembers(node) :
|
|
77750
78071
|
ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
77751
78072
|
}
|
|
@@ -77758,99 +78079,25 @@ var ts;
|
|
|
77758
78079
|
for (var _i = 0, parametersWithPropertyAssignments_1 = parametersWithPropertyAssignments; _i < parametersWithPropertyAssignments_1.length; _i++) {
|
|
77759
78080
|
var parameter = parametersWithPropertyAssignments_1[_i];
|
|
77760
78081
|
if (ts.isIdentifier(parameter.name)) {
|
|
77761
|
-
members.push(ts.setOriginalNode(factory.createPropertyDeclaration(undefined,
|
|
78082
|
+
members.push(ts.setOriginalNode(factory.createPropertyDeclaration(undefined, parameter.name, undefined, undefined, undefined), parameter));
|
|
77762
78083
|
}
|
|
77763
78084
|
}
|
|
77764
78085
|
}
|
|
77765
78086
|
ts.addRange(members, ts.visitNodes(node.members, getClassElementVisitor(node), ts.isClassElement));
|
|
77766
78087
|
return ts.setTextRange(factory.createNodeArray(members), node.members);
|
|
77767
78088
|
}
|
|
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
78089
|
function transformAllDecoratorsOfDeclaration(node, container, allDecorators) {
|
|
78090
|
+
var _a, _b, _c, _d;
|
|
77846
78091
|
if (!allDecorators) {
|
|
77847
78092
|
return undefined;
|
|
77848
78093
|
}
|
|
77849
|
-
var decorators = ts.
|
|
78094
|
+
var decorators = ts.visitArray(allDecorators.decorators, visitor, ts.isDecorator);
|
|
77850
78095
|
var parameterDecorators = ts.flatMap(allDecorators.parameters, transformDecoratorsOfParameter);
|
|
77851
78096
|
var metadataDecorators = ts.some(decorators) || ts.some(parameterDecorators) ? getTypeMetadata(node, container) : undefined;
|
|
77852
78097
|
var result = factory.createNodeArray(ts.concatenate(ts.concatenate(decorators, parameterDecorators), metadataDecorators));
|
|
77853
|
-
ts.
|
|
78098
|
+
var pos = (_b = (_a = ts.firstOrUndefined(allDecorators.decorators)) === null || _a === void 0 ? void 0 : _a.pos) !== null && _b !== void 0 ? _b : -1;
|
|
78099
|
+
var end = (_d = (_c = ts.lastOrUndefined(allDecorators.decorators)) === null || _c === void 0 ? void 0 : _c.end) !== null && _d !== void 0 ? _d : -1;
|
|
78100
|
+
ts.setTextRangePosEnd(result, pos, end);
|
|
77854
78101
|
return result;
|
|
77855
78102
|
}
|
|
77856
78103
|
function transformDecoratorsOfParameter(parameterDecorators, parameterOffset) {
|
|
@@ -77863,7 +78110,8 @@ var ts;
|
|
|
77863
78110
|
ts.setTextRange(helper, parameterDecorator.expression);
|
|
77864
78111
|
ts.setEmitFlags(helper, 1536);
|
|
77865
78112
|
var decorator = factory.createDecorator(helper);
|
|
77866
|
-
ts.
|
|
78113
|
+
ts.setSourceMapRange(decorator, parameterDecorator.expression);
|
|
78114
|
+
ts.setCommentRange(decorator, parameterDecorator.expression);
|
|
77867
78115
|
ts.setEmitFlags(decorator, 1536);
|
|
77868
78116
|
decorators.push(decorator);
|
|
77869
78117
|
}
|
|
@@ -77955,7 +78203,7 @@ var ts;
|
|
|
77955
78203
|
}
|
|
77956
78204
|
function visitPropertyNameOfClassElement(member) {
|
|
77957
78205
|
var name = member.name;
|
|
77958
|
-
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.
|
|
78206
|
+
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.hasDecorators(member))) {
|
|
77959
78207
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
77960
78208
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
77961
78209
|
if (!ts.isSimpleInlineableExpression(innerExpression)) {
|
|
@@ -77980,21 +78228,21 @@ var ts;
|
|
|
77980
78228
|
}
|
|
77981
78229
|
function visitPropertyDeclaration(node, parent) {
|
|
77982
78230
|
var isAmbient = node.flags & 16777216 || ts.hasSyntacticModifier(node, 128);
|
|
77983
|
-
if (isAmbient && !ts.
|
|
78231
|
+
if (isAmbient && !ts.hasDecorators(node)) {
|
|
77984
78232
|
return undefined;
|
|
77985
78233
|
}
|
|
77986
|
-
var allDecorators = getAllDecoratorsOfClassElement(node, parent);
|
|
78234
|
+
var allDecorators = ts.getAllDecoratorsOfClassElement(node, parent);
|
|
77987
78235
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
77988
78236
|
if (isAmbient) {
|
|
77989
|
-
return factory.updatePropertyDeclaration(node, decorators, factory.createModifiersFromModifierFlags(2), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
78237
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
77990
78238
|
}
|
|
77991
|
-
return factory.updatePropertyDeclaration(node, decorators, ts.visitNodes(node.modifiers,
|
|
78239
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitNode(node.initializer, visitor));
|
|
77992
78240
|
}
|
|
77993
78241
|
function visitConstructor(node) {
|
|
77994
78242
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
77995
78243
|
return undefined;
|
|
77996
78244
|
}
|
|
77997
|
-
return factory.updateConstructorDeclaration(node, undefined, ts.
|
|
78245
|
+
return factory.updateConstructorDeclaration(node, undefined, ts.visitParameterList(node.parameters, visitor, context), transformConstructorBody(node.body, node));
|
|
77998
78246
|
}
|
|
77999
78247
|
function transformConstructorBody(body, constructor) {
|
|
78000
78248
|
var parametersWithPropertyAssignments = constructor &&
|
|
@@ -78041,9 +78289,9 @@ var ts;
|
|
|
78041
78289
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
78042
78290
|
return undefined;
|
|
78043
78291
|
}
|
|
78044
|
-
var allDecorators = ts.isClassLike(parent) ? getAllDecoratorsOfClassElement(node, parent) : undefined;
|
|
78292
|
+
var allDecorators = ts.isClassLike(parent) ? ts.getAllDecoratorsOfClassElement(node, parent) : undefined;
|
|
78045
78293
|
var decorators = ts.isClassLike(parent) ? transformAllDecoratorsOfDeclaration(node, parent, allDecorators) : undefined;
|
|
78046
|
-
return factory.updateMethodDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78294
|
+
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
78295
|
}
|
|
78048
78296
|
function shouldEmitAccessorDeclaration(node) {
|
|
78049
78297
|
return !(ts.nodeIsMissing(node.body) && ts.hasSyntacticModifier(node, 128));
|
|
@@ -78056,9 +78304,9 @@ var ts;
|
|
|
78056
78304
|
return undefined;
|
|
78057
78305
|
}
|
|
78058
78306
|
var decorators = ts.isClassLike(parent) ?
|
|
78059
|
-
transformAllDecoratorsOfDeclaration(node, parent, getAllDecoratorsOfClassElement(node, parent)) :
|
|
78307
|
+
transformAllDecoratorsOfDeclaration(node, parent, ts.getAllDecoratorsOfClassElement(node, parent)) :
|
|
78060
78308
|
undefined;
|
|
78061
|
-
return factory.updateGetAccessorDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78309
|
+
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
78310
|
}
|
|
78063
78311
|
function visitSetAccessor(node, parent) {
|
|
78064
78312
|
if (!(node.transformFlags & 1)) {
|
|
@@ -78068,15 +78316,15 @@ var ts;
|
|
|
78068
78316
|
return undefined;
|
|
78069
78317
|
}
|
|
78070
78318
|
var decorators = ts.isClassLike(parent) ?
|
|
78071
|
-
transformAllDecoratorsOfDeclaration(node, parent, getAllDecoratorsOfClassElement(node, parent)) :
|
|
78319
|
+
transformAllDecoratorsOfDeclaration(node, parent, ts.getAllDecoratorsOfClassElement(node, parent)) :
|
|
78072
78320
|
undefined;
|
|
78073
|
-
return factory.updateSetAccessorDeclaration(node, decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.
|
|
78321
|
+
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
78322
|
}
|
|
78075
78323
|
function visitFunctionDeclaration(node) {
|
|
78076
78324
|
if (!shouldEmitFunctionLikeDeclaration(node)) {
|
|
78077
78325
|
return factory.createNotEmittedStatement(node);
|
|
78078
78326
|
}
|
|
78079
|
-
var updated = factory.updateFunctionDeclaration(node,
|
|
78327
|
+
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
78328
|
if (isExportOfNamespace(node)) {
|
|
78081
78329
|
var statements = [updated];
|
|
78082
78330
|
addExportMemberAssignment(statements, node);
|
|
@@ -78099,7 +78347,7 @@ var ts;
|
|
|
78099
78347
|
if (ts.parameterIsThisKeyword(node)) {
|
|
78100
78348
|
return undefined;
|
|
78101
78349
|
}
|
|
78102
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.
|
|
78350
|
+
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
78351
|
if (updated !== node) {
|
|
78104
78352
|
ts.setCommentRange(updated, node);
|
|
78105
78353
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -78193,7 +78441,7 @@ var ts;
|
|
|
78193
78441
|
var localName = factory.getLocalName(node, false, true);
|
|
78194
78442
|
moduleArg = factory.createAssignment(localName, moduleArg);
|
|
78195
78443
|
}
|
|
78196
|
-
var enumStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
78444
|
+
var enumStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, transformEnumBody(node, containerName)), undefined, [moduleArg]));
|
|
78197
78445
|
ts.setOriginalNode(enumStatement, node);
|
|
78198
78446
|
if (varAdded) {
|
|
78199
78447
|
ts.setSyntheticLeadingComments(enumStatement, undefined);
|
|
@@ -78325,7 +78573,7 @@ var ts;
|
|
|
78325
78573
|
var localName = factory.getLocalName(node, false, true);
|
|
78326
78574
|
moduleArg = factory.createAssignment(localName, moduleArg);
|
|
78327
78575
|
}
|
|
78328
|
-
var moduleStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
78576
|
+
var moduleStatement = factory.createExpressionStatement(factory.createCallExpression(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, transformModuleBody(node, containerName)), undefined, [moduleArg]));
|
|
78329
78577
|
ts.setOriginalNode(moduleStatement, node);
|
|
78330
78578
|
if (varAdded) {
|
|
78331
78579
|
ts.setSyntheticLeadingComments(moduleStatement, undefined);
|
|
@@ -78396,7 +78644,7 @@ var ts;
|
|
|
78396
78644
|
return importClause ||
|
|
78397
78645
|
compilerOptions.importsNotUsedAsValues === 1 ||
|
|
78398
78646
|
compilerOptions.importsNotUsedAsValues === 2
|
|
78399
|
-
? factory.updateImportDeclaration(node, undefined,
|
|
78647
|
+
? factory.updateImportDeclaration(node, undefined, importClause, node.moduleSpecifier, node.assertClause)
|
|
78400
78648
|
: undefined;
|
|
78401
78649
|
}
|
|
78402
78650
|
function visitImportClause(node) {
|
|
@@ -78435,7 +78683,7 @@ var ts;
|
|
|
78435
78683
|
compilerOptions.importsNotUsedAsValues === 2);
|
|
78436
78684
|
var exportClause = ts.visitNode(node.exportClause, function (bindings) { return visitNamedExportBindings(bindings, allowEmpty); }, ts.isNamedExportBindings);
|
|
78437
78685
|
return exportClause
|
|
78438
|
-
? factory.updateExportDeclaration(node, undefined,
|
|
78686
|
+
? factory.updateExportDeclaration(node, undefined, node.isTypeOnly, exportClause, node.moduleSpecifier, node.assertClause)
|
|
78439
78687
|
: undefined;
|
|
78440
78688
|
}
|
|
78441
78689
|
function visitNamedExports(node, allowEmpty) {
|
|
@@ -78463,7 +78711,7 @@ var ts;
|
|
|
78463
78711
|
if (ts.isExternalModuleImportEqualsDeclaration(node)) {
|
|
78464
78712
|
var isReferenced = shouldEmitAliasDeclaration(node);
|
|
78465
78713
|
if (!isReferenced && compilerOptions.importsNotUsedAsValues === 1) {
|
|
78466
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined,
|
|
78714
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined, node.moduleReference.expression, undefined), node), node);
|
|
78467
78715
|
}
|
|
78468
78716
|
return isReferenced ? ts.visitEachChild(node, visitor, context) : undefined;
|
|
78469
78717
|
}
|
|
@@ -78818,7 +79066,7 @@ var ts;
|
|
|
78818
79066
|
return node;
|
|
78819
79067
|
}
|
|
78820
79068
|
function visitMethodOrAccessorDeclaration(node) {
|
|
78821
|
-
ts.Debug.assert(!ts.
|
|
79069
|
+
ts.Debug.assert(!ts.hasDecorators(node));
|
|
78822
79070
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.isPrivateIdentifier(node.name)) {
|
|
78823
79071
|
return ts.visitEachChild(node, classElementVisitor, context);
|
|
78824
79072
|
}
|
|
@@ -78829,7 +79077,7 @@ var ts;
|
|
|
78829
79077
|
}
|
|
78830
79078
|
var functionName = getHoistedFunctionName(node);
|
|
78831
79079
|
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))));
|
|
79080
|
+
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
79081
|
}
|
|
78834
79082
|
return undefined;
|
|
78835
79083
|
}
|
|
@@ -78850,13 +79098,13 @@ var ts;
|
|
|
78850
79098
|
}
|
|
78851
79099
|
}
|
|
78852
79100
|
function visitPropertyDeclaration(node) {
|
|
78853
|
-
ts.Debug.assert(!ts.
|
|
79101
|
+
ts.Debug.assert(!ts.hasDecorators(node));
|
|
78854
79102
|
if (ts.isPrivateIdentifier(node.name)) {
|
|
78855
79103
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
|
|
78856
79104
|
if (ts.isStatic(node)) {
|
|
78857
79105
|
return ts.visitEachChild(node, visitor, context);
|
|
78858
79106
|
}
|
|
78859
|
-
return factory.updatePropertyDeclaration(node,
|
|
79107
|
+
return factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.name, undefined, undefined, undefined);
|
|
78860
79108
|
}
|
|
78861
79109
|
var info = accessPrivateIdentifier(node.name);
|
|
78862
79110
|
ts.Debug.assert(info, "Undeclared private name for property declaration.");
|
|
@@ -78871,7 +79119,7 @@ var ts;
|
|
|
78871
79119
|
if (ts.isStatic(node) && !shouldTransformPrivateElementsOrClassStaticBlocks && !useDefineForClassFields) {
|
|
78872
79120
|
var initializerStatement = transformPropertyOrClassStaticBlock(node, factory.createThis());
|
|
78873
79121
|
if (initializerStatement) {
|
|
78874
|
-
var staticBlock = factory.createClassStaticBlockDeclaration(
|
|
79122
|
+
var staticBlock = factory.createClassStaticBlockDeclaration(factory.createBlock([initializerStatement]));
|
|
78875
79123
|
ts.setOriginalNode(staticBlock, node);
|
|
78876
79124
|
ts.setCommentRange(staticBlock, node);
|
|
78877
79125
|
ts.setCommentRange(initializerStatement, { pos: -1, end: -1 });
|
|
@@ -79247,7 +79495,7 @@ var ts;
|
|
|
79247
79495
|
var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
|
|
79248
79496
|
var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104);
|
|
79249
79497
|
var statements = [
|
|
79250
|
-
factory.updateClassDeclaration(node,
|
|
79498
|
+
factory.updateClassDeclaration(node, node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass))
|
|
79251
79499
|
];
|
|
79252
79500
|
if (pendingClassReferenceAssignment) {
|
|
79253
79501
|
getPendingExpressions().unshift(pendingClassReferenceAssignment);
|
|
@@ -79285,7 +79533,7 @@ var ts;
|
|
|
79285
79533
|
temp = createClassTempVar();
|
|
79286
79534
|
getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp);
|
|
79287
79535
|
}
|
|
79288
|
-
var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.
|
|
79536
|
+
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
79537
|
var hasTransformableStatics = shouldTransformPrivateElementsOrClassStaticBlocks && ts.some(staticPropertiesOrClassStaticBlocks, function (p) { return ts.isClassStaticBlockDeclaration(p) || !!p.initializer || ts.isPrivateIdentifier(p.name); });
|
|
79290
79538
|
if (hasTransformableStatics || ts.some(pendingExpressions)) {
|
|
79291
79539
|
if (isDecoratedClassDeclaration) {
|
|
@@ -79345,7 +79593,7 @@ var ts;
|
|
|
79345
79593
|
members.push(constructor);
|
|
79346
79594
|
}
|
|
79347
79595
|
if (!shouldTransformPrivateElementsOrClassStaticBlocks && ts.some(pendingExpressions)) {
|
|
79348
|
-
members.push(factory.createClassStaticBlockDeclaration(
|
|
79596
|
+
members.push(factory.createClassStaticBlockDeclaration(factory.createBlock([
|
|
79349
79597
|
factory.createExpressionStatement(factory.inlineExpressions(pendingExpressions))
|
|
79350
79598
|
])));
|
|
79351
79599
|
pendingExpressions = undefined;
|
|
@@ -79378,7 +79626,7 @@ var ts;
|
|
|
79378
79626
|
if (!body) {
|
|
79379
79627
|
return undefined;
|
|
79380
79628
|
}
|
|
79381
|
-
return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(factory.createConstructorDeclaration(undefined,
|
|
79629
|
+
return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(factory.createConstructorDeclaration(undefined, parameters !== null && parameters !== void 0 ? parameters : [], body), constructor || node), constructor));
|
|
79382
79630
|
}
|
|
79383
79631
|
function transformConstructorBody(node, constructor, isDerivedClass) {
|
|
79384
79632
|
var _a;
|
|
@@ -80368,6 +80616,9 @@ var ts;
|
|
|
80368
80616
|
ts.addEmitHelpers(visited, context.readEmitHelpers());
|
|
80369
80617
|
return visited;
|
|
80370
80618
|
}
|
|
80619
|
+
function modifierVisitor(node) {
|
|
80620
|
+
return ts.isDecorator(node) ? undefined : node;
|
|
80621
|
+
}
|
|
80371
80622
|
function visitor(node) {
|
|
80372
80623
|
if (!(node.transformFlags & 33554432)) {
|
|
80373
80624
|
return node;
|
|
@@ -80387,8 +80638,6 @@ var ts;
|
|
|
80387
80638
|
return visitSetAccessorDeclaration(node);
|
|
80388
80639
|
case 172:
|
|
80389
80640
|
return visitGetAccessorDeclaration(node);
|
|
80390
|
-
case 170:
|
|
80391
|
-
return visitClassStaticBlockDeclaration(node);
|
|
80392
80641
|
case 167:
|
|
80393
80642
|
return visitPropertyDeclaration(node);
|
|
80394
80643
|
case 164:
|
|
@@ -80400,7 +80649,7 @@ var ts;
|
|
|
80400
80649
|
function visitClassDeclaration(node) {
|
|
80401
80650
|
if (!(ts.classOrConstructorParameterIsDecorated(node) || ts.childIsDecorated(node)))
|
|
80402
80651
|
return ts.visitEachChild(node, visitor, context);
|
|
80403
|
-
var classStatement = ts.
|
|
80652
|
+
var classStatement = ts.hasDecorators(node) ?
|
|
80404
80653
|
createClassDeclarationHeadWithDecorators(node, node.name) :
|
|
80405
80654
|
createClassDeclarationHeadWithoutDecorators(node, node.name);
|
|
80406
80655
|
var statements = [classStatement];
|
|
@@ -80414,7 +80663,7 @@ var ts;
|
|
|
80414
80663
|
return ts.singleOrMany(statements);
|
|
80415
80664
|
}
|
|
80416
80665
|
function createClassDeclarationHeadWithoutDecorators(node, name) {
|
|
80417
|
-
return factory.updateClassDeclaration(node, ts.
|
|
80666
|
+
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
80667
|
}
|
|
80419
80668
|
function createClassDeclarationHeadWithDecorators(node, name) {
|
|
80420
80669
|
var location = ts.moveRangePastModifiers(node);
|
|
@@ -80424,7 +80673,7 @@ var ts;
|
|
|
80424
80673
|
factory.getLocalName(node, false, true);
|
|
80425
80674
|
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
|
|
80426
80675
|
var members = ts.visitNodes(node.members, visitor, ts.isClassElement);
|
|
80427
|
-
var classExpression = factory.createClassExpression(undefined,
|
|
80676
|
+
var classExpression = factory.createClassExpression(undefined, name, undefined, heritageClauses, members);
|
|
80428
80677
|
ts.setOriginalNode(classExpression, node);
|
|
80429
80678
|
ts.setTextRange(classExpression, location);
|
|
80430
80679
|
var statement = factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
@@ -80436,10 +80685,10 @@ var ts;
|
|
|
80436
80685
|
return statement;
|
|
80437
80686
|
}
|
|
80438
80687
|
function visitClassExpression(node) {
|
|
80439
|
-
return factory.updateClassExpression(node, ts.
|
|
80688
|
+
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
80689
|
}
|
|
80441
80690
|
function visitConstructorDeclaration(node) {
|
|
80442
|
-
return factory.updateConstructorDeclaration(node,
|
|
80691
|
+
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
80692
|
}
|
|
80444
80693
|
function finishClassElement(updated, original) {
|
|
80445
80694
|
if (updated !== original) {
|
|
@@ -80449,25 +80698,22 @@ var ts;
|
|
|
80449
80698
|
return updated;
|
|
80450
80699
|
}
|
|
80451
80700
|
function visitMethodDeclaration(node) {
|
|
80452
|
-
return finishClassElement(factory.updateMethodDeclaration(node, ts.
|
|
80701
|
+
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
80702
|
}
|
|
80454
80703
|
function visitGetAccessorDeclaration(node) {
|
|
80455
|
-
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.
|
|
80704
|
+
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
80705
|
}
|
|
80457
80706
|
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));
|
|
80707
|
+
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
80708
|
}
|
|
80463
80709
|
function visitPropertyDeclaration(node) {
|
|
80464
80710
|
if (node.flags & 16777216 || ts.hasSyntacticModifier(node, 2)) {
|
|
80465
80711
|
return undefined;
|
|
80466
80712
|
}
|
|
80467
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.
|
|
80713
|
+
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
80714
|
}
|
|
80469
80715
|
function visitParameterDeclaration(node) {
|
|
80470
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.
|
|
80716
|
+
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
80717
|
if (updated !== node) {
|
|
80472
80718
|
ts.setCommentRange(updated, node);
|
|
80473
80719
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -80814,22 +81060,22 @@ var ts;
|
|
|
80814
81060
|
return ts.setOriginalNode(ts.setTextRange(factory.createYieldExpression(undefined, ts.visitNode(node.expression, visitor, ts.isExpression)), node), node);
|
|
80815
81061
|
}
|
|
80816
81062
|
function visitMethodDeclaration(node) {
|
|
80817
|
-
return factory.updateMethodDeclaration(node,
|
|
81063
|
+
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
81064
|
? transformAsyncFunctionBody(node)
|
|
80819
81065
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80820
81066
|
}
|
|
80821
81067
|
function visitFunctionDeclaration(node) {
|
|
80822
|
-
return factory.updateFunctionDeclaration(node,
|
|
81068
|
+
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
81069
|
? transformAsyncFunctionBody(node)
|
|
80824
81070
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80825
81071
|
}
|
|
80826
81072
|
function visitFunctionExpression(node) {
|
|
80827
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
81073
|
+
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
81074
|
? transformAsyncFunctionBody(node)
|
|
80829
81075
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80830
81076
|
}
|
|
80831
81077
|
function visitArrowFunction(node) {
|
|
80832
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
81078
|
+
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
81079
|
? transformAsyncFunctionBody(node)
|
|
80834
81080
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
80835
81081
|
}
|
|
@@ -81086,7 +81332,7 @@ var ts;
|
|
|
81086
81332
|
getterAndSetter.push(factory.createPropertyAssignment("get", factory.createArrowFunction(undefined, undefined, [], undefined, undefined, ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4), name), 4))));
|
|
81087
81333
|
if (hasBinding) {
|
|
81088
81334
|
getterAndSetter.push(factory.createPropertyAssignment("set", factory.createArrowFunction(undefined, undefined, [
|
|
81089
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
81335
|
+
factory.createParameterDeclaration(undefined, undefined, "v", undefined, undefined, undefined)
|
|
81090
81336
|
], undefined, undefined, factory.createAssignment(ts.setEmitFlags(factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createSuper(), 4), name), 4), factory.createIdentifier("v")))));
|
|
81091
81337
|
}
|
|
81092
81338
|
accessors.push(factory.createPropertyAssignment(name, factory.createObjectLiteralExpression(getterAndSetter)));
|
|
@@ -81516,10 +81762,10 @@ var ts;
|
|
|
81516
81762
|
}
|
|
81517
81763
|
function visitParameter(node) {
|
|
81518
81764
|
if (parametersWithPrecedingObjectRestOrSpread === null || parametersWithPrecedingObjectRestOrSpread === void 0 ? void 0 : parametersWithPrecedingObjectRestOrSpread.has(node)) {
|
|
81519
|
-
return factory.updateParameterDeclaration(node, undefined,
|
|
81765
|
+
return factory.updateParameterDeclaration(node, undefined, node.dotDotDotToken, ts.isBindingPattern(node.name) ? factory.getGeneratedNameForNode(node) : node.name, undefined, undefined, undefined);
|
|
81520
81766
|
}
|
|
81521
81767
|
if (node.transformFlags & 65536) {
|
|
81522
|
-
return factory.updateParameterDeclaration(node, undefined,
|
|
81768
|
+
return factory.updateParameterDeclaration(node, undefined, node.dotDotDotToken, factory.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
81523
81769
|
}
|
|
81524
81770
|
return ts.visitEachChild(node, visitor, context);
|
|
81525
81771
|
}
|
|
@@ -81541,7 +81787,7 @@ var ts;
|
|
|
81541
81787
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81542
81788
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81543
81789
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81544
|
-
var updated = factory.updateConstructorDeclaration(node,
|
|
81790
|
+
var updated = factory.updateConstructorDeclaration(node, node.modifiers, ts.visitParameterList(node.parameters, parameterVisitor, context), transformFunctionBody(node));
|
|
81545
81791
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81546
81792
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81547
81793
|
return updated;
|
|
@@ -81551,7 +81797,7 @@ var ts;
|
|
|
81551
81797
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81552
81798
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81553
81799
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81554
|
-
var updated = factory.updateGetAccessorDeclaration(node,
|
|
81800
|
+
var updated = factory.updateGetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context), undefined, transformFunctionBody(node));
|
|
81555
81801
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81556
81802
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81557
81803
|
return updated;
|
|
@@ -81561,7 +81807,7 @@ var ts;
|
|
|
81561
81807
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81562
81808
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81563
81809
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81564
|
-
var updated = factory.updateSetAccessorDeclaration(node,
|
|
81810
|
+
var updated = factory.updateSetAccessorDeclaration(node, node.modifiers, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitParameterList(node.parameters, parameterVisitor, context), transformFunctionBody(node));
|
|
81565
81811
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
81566
81812
|
parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread;
|
|
81567
81813
|
return updated;
|
|
@@ -81571,8 +81817,8 @@ var ts;
|
|
|
81571
81817
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81572
81818
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81573
81819
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81574
|
-
var updated = factory.updateMethodDeclaration(node,
|
|
81575
|
-
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.
|
|
81820
|
+
var updated = factory.updateMethodDeclaration(node, enclosingFunctionFlags & 1
|
|
81821
|
+
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
81576
81822
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
81577
81823
|
? undefined
|
|
81578
81824
|
: 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 +81833,7 @@ var ts;
|
|
|
81587
81833
|
var savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread;
|
|
81588
81834
|
enclosingFunctionFlags = ts.getFunctionFlags(node);
|
|
81589
81835
|
parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node);
|
|
81590
|
-
var updated = factory.updateFunctionDeclaration(node,
|
|
81836
|
+
var updated = factory.updateFunctionDeclaration(node, enclosingFunctionFlags & 1
|
|
81591
81837
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifier)
|
|
81592
81838
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
81593
81839
|
? undefined
|
|
@@ -82171,7 +82417,7 @@ var ts;
|
|
|
82171
82417
|
for (var _i = 0, _a = ts.arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries()); _i < _a.length; _i++) {
|
|
82172
82418
|
var _b = _a[_i], importSource = _b[0], importSpecifiersMap = _b[1];
|
|
82173
82419
|
if (ts.isExternalModule(node)) {
|
|
82174
|
-
var importStatement = factory.createImportDeclaration(undefined,
|
|
82420
|
+
var importStatement = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports(ts.arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource), undefined);
|
|
82175
82421
|
ts.setParentRecursive(importStatement, false);
|
|
82176
82422
|
statements = ts.insertStatementAfterCustomPrologue(statements.slice(), importStatement);
|
|
82177
82423
|
}
|
|
@@ -83155,7 +83401,7 @@ var ts;
|
|
|
83155
83401
|
enableSubstitutionsForBlockScopedBindings();
|
|
83156
83402
|
}
|
|
83157
83403
|
var extendsClauseElement = ts.getClassExtendsHeritageElement(node);
|
|
83158
|
-
var classFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [factory.createParameterDeclaration(undefined, undefined,
|
|
83404
|
+
var classFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [factory.createParameterDeclaration(undefined, undefined, factory.createUniqueName("_super", 16 | 32))] : [], undefined, transformClassBody(node, extendsClauseElement));
|
|
83159
83405
|
ts.setEmitFlags(classFunction, (ts.getEmitFlags(node) & 65536) | 524288);
|
|
83160
83406
|
var inner = factory.createPartiallyEmittedExpression(classFunction);
|
|
83161
83407
|
ts.setTextRangeEnd(inner, node.end);
|
|
@@ -83201,7 +83447,7 @@ var ts;
|
|
|
83201
83447
|
var ancestorFacts = enterSubtree(32662, 73);
|
|
83202
83448
|
var constructor = ts.getFirstConstructorWithBody(node);
|
|
83203
83449
|
var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
|
|
83204
|
-
var constructorFunction = factory.createFunctionDeclaration(undefined, undefined,
|
|
83450
|
+
var constructorFunction = factory.createFunctionDeclaration(undefined, undefined, name, undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
|
|
83205
83451
|
ts.setTextRange(constructorFunction, constructor || node);
|
|
83206
83452
|
if (extendsClauseElement) {
|
|
83207
83453
|
ts.setEmitFlags(constructorFunction, 8);
|
|
@@ -83332,10 +83578,10 @@ var ts;
|
|
|
83332
83578
|
return undefined;
|
|
83333
83579
|
}
|
|
83334
83580
|
else if (ts.isBindingPattern(node.name)) {
|
|
83335
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined,
|
|
83581
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined, factory.getGeneratedNameForNode(node), undefined, undefined, undefined), node), node);
|
|
83336
83582
|
}
|
|
83337
83583
|
else if (node.initializer) {
|
|
83338
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined,
|
|
83584
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createParameterDeclaration(undefined, undefined, node.name, undefined, undefined, undefined), node), node);
|
|
83339
83585
|
}
|
|
83340
83586
|
else {
|
|
83341
83587
|
return node;
|
|
@@ -83614,7 +83860,7 @@ var ts;
|
|
|
83614
83860
|
: node.name;
|
|
83615
83861
|
exitSubtree(ancestorFacts, 98304, 0);
|
|
83616
83862
|
convertedLoopState = savedConvertedLoopState;
|
|
83617
|
-
return factory.updateFunctionDeclaration(node,
|
|
83863
|
+
return factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
|
|
83618
83864
|
}
|
|
83619
83865
|
function transformFunctionLikeToExpression(node, location, name, container) {
|
|
83620
83866
|
var savedConvertedLoopState = convertedLoopState;
|
|
@@ -84376,7 +84622,7 @@ var ts;
|
|
|
84376
84622
|
}
|
|
84377
84623
|
}
|
|
84378
84624
|
else {
|
|
84379
|
-
loopParameters.push(factory.createParameterDeclaration(undefined, undefined,
|
|
84625
|
+
loopParameters.push(factory.createParameterDeclaration(undefined, undefined, name));
|
|
84380
84626
|
var checkFlags = resolver.getNodeCheckFlags(decl);
|
|
84381
84627
|
if (checkFlags & 4194304 || hasCapturedBindingsInForHead) {
|
|
84382
84628
|
var outParamName = factory.createUniqueName("out_" + ts.idText(name));
|
|
@@ -84488,10 +84734,10 @@ var ts;
|
|
|
84488
84734
|
var parameters = ts.visitParameterList(node.parameters, visitor, context);
|
|
84489
84735
|
var body = transformFunctionBody(node);
|
|
84490
84736
|
if (node.kind === 172) {
|
|
84491
|
-
updated = factory.updateGetAccessorDeclaration(node, node.
|
|
84737
|
+
updated = factory.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body);
|
|
84492
84738
|
}
|
|
84493
84739
|
else {
|
|
84494
|
-
updated = factory.updateSetAccessorDeclaration(node, node.
|
|
84740
|
+
updated = factory.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body);
|
|
84495
84741
|
}
|
|
84496
84742
|
exitSubtree(ancestorFacts, 98304, 0);
|
|
84497
84743
|
convertedLoopState = savedConvertedLoopState;
|
|
@@ -85057,7 +85303,7 @@ var ts;
|
|
|
85057
85303
|
}
|
|
85058
85304
|
function visitFunctionDeclaration(node) {
|
|
85059
85305
|
if (node.asteriskToken) {
|
|
85060
|
-
node = ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(
|
|
85306
|
+
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
85307
|
}
|
|
85062
85308
|
else {
|
|
85063
85309
|
var savedInGeneratorFunctionBody = inGeneratorFunctionBody;
|
|
@@ -86253,7 +86499,7 @@ var ts;
|
|
|
86253
86499
|
currentExceptionBlock = undefined;
|
|
86254
86500
|
withBlockStack = undefined;
|
|
86255
86501
|
var buildResult = buildStatements();
|
|
86256
|
-
return emitHelpers().createGeneratorHelper(ts.setEmitFlags(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
86502
|
+
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
86503
|
}
|
|
86258
86504
|
function buildStatements() {
|
|
86259
86505
|
if (operations) {
|
|
@@ -86610,8 +86856,8 @@ var ts;
|
|
|
86610
86856
|
jsonSourceFile ?
|
|
86611
86857
|
jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory.createObjectLiteralExpression() :
|
|
86612
86858
|
factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
|
|
86613
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86614
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86859
|
+
factory.createParameterDeclaration(undefined, undefined, "require"),
|
|
86860
|
+
factory.createParameterDeclaration(undefined, undefined, "exports")
|
|
86615
86861
|
], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
|
|
86616
86862
|
], false)))
|
|
86617
86863
|
]), node.statements));
|
|
@@ -86621,7 +86867,7 @@ var ts;
|
|
|
86621
86867
|
function transformUMDModule(node) {
|
|
86622
86868
|
var _a = collectAsynchronousDependencies(node, false), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
|
|
86623
86869
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
86624
|
-
var umdHeader = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
86870
|
+
var umdHeader = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, "factory")], undefined, ts.setTextRange(factory.createBlock([
|
|
86625
86871
|
factory.createIfStatement(factory.createLogicalAnd(factory.createTypeCheck(factory.createIdentifier("module"), "object"), factory.createTypeCheck(factory.createPropertyAccessExpression(factory.createIdentifier("module"), "exports"), "object")), factory.createBlock([
|
|
86626
86872
|
factory.createVariableStatement(undefined, [
|
|
86627
86873
|
factory.createVariableDeclaration("v", undefined, undefined, factory.createCallExpression(factory.createIdentifier("factory"), undefined, [
|
|
@@ -86643,8 +86889,8 @@ var ts;
|
|
|
86643
86889
|
var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
|
|
86644
86890
|
factory.createExpressionStatement(factory.createCallExpression(umdHeader, undefined, [
|
|
86645
86891
|
factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
|
|
86646
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86647
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86892
|
+
factory.createParameterDeclaration(undefined, undefined, "require"),
|
|
86893
|
+
factory.createParameterDeclaration(undefined, undefined, "exports")
|
|
86648
86894
|
], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
|
|
86649
86895
|
]))
|
|
86650
86896
|
]), node.statements));
|
|
@@ -86659,7 +86905,7 @@ var ts;
|
|
|
86659
86905
|
var amdDependency = _a[_i];
|
|
86660
86906
|
if (amdDependency.name) {
|
|
86661
86907
|
aliasedModuleNames.push(factory.createStringLiteral(amdDependency.path));
|
|
86662
|
-
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined,
|
|
86908
|
+
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined, amdDependency.name));
|
|
86663
86909
|
}
|
|
86664
86910
|
else {
|
|
86665
86911
|
unaliasedModuleNames.push(factory.createStringLiteral(amdDependency.path));
|
|
@@ -86673,7 +86919,7 @@ var ts;
|
|
|
86673
86919
|
if (includeNonAmdDependencies && importAliasName) {
|
|
86674
86920
|
ts.setEmitFlags(importAliasName, 4);
|
|
86675
86921
|
aliasedModuleNames.push(externalModuleName);
|
|
86676
|
-
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined,
|
|
86922
|
+
importAliasNames.push(factory.createParameterDeclaration(undefined, undefined, importAliasName));
|
|
86677
86923
|
}
|
|
86678
86924
|
else {
|
|
86679
86925
|
unaliasedModuleNames.push(externalModuleName);
|
|
@@ -86927,8 +87173,8 @@ var ts;
|
|
|
86927
87173
|
var resolve = factory.createUniqueName("resolve");
|
|
86928
87174
|
var reject = factory.createUniqueName("reject");
|
|
86929
87175
|
var parameters = [
|
|
86930
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
86931
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87176
|
+
factory.createParameterDeclaration(undefined, undefined, resolve),
|
|
87177
|
+
factory.createParameterDeclaration(undefined, undefined, reject)
|
|
86932
87178
|
];
|
|
86933
87179
|
var body = factory.createBlock([
|
|
86934
87180
|
factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("require"), undefined, [factory.createArrayLiteralExpression([arg || factory.createOmittedExpression()]), resolve, reject]))
|
|
@@ -87115,7 +87361,7 @@ var ts;
|
|
|
87115
87361
|
function visitFunctionDeclaration(node) {
|
|
87116
87362
|
var statements;
|
|
87117
87363
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87118
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(
|
|
87364
|
+
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
87365
|
}
|
|
87120
87366
|
else {
|
|
87121
87367
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87132,7 +87378,7 @@ var ts;
|
|
|
87132
87378
|
function visitClassDeclaration(node) {
|
|
87133
87379
|
var statements;
|
|
87134
87380
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87135
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(
|
|
87381
|
+
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
87382
|
}
|
|
87137
87383
|
else {
|
|
87138
87384
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87545,8 +87791,8 @@ var ts;
|
|
|
87545
87791
|
var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports);
|
|
87546
87792
|
var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups);
|
|
87547
87793
|
var moduleBodyFunction = factory.createFunctionExpression(undefined, undefined, undefined, undefined, [
|
|
87548
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87549
|
-
factory.createParameterDeclaration(undefined, undefined,
|
|
87794
|
+
factory.createParameterDeclaration(undefined, undefined, exportFunction),
|
|
87795
|
+
factory.createParameterDeclaration(undefined, undefined, contextObject)
|
|
87550
87796
|
], undefined, moduleBodyBlock);
|
|
87551
87797
|
var moduleName = ts.tryGetModuleNameFromFile(factory, node, host, compilerOptions);
|
|
87552
87798
|
var dependencies = factory.createArrayLiteralExpression(ts.map(dependencyGroups, function (dependencyGroup) { return dependencyGroup.name; }));
|
|
@@ -87662,7 +87908,7 @@ var ts;
|
|
|
87662
87908
|
if (localNames) {
|
|
87663
87909
|
condition = factory.createLogicalAnd(condition, factory.createLogicalNot(factory.createCallExpression(factory.createPropertyAccessExpression(localNames, "hasOwnProperty"), undefined, [n])));
|
|
87664
87910
|
}
|
|
87665
|
-
return factory.createFunctionDeclaration(undefined, undefined,
|
|
87911
|
+
return factory.createFunctionDeclaration(undefined, undefined, exportStarFunction, undefined, [factory.createParameterDeclaration(undefined, undefined, m)], undefined, factory.createBlock([
|
|
87666
87912
|
factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
87667
87913
|
factory.createVariableDeclaration(exports, undefined, undefined, factory.createObjectLiteralExpression([]))
|
|
87668
87914
|
])),
|
|
@@ -87717,7 +87963,7 @@ var ts;
|
|
|
87717
87963
|
break;
|
|
87718
87964
|
}
|
|
87719
87965
|
}
|
|
87720
|
-
setters.push(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined,
|
|
87966
|
+
setters.push(factory.createFunctionExpression(undefined, undefined, undefined, undefined, [factory.createParameterDeclaration(undefined, undefined, parameterName)], undefined, factory.createBlock(statements, true)));
|
|
87721
87967
|
}
|
|
87722
87968
|
return factory.createArrayLiteralExpression(setters, true);
|
|
87723
87969
|
}
|
|
@@ -87782,7 +88028,7 @@ var ts;
|
|
|
87782
88028
|
}
|
|
87783
88029
|
function visitFunctionDeclaration(node) {
|
|
87784
88030
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
87785
|
-
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node,
|
|
88031
|
+
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
88032
|
}
|
|
87787
88033
|
else {
|
|
87788
88034
|
hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, visitor, context));
|
|
@@ -87800,7 +88046,7 @@ var ts;
|
|
|
87800
88046
|
var statements;
|
|
87801
88047
|
var name = factory.getLocalName(node);
|
|
87802
88048
|
hoistVariableDeclaration(name);
|
|
87803
|
-
statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.
|
|
88049
|
+
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
88050
|
if (hasAssociatedEndOfDeclarationMarker(node)) {
|
|
87805
88051
|
var id = ts.getOriginalNodeId(node);
|
|
87806
88052
|
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
|
|
@@ -88485,7 +88731,7 @@ var ts;
|
|
|
88485
88731
|
}
|
|
88486
88732
|
if (!importRequireStatements) {
|
|
88487
88733
|
var createRequireName = factory.createUniqueName("_createRequire", 16 | 32);
|
|
88488
|
-
var importStatement = factory.createImportDeclaration(undefined,
|
|
88734
|
+
var importStatement = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([
|
|
88489
88735
|
factory.createImportSpecifier(false, factory.createIdentifier("createRequire"), createRequireName)
|
|
88490
88736
|
])), factory.createStringLiteral("module"));
|
|
88491
88737
|
var requireHelperName = factory.createUniqueName("__require", 16 | 32);
|
|
@@ -88511,7 +88757,7 @@ var ts;
|
|
|
88511
88757
|
}
|
|
88512
88758
|
function appendExportsOfImportEqualsDeclaration(statements, node) {
|
|
88513
88759
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
88514
|
-
statements = ts.append(statements, factory.createExportDeclaration(undefined,
|
|
88760
|
+
statements = ts.append(statements, factory.createExportDeclaration(undefined, node.isTypeOnly, factory.createNamedExports([factory.createExportSpecifier(false, undefined, ts.idText(node.name))])));
|
|
88515
88761
|
}
|
|
88516
88762
|
return statements;
|
|
88517
88763
|
}
|
|
@@ -88527,9 +88773,9 @@ var ts;
|
|
|
88527
88773
|
}
|
|
88528
88774
|
var oldIdentifier = node.exportClause.name;
|
|
88529
88775
|
var synthName = factory.getGeneratedNameForNode(oldIdentifier);
|
|
88530
|
-
var importDecl = factory.createImportDeclaration(undefined,
|
|
88776
|
+
var importDecl = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamespaceImport(synthName)), node.moduleSpecifier, node.assertClause);
|
|
88531
88777
|
ts.setOriginalNode(importDecl, node.exportClause);
|
|
88532
|
-
var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined,
|
|
88778
|
+
var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined, false, factory.createNamedExports([factory.createExportSpecifier(false, synthName, oldIdentifier)]));
|
|
88533
88779
|
ts.setOriginalNode(exportDecl, node);
|
|
88534
88780
|
return [importDecl, exportDecl];
|
|
88535
88781
|
}
|
|
@@ -89269,7 +89515,7 @@ var ts;
|
|
|
89269
89515
|
resultHasExternalModuleIndicator = false;
|
|
89270
89516
|
needsDeclare = false;
|
|
89271
89517
|
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
89272
|
-
var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([
|
|
89518
|
+
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
89519
|
return newFile;
|
|
89274
89520
|
}
|
|
89275
89521
|
needsDeclare = true;
|
|
@@ -89429,7 +89675,7 @@ var ts;
|
|
|
89429
89675
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
89430
89676
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p);
|
|
89431
89677
|
}
|
|
89432
|
-
var newParam = factory.updateParameterDeclaration(p,
|
|
89678
|
+
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
89679
|
if (!suppressNewDiagnosticContexts) {
|
|
89434
89680
|
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
89435
89681
|
}
|
|
@@ -89475,7 +89721,7 @@ var ts;
|
|
|
89475
89721
|
if (node.kind === 164
|
|
89476
89722
|
|| node.kind === 167
|
|
89477
89723
|
|| node.kind === 166) {
|
|
89478
|
-
if (!node.initializer)
|
|
89724
|
+
if (ts.isPropertySignature(node) || !node.initializer)
|
|
89479
89725
|
return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType));
|
|
89480
89726
|
return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker));
|
|
89481
89727
|
}
|
|
@@ -89557,7 +89803,7 @@ var ts;
|
|
|
89557
89803
|
}
|
|
89558
89804
|
}
|
|
89559
89805
|
if (!newValueParameter) {
|
|
89560
|
-
newValueParameter = factory.createParameterDeclaration(undefined, undefined,
|
|
89806
|
+
newValueParameter = factory.createParameterDeclaration(undefined, undefined, "value");
|
|
89561
89807
|
}
|
|
89562
89808
|
newParams = ts.append(newParams, newValueParameter);
|
|
89563
89809
|
}
|
|
@@ -89612,7 +89858,7 @@ var ts;
|
|
|
89612
89858
|
return;
|
|
89613
89859
|
if (decl.moduleReference.kind === 277) {
|
|
89614
89860
|
var specifier = ts.getExternalModuleImportEqualsDeclarationExpression(decl);
|
|
89615
|
-
return factory.updateImportEqualsDeclaration(decl,
|
|
89861
|
+
return factory.updateImportEqualsDeclaration(decl, decl.modifiers, decl.isTypeOnly, decl.name, factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)));
|
|
89616
89862
|
}
|
|
89617
89863
|
else {
|
|
89618
89864
|
var oldDiag = getSymbolAccessibilityDiagnostic;
|
|
@@ -89624,22 +89870,22 @@ var ts;
|
|
|
89624
89870
|
}
|
|
89625
89871
|
function transformImportDeclaration(decl) {
|
|
89626
89872
|
if (!decl.importClause) {
|
|
89627
|
-
return factory.updateImportDeclaration(decl,
|
|
89873
|
+
return factory.updateImportDeclaration(decl, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89628
89874
|
}
|
|
89629
89875
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
89630
89876
|
if (!decl.importClause.namedBindings) {
|
|
89631
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl,
|
|
89877
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89632
89878
|
}
|
|
89633
89879
|
if (decl.importClause.namedBindings.kind === 268) {
|
|
89634
89880
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
89635
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl,
|
|
89881
|
+
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
89882
|
}
|
|
89637
89883
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
89638
89884
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
89639
|
-
return factory.updateImportDeclaration(decl,
|
|
89885
|
+
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
89886
|
}
|
|
89641
89887
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
89642
|
-
return factory.updateImportDeclaration(decl,
|
|
89888
|
+
return factory.updateImportDeclaration(decl, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
89643
89889
|
}
|
|
89644
89890
|
}
|
|
89645
89891
|
function getResolutionModeOverrideForClauseInNightly(assertClause) {
|
|
@@ -89712,7 +89958,7 @@ var ts;
|
|
|
89712
89958
|
if (ts.hasEffectiveModifier(input, 8)) {
|
|
89713
89959
|
if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input)
|
|
89714
89960
|
return;
|
|
89715
|
-
return cleanup(factory.createPropertyDeclaration(
|
|
89961
|
+
return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, undefined, undefined, undefined));
|
|
89716
89962
|
}
|
|
89717
89963
|
}
|
|
89718
89964
|
if (canProduceDiagnostic && !suppressNewDiagnosticContexts) {
|
|
@@ -89741,14 +89987,14 @@ var ts;
|
|
|
89741
89987
|
case 175:
|
|
89742
89988
|
return cleanup(factory.updateConstructSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
|
|
89743
89989
|
case 171: {
|
|
89744
|
-
var ctor = factory.createConstructorDeclaration(
|
|
89990
|
+
var ctor = factory.createConstructorDeclaration(ensureModifiers(input), updateParamsList(input, input.parameters, 0), undefined);
|
|
89745
89991
|
return cleanup(ctor);
|
|
89746
89992
|
}
|
|
89747
89993
|
case 169: {
|
|
89748
89994
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89749
89995
|
return cleanup(undefined);
|
|
89750
89996
|
}
|
|
89751
|
-
var sig = factory.createMethodDeclaration(
|
|
89997
|
+
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
89998
|
return cleanup(sig);
|
|
89753
89999
|
}
|
|
89754
90000
|
case 172: {
|
|
@@ -89756,19 +90002,19 @@ var ts;
|
|
|
89756
90002
|
return cleanup(undefined);
|
|
89757
90003
|
}
|
|
89758
90004
|
var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input));
|
|
89759
|
-
return cleanup(factory.updateGetAccessorDeclaration(input,
|
|
90005
|
+
return cleanup(factory.updateGetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), ensureType(input, accessorType), undefined));
|
|
89760
90006
|
}
|
|
89761
90007
|
case 173: {
|
|
89762
90008
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89763
90009
|
return cleanup(undefined);
|
|
89764
90010
|
}
|
|
89765
|
-
return cleanup(factory.updateSetAccessorDeclaration(input,
|
|
90011
|
+
return cleanup(factory.updateSetAccessorDeclaration(input, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), undefined));
|
|
89766
90012
|
}
|
|
89767
90013
|
case 167:
|
|
89768
90014
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89769
90015
|
return cleanup(undefined);
|
|
89770
90016
|
}
|
|
89771
|
-
return cleanup(factory.updatePropertyDeclaration(input,
|
|
90017
|
+
return cleanup(factory.updatePropertyDeclaration(input, ensureModifiers(input), input.name, input.questionToken, ensureType(input, input.type), ensureNoInitializer(input)));
|
|
89772
90018
|
case 166:
|
|
89773
90019
|
if (ts.isPrivateIdentifier(input.name)) {
|
|
89774
90020
|
return cleanup(undefined);
|
|
@@ -89784,7 +90030,7 @@ var ts;
|
|
|
89784
90030
|
return cleanup(factory.updateCallSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
|
|
89785
90031
|
}
|
|
89786
90032
|
case 176: {
|
|
89787
|
-
return cleanup(factory.updateIndexSignature(input,
|
|
90033
|
+
return cleanup(factory.updateIndexSignature(input, ensureModifiers(input), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree) || factory.createKeywordTypeNode(130)));
|
|
89788
90034
|
}
|
|
89789
90035
|
case 254: {
|
|
89790
90036
|
if (ts.isBindingPattern(input.name)) {
|
|
@@ -89862,7 +90108,7 @@ var ts;
|
|
|
89862
90108
|
resultHasExternalModuleIndicator = true;
|
|
89863
90109
|
}
|
|
89864
90110
|
resultHasScopeMarker = true;
|
|
89865
|
-
return factory.updateExportDeclaration(input,
|
|
90111
|
+
return factory.updateExportDeclaration(input, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
|
|
89866
90112
|
}
|
|
89867
90113
|
case 271: {
|
|
89868
90114
|
if (ts.isSourceFile(input.parent)) {
|
|
@@ -89884,7 +90130,7 @@ var ts;
|
|
|
89884
90130
|
var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135)] : [], factory.createVariableDeclarationList([varDecl], 2));
|
|
89885
90131
|
preserveJsDoc(statement, input);
|
|
89886
90132
|
ts.removeAllComments(input);
|
|
89887
|
-
return [statement, factory.updateExportAssignment(input, input.
|
|
90133
|
+
return [statement, factory.updateExportAssignment(input, input.modifiers, newId)];
|
|
89888
90134
|
}
|
|
89889
90135
|
}
|
|
89890
90136
|
}
|
|
@@ -89896,7 +90142,7 @@ var ts;
|
|
|
89896
90142
|
if (ts.isImportEqualsDeclaration(statement) || ts.hasEffectiveModifier(statement, 512) || !ts.canHaveModifiers(statement)) {
|
|
89897
90143
|
return statement;
|
|
89898
90144
|
}
|
|
89899
|
-
var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (
|
|
90145
|
+
var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (257023 ^ 1));
|
|
89900
90146
|
return factory.updateModifiers(statement, modifiers);
|
|
89901
90147
|
}
|
|
89902
90148
|
function transformTopLevelDeclaration(input) {
|
|
@@ -89931,15 +90177,15 @@ var ts;
|
|
|
89931
90177
|
var previousNeedsDeclare = needsDeclare;
|
|
89932
90178
|
switch (input.kind) {
|
|
89933
90179
|
case 259:
|
|
89934
|
-
return cleanup(factory.updateTypeAliasDeclaration(input,
|
|
90180
|
+
return cleanup(factory.updateTypeAliasDeclaration(input, ensureModifiers(input), input.name, ts.visitNodes(input.typeParameters, visitDeclarationSubtree, ts.isTypeParameterDeclaration), ts.visitNode(input.type, visitDeclarationSubtree, ts.isTypeNode)));
|
|
89935
90181
|
case 258: {
|
|
89936
|
-
return cleanup(factory.updateInterfaceDeclaration(input,
|
|
90182
|
+
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
|
|
89937
90183
|
}
|
|
89938
90184
|
case 256: {
|
|
89939
|
-
var clean = cleanup(factory.updateFunctionDeclaration(input,
|
|
90185
|
+
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
90186
|
if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
|
|
89941
90187
|
var props = resolver.getPropertiesOfContainerFunction(input);
|
|
89942
|
-
var fakespace_1 = ts.parseNodeFactory.createModuleDeclaration(undefined,
|
|
90188
|
+
var fakespace_1 = ts.parseNodeFactory.createModuleDeclaration(undefined, clean.name || factory.createIdentifier("_default"), factory.createModuleBlock([]), 16);
|
|
89943
90189
|
ts.setParent(fakespace_1, enclosingDeclaration);
|
|
89944
90190
|
fakespace_1.locals = ts.createSymbolTable(props);
|
|
89945
90191
|
fakespace_1.symbol = props[0].parent;
|
|
@@ -89964,19 +90210,19 @@ var ts;
|
|
|
89964
90210
|
declarations = ts.mapDefined(declarations, function (declaration) { return factory.updateModifiers(declaration, 0); });
|
|
89965
90211
|
}
|
|
89966
90212
|
else {
|
|
89967
|
-
declarations.push(factory.createExportDeclaration(undefined,
|
|
90213
|
+
declarations.push(factory.createExportDeclaration(undefined, false, factory.createNamedExports(ts.map(exportMappings_1, function (_a) {
|
|
89968
90214
|
var gen = _a[0], exp = _a[1];
|
|
89969
90215
|
return factory.createExportSpecifier(false, gen, exp);
|
|
89970
90216
|
}))));
|
|
89971
90217
|
}
|
|
89972
|
-
var namespaceDecl = factory.createModuleDeclaration(
|
|
90218
|
+
var namespaceDecl = factory.createModuleDeclaration(ensureModifiers(input), input.name, factory.createModuleBlock(declarations), 16);
|
|
89973
90219
|
if (!ts.hasEffectiveModifier(clean, 512)) {
|
|
89974
90220
|
return [clean, namespaceDecl];
|
|
89975
90221
|
}
|
|
89976
90222
|
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,
|
|
90223
|
+
var cleanDeclaration = factory.updateFunctionDeclaration(clean, modifiers, undefined, clean.name, clean.typeParameters, clean.parameters, clean.type, undefined);
|
|
90224
|
+
var namespaceDeclaration = factory.updateModuleDeclaration(namespaceDecl, modifiers, namespaceDecl.name, namespaceDecl.body);
|
|
90225
|
+
var exportDefaultDeclaration = factory.createExportAssignment(undefined, false, namespaceDecl.name);
|
|
89980
90226
|
if (ts.isSourceFile(input.parent)) {
|
|
89981
90227
|
resultHasExternalModuleIndicator = true;
|
|
89982
90228
|
}
|
|
@@ -90013,7 +90259,7 @@ var ts;
|
|
|
90013
90259
|
needsScopeFixMarker = oldNeedsScopeFix;
|
|
90014
90260
|
resultHasScopeMarker = oldHasScopeFix;
|
|
90015
90261
|
var mods = ensureModifiers(input);
|
|
90016
|
-
return cleanup(factory.updateModuleDeclaration(input,
|
|
90262
|
+
return cleanup(factory.updateModuleDeclaration(input, mods, ts.isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, body));
|
|
90017
90263
|
}
|
|
90018
90264
|
else {
|
|
90019
90265
|
needsDeclare = previousNeedsDeclare;
|
|
@@ -90023,7 +90269,7 @@ var ts;
|
|
|
90023
90269
|
var id = ts.getOriginalNodeId(inner);
|
|
90024
90270
|
var body = lateStatementReplacementMap.get(id);
|
|
90025
90271
|
lateStatementReplacementMap.delete(id);
|
|
90026
|
-
return cleanup(factory.updateModuleDeclaration(input,
|
|
90272
|
+
return cleanup(factory.updateModuleDeclaration(input, mods, input.name, body));
|
|
90027
90273
|
}
|
|
90028
90274
|
}
|
|
90029
90275
|
case 257: {
|
|
@@ -90040,7 +90286,7 @@ var ts;
|
|
|
90040
90286
|
return;
|
|
90041
90287
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(param);
|
|
90042
90288
|
if (param.name.kind === 79) {
|
|
90043
|
-
return preserveJsDoc(factory.createPropertyDeclaration(
|
|
90289
|
+
return preserveJsDoc(factory.createPropertyDeclaration(ensureModifiers(param), param.name, param.questionToken, ensureType(param, param.type), ensureNoInitializer(param)), param);
|
|
90044
90290
|
}
|
|
90045
90291
|
else {
|
|
90046
90292
|
return walkBindingPattern(param.name);
|
|
@@ -90055,7 +90301,7 @@ var ts;
|
|
|
90055
90301
|
elems = ts.concatenate(elems, walkBindingPattern(elem.name));
|
|
90056
90302
|
}
|
|
90057
90303
|
elems = elems || [];
|
|
90058
|
-
elems.push(factory.createPropertyDeclaration(
|
|
90304
|
+
elems.push(factory.createPropertyDeclaration(ensureModifiers(param), elem.name, undefined, ensureType(elem, undefined), undefined));
|
|
90059
90305
|
}
|
|
90060
90306
|
return elems;
|
|
90061
90307
|
}
|
|
@@ -90064,7 +90310,7 @@ var ts;
|
|
|
90064
90310
|
}
|
|
90065
90311
|
var hasPrivateIdentifier = ts.some(input.members, function (member) { return !!member.name && ts.isPrivateIdentifier(member.name); });
|
|
90066
90312
|
var privateIdentifier = hasPrivateIdentifier ? [
|
|
90067
|
-
factory.createPropertyDeclaration(undefined,
|
|
90313
|
+
factory.createPropertyDeclaration(undefined, factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)
|
|
90068
90314
|
] : undefined;
|
|
90069
90315
|
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
90070
90316
|
var members = factory.createNodeArray(memberNodes);
|
|
@@ -90089,18 +90335,18 @@ var ts;
|
|
|
90089
90335
|
}
|
|
90090
90336
|
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
90337
|
}));
|
|
90092
|
-
return [statement, cleanup(factory.updateClassDeclaration(input,
|
|
90338
|
+
return [statement, cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members))];
|
|
90093
90339
|
}
|
|
90094
90340
|
else {
|
|
90095
90341
|
var heritageClauses = transformHeritageClauses(input.heritageClauses);
|
|
90096
|
-
return cleanup(factory.updateClassDeclaration(input,
|
|
90342
|
+
return cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members));
|
|
90097
90343
|
}
|
|
90098
90344
|
}
|
|
90099
90345
|
case 237: {
|
|
90100
90346
|
return cleanup(transformVariableStatement(input));
|
|
90101
90347
|
}
|
|
90102
90348
|
case 260: {
|
|
90103
|
-
return cleanup(factory.updateEnumDeclaration(input,
|
|
90349
|
+
return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(ts.mapDefined(input.members, function (m) {
|
|
90104
90350
|
if (shouldStripInternal(m))
|
|
90105
90351
|
return;
|
|
90106
90352
|
var constValue = resolver.getConstantValue(m);
|
|
@@ -90182,12 +90428,12 @@ var ts;
|
|
|
90182
90428
|
var currentFlags = ts.getEffectiveModifierFlags(node);
|
|
90183
90429
|
var newFlags = ensureModifierFlags(node);
|
|
90184
90430
|
if (currentFlags === newFlags) {
|
|
90185
|
-
return node.modifiers;
|
|
90431
|
+
return ts.visitArray(node.modifiers, function (n) { return ts.tryCast(n, ts.isModifier); }, ts.isModifier);
|
|
90186
90432
|
}
|
|
90187
90433
|
return factory.createModifiersFromModifierFlags(newFlags);
|
|
90188
90434
|
}
|
|
90189
90435
|
function ensureModifierFlags(node) {
|
|
90190
|
-
var mask =
|
|
90436
|
+
var mask = 257023 ^ (4 | 256 | 16384);
|
|
90191
90437
|
var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
|
|
90192
90438
|
var parentIsFile = node.parent.kind === 305;
|
|
90193
90439
|
if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
|
|
@@ -90225,7 +90471,7 @@ var ts;
|
|
|
90225
90471
|
return ts.factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
|
|
90226
90472
|
}
|
|
90227
90473
|
function maskModifierFlags(node, modifierMask, modifierAdditions) {
|
|
90228
|
-
if (modifierMask === void 0) { modifierMask =
|
|
90474
|
+
if (modifierMask === void 0) { modifierMask = 257023 ^ 4; }
|
|
90229
90475
|
if (modifierAdditions === void 0) { modifierAdditions = 0; }
|
|
90230
90476
|
var flags = (ts.getEffectiveModifierFlags(node) & modifierMask) | modifierAdditions;
|
|
90231
90477
|
if (flags & 512 && !(flags & 1)) {
|
|
@@ -92418,8 +92664,7 @@ var ts;
|
|
|
92418
92664
|
}
|
|
92419
92665
|
}
|
|
92420
92666
|
function emitParameter(node) {
|
|
92421
|
-
|
|
92422
|
-
emitModifiers(node, node.modifiers);
|
|
92667
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92423
92668
|
emit(node.dotDotDotToken);
|
|
92424
92669
|
emitNodeWithWriter(node.name, writeParameter);
|
|
92425
92670
|
emit(node.questionToken);
|
|
@@ -92429,14 +92674,13 @@ var ts;
|
|
|
92429
92674
|
else {
|
|
92430
92675
|
emitTypeAnnotation(node.type);
|
|
92431
92676
|
}
|
|
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.
|
|
92677
|
+
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
92678
|
}
|
|
92434
92679
|
function emitDecorator(decorator) {
|
|
92435
92680
|
writePunctuation("@");
|
|
92436
92681
|
emitExpression(decorator.expression, parenthesizer.parenthesizeLeftSideOfAccess);
|
|
92437
92682
|
}
|
|
92438
92683
|
function emitPropertySignature(node) {
|
|
92439
|
-
emitDecorators(node, node.decorators);
|
|
92440
92684
|
emitModifiers(node, node.modifiers);
|
|
92441
92685
|
emitNodeWithWriter(node.name, writeProperty);
|
|
92442
92686
|
emit(node.questionToken);
|
|
@@ -92444,8 +92688,7 @@ var ts;
|
|
|
92444
92688
|
writeTrailingSemicolon();
|
|
92445
92689
|
}
|
|
92446
92690
|
function emitPropertyDeclaration(node) {
|
|
92447
|
-
|
|
92448
|
-
emitModifiers(node, node.modifiers);
|
|
92691
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92449
92692
|
emit(node.name);
|
|
92450
92693
|
emit(node.questionToken);
|
|
92451
92694
|
emit(node.exclamationToken);
|
|
@@ -92455,7 +92698,6 @@ var ts;
|
|
|
92455
92698
|
}
|
|
92456
92699
|
function emitMethodSignature(node) {
|
|
92457
92700
|
pushNameGenerationScope(node);
|
|
92458
|
-
emitDecorators(node, node.decorators);
|
|
92459
92701
|
emitModifiers(node, node.modifiers);
|
|
92460
92702
|
emit(node.name);
|
|
92461
92703
|
emit(node.questionToken);
|
|
@@ -92466,16 +92708,13 @@ var ts;
|
|
|
92466
92708
|
popNameGenerationScope(node);
|
|
92467
92709
|
}
|
|
92468
92710
|
function emitMethodDeclaration(node) {
|
|
92469
|
-
|
|
92470
|
-
emitModifiers(node, node.modifiers);
|
|
92711
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92471
92712
|
emit(node.asteriskToken);
|
|
92472
92713
|
emit(node.name);
|
|
92473
92714
|
emit(node.questionToken);
|
|
92474
92715
|
emitSignatureAndBody(node, emitSignatureHead);
|
|
92475
92716
|
}
|
|
92476
92717
|
function emitClassStaticBlockDeclaration(node) {
|
|
92477
|
-
emitDecorators(node, node.decorators);
|
|
92478
|
-
emitModifiers(node, node.modifiers);
|
|
92479
92718
|
writeKeyword("static");
|
|
92480
92719
|
emitBlockFunctionBody(node.body);
|
|
92481
92720
|
}
|
|
@@ -92485,8 +92724,7 @@ var ts;
|
|
|
92485
92724
|
emitSignatureAndBody(node, emitSignatureHead);
|
|
92486
92725
|
}
|
|
92487
92726
|
function emitAccessorDeclaration(node) {
|
|
92488
|
-
|
|
92489
|
-
emitModifiers(node, node.modifiers);
|
|
92727
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
92490
92728
|
writeKeyword(node.kind === 172 ? "get" : "set");
|
|
92491
92729
|
writeSpace();
|
|
92492
92730
|
emit(node.name);
|
|
@@ -92494,8 +92732,6 @@ var ts;
|
|
|
92494
92732
|
}
|
|
92495
92733
|
function emitCallSignature(node) {
|
|
92496
92734
|
pushNameGenerationScope(node);
|
|
92497
|
-
emitDecorators(node, node.decorators);
|
|
92498
|
-
emitModifiers(node, node.modifiers);
|
|
92499
92735
|
emitTypeParameters(node, node.typeParameters);
|
|
92500
92736
|
emitParameters(node, node.parameters);
|
|
92501
92737
|
emitTypeAnnotation(node.type);
|
|
@@ -92504,8 +92740,6 @@ var ts;
|
|
|
92504
92740
|
}
|
|
92505
92741
|
function emitConstructSignature(node) {
|
|
92506
92742
|
pushNameGenerationScope(node);
|
|
92507
|
-
emitDecorators(node, node.decorators);
|
|
92508
|
-
emitModifiers(node, node.modifiers);
|
|
92509
92743
|
writeKeyword("new");
|
|
92510
92744
|
writeSpace();
|
|
92511
92745
|
emitTypeParameters(node, node.typeParameters);
|
|
@@ -92515,7 +92749,6 @@ var ts;
|
|
|
92515
92749
|
popNameGenerationScope(node);
|
|
92516
92750
|
}
|
|
92517
92751
|
function emitIndexSignature(node) {
|
|
92518
|
-
emitDecorators(node, node.decorators);
|
|
92519
92752
|
emitModifiers(node, node.modifiers);
|
|
92520
92753
|
emitParametersForIndexSignature(node, node.parameters);
|
|
92521
92754
|
emitTypeAnnotation(node.type);
|
|
@@ -92892,7 +93125,6 @@ var ts;
|
|
|
92892
93125
|
emitFunctionDeclarationOrExpression(node);
|
|
92893
93126
|
}
|
|
92894
93127
|
function emitArrowFunction(node) {
|
|
92895
|
-
emitDecorators(node, node.decorators);
|
|
92896
93128
|
emitModifiers(node, node.modifiers);
|
|
92897
93129
|
emitSignatureAndBody(node, emitArrowFunctionHead);
|
|
92898
93130
|
}
|
|
@@ -93343,7 +93575,6 @@ var ts;
|
|
|
93343
93575
|
emitFunctionDeclarationOrExpression(node);
|
|
93344
93576
|
}
|
|
93345
93577
|
function emitFunctionDeclarationOrExpression(node) {
|
|
93346
|
-
emitDecorators(node, node.decorators);
|
|
93347
93578
|
emitModifiers(node, node.modifiers);
|
|
93348
93579
|
writeKeyword("function");
|
|
93349
93580
|
emit(node.asteriskToken);
|
|
@@ -93395,8 +93626,8 @@ var ts;
|
|
|
93395
93626
|
if (!ts.nodeIsSynthesized(body) && currentSourceFile && !ts.rangeIsOnSingleLine(body, currentSourceFile)) {
|
|
93396
93627
|
return false;
|
|
93397
93628
|
}
|
|
93398
|
-
if (getLeadingLineTerminatorCount(body, body.statements, 2)
|
|
93399
|
-
|| getClosingLineTerminatorCount(body, body.statements, 2)) {
|
|
93629
|
+
if (getLeadingLineTerminatorCount(body, ts.firstOrUndefined(body.statements), 2)
|
|
93630
|
+
|| getClosingLineTerminatorCount(body, ts.lastOrUndefined(body.statements), 2, body.statements)) {
|
|
93400
93631
|
return false;
|
|
93401
93632
|
}
|
|
93402
93633
|
var previousStatement;
|
|
@@ -93443,8 +93674,7 @@ var ts;
|
|
|
93443
93674
|
}
|
|
93444
93675
|
function emitClassDeclarationOrExpression(node) {
|
|
93445
93676
|
ts.forEach(node.members, generateMemberNames);
|
|
93446
|
-
|
|
93447
|
-
emitModifiers(node, node.modifiers);
|
|
93677
|
+
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
93448
93678
|
writeKeyword("class");
|
|
93449
93679
|
if (node.name) {
|
|
93450
93680
|
writeSpace();
|
|
@@ -93465,7 +93695,6 @@ var ts;
|
|
|
93465
93695
|
}
|
|
93466
93696
|
}
|
|
93467
93697
|
function emitInterfaceDeclaration(node) {
|
|
93468
|
-
emitDecorators(node, node.decorators);
|
|
93469
93698
|
emitModifiers(node, node.modifiers);
|
|
93470
93699
|
writeKeyword("interface");
|
|
93471
93700
|
writeSpace();
|
|
@@ -93478,7 +93707,6 @@ var ts;
|
|
|
93478
93707
|
writePunctuation("}");
|
|
93479
93708
|
}
|
|
93480
93709
|
function emitTypeAliasDeclaration(node) {
|
|
93481
|
-
emitDecorators(node, node.decorators);
|
|
93482
93710
|
emitModifiers(node, node.modifiers);
|
|
93483
93711
|
writeKeyword("type");
|
|
93484
93712
|
writeSpace();
|
|
@@ -94237,12 +94465,47 @@ var ts;
|
|
|
94237
94465
|
emit(node);
|
|
94238
94466
|
write = savedWrite;
|
|
94239
94467
|
}
|
|
94240
|
-
function
|
|
94241
|
-
if (modifiers
|
|
94242
|
-
|
|
94243
|
-
|
|
94468
|
+
function emitDecoratorsAndModifiers(node, modifiers) {
|
|
94469
|
+
if (modifiers === null || modifiers === void 0 ? void 0 : modifiers.length) {
|
|
94470
|
+
if (ts.every(modifiers, ts.isModifier)) {
|
|
94471
|
+
return emitModifiers(node, modifiers);
|
|
94472
|
+
}
|
|
94473
|
+
if (ts.every(modifiers, ts.isDecorator)) {
|
|
94474
|
+
return emitDecorators(node, modifiers);
|
|
94475
|
+
}
|
|
94476
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(modifiers);
|
|
94477
|
+
var lastMode = void 0;
|
|
94478
|
+
var mode = void 0;
|
|
94479
|
+
var start = 0;
|
|
94480
|
+
var pos = 0;
|
|
94481
|
+
while (start < modifiers.length) {
|
|
94482
|
+
while (pos < modifiers.length) {
|
|
94483
|
+
var modifier = modifiers[pos];
|
|
94484
|
+
mode = ts.isDecorator(modifier) ? "decorators" : "modifiers";
|
|
94485
|
+
if (lastMode === undefined) {
|
|
94486
|
+
lastMode = mode;
|
|
94487
|
+
}
|
|
94488
|
+
else if (mode !== lastMode) {
|
|
94489
|
+
break;
|
|
94490
|
+
}
|
|
94491
|
+
pos++;
|
|
94492
|
+
}
|
|
94493
|
+
var textRange = { pos: -1, end: -1 };
|
|
94494
|
+
if (start === 0)
|
|
94495
|
+
textRange.pos = modifiers.pos;
|
|
94496
|
+
if (pos === modifiers.length - 1)
|
|
94497
|
+
textRange.end = modifiers.end;
|
|
94498
|
+
emitNodeListItems(emit, node, modifiers, lastMode === "modifiers" ? 2359808 : 2146305, undefined, start, pos - start, false, textRange);
|
|
94499
|
+
start = pos;
|
|
94500
|
+
lastMode = mode;
|
|
94501
|
+
pos++;
|
|
94502
|
+
}
|
|
94503
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(modifiers);
|
|
94244
94504
|
}
|
|
94245
94505
|
}
|
|
94506
|
+
function emitModifiers(node, modifiers) {
|
|
94507
|
+
emitList(node, modifiers, 2359808);
|
|
94508
|
+
}
|
|
94246
94509
|
function emitTypeAnnotation(node) {
|
|
94247
94510
|
if (node) {
|
|
94248
94511
|
writePunctuation(":");
|
|
@@ -94320,10 +94583,8 @@ var ts;
|
|
|
94320
94583
|
&& parameter.pos === parentNode.pos
|
|
94321
94584
|
&& ts.isArrowFunction(parentNode)
|
|
94322
94585
|
&& !parentNode.type
|
|
94323
|
-
&& !ts.some(parentNode.decorators)
|
|
94324
94586
|
&& !ts.some(parentNode.modifiers)
|
|
94325
94587
|
&& !ts.some(parentNode.typeParameters)
|
|
94326
|
-
&& !ts.some(parameter.decorators)
|
|
94327
94588
|
&& !ts.some(parameter.modifiers)
|
|
94328
94589
|
&& !parameter.dotDotDotToken
|
|
94329
94590
|
&& !parameter.questionToken
|
|
@@ -94379,12 +94640,8 @@ var ts;
|
|
|
94379
94640
|
}
|
|
94380
94641
|
var isEmpty = children === undefined || start >= children.length || count === 0;
|
|
94381
94642
|
if (isEmpty && format & 32768) {
|
|
94382
|
-
|
|
94383
|
-
|
|
94384
|
-
}
|
|
94385
|
-
if (onAfterEmitNodeArray) {
|
|
94386
|
-
onAfterEmitNodeArray(children);
|
|
94387
|
-
}
|
|
94643
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(children);
|
|
94644
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(children);
|
|
94388
94645
|
return;
|
|
94389
94646
|
}
|
|
94390
94647
|
if (format & 15360) {
|
|
@@ -94393,9 +94650,7 @@ var ts;
|
|
|
94393
94650
|
emitTrailingCommentsOfPosition(children.pos, true);
|
|
94394
94651
|
}
|
|
94395
94652
|
}
|
|
94396
|
-
|
|
94397
|
-
onBeforeEmitNodeArray(children);
|
|
94398
|
-
}
|
|
94653
|
+
onBeforeEmitNodeArray === null || onBeforeEmitNodeArray === void 0 ? void 0 : onBeforeEmitNodeArray(children);
|
|
94399
94654
|
if (isEmpty) {
|
|
94400
94655
|
if (format & 1 && !(preserveSourceNewlines && (!parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile)))) {
|
|
94401
94656
|
writeLine();
|
|
@@ -94405,99 +94660,99 @@ var ts;
|
|
|
94405
94660
|
}
|
|
94406
94661
|
}
|
|
94407
94662
|
else {
|
|
94408
|
-
|
|
94409
|
-
|
|
94410
|
-
|
|
94411
|
-
|
|
94412
|
-
if (
|
|
94413
|
-
|
|
94414
|
-
shouldEmitInterveningComments = false;
|
|
94415
|
-
}
|
|
94416
|
-
else if (format & 256) {
|
|
94417
|
-
writeSpace();
|
|
94663
|
+
emitNodeListItems(emit, parentNode, children, format, parenthesizerRule, start, count, children.hasTrailingComma, children);
|
|
94664
|
+
}
|
|
94665
|
+
onAfterEmitNodeArray === null || onAfterEmitNodeArray === void 0 ? void 0 : onAfterEmitNodeArray(children);
|
|
94666
|
+
if (format & 15360) {
|
|
94667
|
+
if (isEmpty && children) {
|
|
94668
|
+
emitLeadingCommentsOfPosition(children.end);
|
|
94418
94669
|
}
|
|
94419
|
-
|
|
94420
|
-
|
|
94670
|
+
writePunctuation(getClosingBracket(format));
|
|
94671
|
+
}
|
|
94672
|
+
}
|
|
94673
|
+
function emitNodeListItems(emit, parentNode, children, format, parenthesizerRule, start, count, hasTrailingComma, childrenTextRange) {
|
|
94674
|
+
var mayEmitInterveningComments = (format & 262144) === 0;
|
|
94675
|
+
var shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
94676
|
+
var leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children[start], format);
|
|
94677
|
+
if (leadingLineTerminatorCount) {
|
|
94678
|
+
writeLine(leadingLineTerminatorCount);
|
|
94679
|
+
shouldEmitInterveningComments = false;
|
|
94680
|
+
}
|
|
94681
|
+
else if (format & 256) {
|
|
94682
|
+
writeSpace();
|
|
94683
|
+
}
|
|
94684
|
+
if (format & 128) {
|
|
94685
|
+
increaseIndent();
|
|
94686
|
+
}
|
|
94687
|
+
var emitListItem = getEmitListItem(emit, parenthesizerRule);
|
|
94688
|
+
var previousSibling;
|
|
94689
|
+
var previousSourceFileTextKind;
|
|
94690
|
+
var shouldDecreaseIndentAfterEmit = false;
|
|
94691
|
+
for (var i = 0; i < count; i++) {
|
|
94692
|
+
var child = children[start + i];
|
|
94693
|
+
if (format & 32) {
|
|
94694
|
+
writeLine();
|
|
94695
|
+
writeDelimiter(format);
|
|
94421
94696
|
}
|
|
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);
|
|
94697
|
+
else if (previousSibling) {
|
|
94698
|
+
if (format & 60 && previousSibling.end !== (parentNode ? parentNode.end : -1)) {
|
|
94699
|
+
emitLeadingCommentsOfPosition(previousSibling.end);
|
|
94455
94700
|
}
|
|
94456
|
-
|
|
94457
|
-
|
|
94701
|
+
writeDelimiter(format);
|
|
94702
|
+
recordBundleFileInternalSectionEnd(previousSourceFileTextKind);
|
|
94703
|
+
var separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format);
|
|
94704
|
+
if (separatingLineTerminatorCount > 0) {
|
|
94705
|
+
if ((format & (3 | 128)) === 0) {
|
|
94706
|
+
increaseIndent();
|
|
94707
|
+
shouldDecreaseIndentAfterEmit = true;
|
|
94708
|
+
}
|
|
94709
|
+
writeLine(separatingLineTerminatorCount);
|
|
94710
|
+
shouldEmitInterveningComments = false;
|
|
94458
94711
|
}
|
|
94459
|
-
|
|
94460
|
-
|
|
94461
|
-
if (shouldDecreaseIndentAfterEmit) {
|
|
94462
|
-
decreaseIndent();
|
|
94463
|
-
shouldDecreaseIndentAfterEmit = false;
|
|
94712
|
+
else if (previousSibling && format & 512) {
|
|
94713
|
+
writeSpace();
|
|
94464
94714
|
}
|
|
94465
|
-
previousSibling = child;
|
|
94466
94715
|
}
|
|
94467
|
-
|
|
94468
|
-
|
|
94469
|
-
|
|
94470
|
-
|
|
94471
|
-
if (previousSibling && !skipTrailingComments) {
|
|
94472
|
-
emitTokenWithComment(27, previousSibling.end, writePunctuation, previousSibling);
|
|
94473
|
-
}
|
|
94474
|
-
else {
|
|
94475
|
-
writePunctuation(",");
|
|
94476
|
-
}
|
|
94716
|
+
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
94717
|
+
if (shouldEmitInterveningComments) {
|
|
94718
|
+
var commentRange = ts.getCommentRange(child);
|
|
94719
|
+
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
94477
94720
|
}
|
|
94478
|
-
|
|
94479
|
-
|
|
94721
|
+
else {
|
|
94722
|
+
shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
94480
94723
|
}
|
|
94481
|
-
|
|
94724
|
+
nextListElementPos = child.pos;
|
|
94725
|
+
emitListItem(child, emit, parenthesizerRule, i);
|
|
94726
|
+
if (shouldDecreaseIndentAfterEmit) {
|
|
94482
94727
|
decreaseIndent();
|
|
94728
|
+
shouldDecreaseIndentAfterEmit = false;
|
|
94483
94729
|
}
|
|
94484
|
-
|
|
94485
|
-
|
|
94486
|
-
|
|
94487
|
-
|
|
94730
|
+
previousSibling = child;
|
|
94731
|
+
}
|
|
94732
|
+
var emitFlags = previousSibling ? ts.getEmitFlags(previousSibling) : 0;
|
|
94733
|
+
var skipTrailingComments = commentsDisabled || !!(emitFlags & 1024);
|
|
94734
|
+
var emitTrailingComma = hasTrailingComma && (format & 64) && (format & 16);
|
|
94735
|
+
if (emitTrailingComma) {
|
|
94736
|
+
if (previousSibling && !skipTrailingComments) {
|
|
94737
|
+
emitTokenWithComment(27, previousSibling.end, writePunctuation, previousSibling);
|
|
94488
94738
|
}
|
|
94489
|
-
else
|
|
94490
|
-
|
|
94739
|
+
else {
|
|
94740
|
+
writePunctuation(",");
|
|
94491
94741
|
}
|
|
94492
94742
|
}
|
|
94493
|
-
if (
|
|
94494
|
-
|
|
94743
|
+
if (previousSibling && (parentNode ? parentNode.end : -1) !== previousSibling.end && (format & 60) && !skipTrailingComments) {
|
|
94744
|
+
emitLeadingCommentsOfPosition(emitTrailingComma && (childrenTextRange === null || childrenTextRange === void 0 ? void 0 : childrenTextRange.end) ? childrenTextRange.end : previousSibling.end);
|
|
94495
94745
|
}
|
|
94496
|
-
if (format &
|
|
94497
|
-
|
|
94498
|
-
|
|
94499
|
-
|
|
94500
|
-
|
|
94746
|
+
if (format & 128) {
|
|
94747
|
+
decreaseIndent();
|
|
94748
|
+
}
|
|
94749
|
+
recordBundleFileInternalSectionEnd(previousSourceFileTextKind);
|
|
94750
|
+
var closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start + count - 1], format, childrenTextRange);
|
|
94751
|
+
if (closingLineTerminatorCount) {
|
|
94752
|
+
writeLine(closingLineTerminatorCount);
|
|
94753
|
+
}
|
|
94754
|
+
else if (format & (2097152 | 256)) {
|
|
94755
|
+
writeSpace();
|
|
94501
94756
|
}
|
|
94502
94757
|
}
|
|
94503
94758
|
function writeLiteral(s) {
|
|
@@ -94621,31 +94876,30 @@ var ts;
|
|
|
94621
94876
|
decreaseIndent();
|
|
94622
94877
|
}
|
|
94623
94878
|
}
|
|
94624
|
-
function getLeadingLineTerminatorCount(parentNode,
|
|
94879
|
+
function getLeadingLineTerminatorCount(parentNode, firstChild, format) {
|
|
94625
94880
|
if (format & 2 || preserveSourceNewlines) {
|
|
94626
94881
|
if (format & 65536) {
|
|
94627
94882
|
return 1;
|
|
94628
94883
|
}
|
|
94629
|
-
|
|
94630
|
-
if (firstChild_1 === undefined) {
|
|
94884
|
+
if (firstChild === undefined) {
|
|
94631
94885
|
return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
|
|
94632
94886
|
}
|
|
94633
|
-
if (
|
|
94887
|
+
if (firstChild.pos === nextListElementPos) {
|
|
94634
94888
|
return 0;
|
|
94635
94889
|
}
|
|
94636
|
-
if (
|
|
94890
|
+
if (firstChild.kind === 11) {
|
|
94637
94891
|
return 0;
|
|
94638
94892
|
}
|
|
94639
94893
|
if (currentSourceFile && parentNode &&
|
|
94640
94894
|
!ts.positionIsSynthesized(parentNode.pos) &&
|
|
94641
|
-
!ts.nodeIsSynthesized(
|
|
94642
|
-
(!
|
|
94895
|
+
!ts.nodeIsSynthesized(firstChild) &&
|
|
94896
|
+
(!firstChild.parent || ts.getOriginalNode(firstChild.parent) === ts.getOriginalNode(parentNode))) {
|
|
94643
94897
|
if (preserveSourceNewlines) {
|
|
94644
|
-
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(
|
|
94898
|
+
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(firstChild.pos, parentNode.pos, currentSourceFile, includeComments); });
|
|
94645
94899
|
}
|
|
94646
|
-
return ts.rangeStartPositionsAreOnSameLine(parentNode,
|
|
94900
|
+
return ts.rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile) ? 0 : 1;
|
|
94647
94901
|
}
|
|
94648
|
-
if (synthesizedNodeStartsOnNewLine(
|
|
94902
|
+
if (synthesizedNodeStartsOnNewLine(firstChild, format)) {
|
|
94649
94903
|
return 1;
|
|
94650
94904
|
}
|
|
94651
94905
|
}
|
|
@@ -94677,18 +94931,17 @@ var ts;
|
|
|
94677
94931
|
}
|
|
94678
94932
|
return format & 1 ? 1 : 0;
|
|
94679
94933
|
}
|
|
94680
|
-
function getClosingLineTerminatorCount(parentNode,
|
|
94934
|
+
function getClosingLineTerminatorCount(parentNode, lastChild, format, childrenTextRange) {
|
|
94681
94935
|
if (format & 2 || preserveSourceNewlines) {
|
|
94682
94936
|
if (format & 65536) {
|
|
94683
94937
|
return 1;
|
|
94684
94938
|
}
|
|
94685
|
-
var lastChild = ts.lastOrUndefined(children);
|
|
94686
94939
|
if (lastChild === undefined) {
|
|
94687
94940
|
return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
|
|
94688
94941
|
}
|
|
94689
94942
|
if (currentSourceFile && parentNode && !ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
|
|
94690
94943
|
if (preserveSourceNewlines) {
|
|
94691
|
-
var end_1 =
|
|
94944
|
+
var end_1 = childrenTextRange && !ts.positionIsSynthesized(childrenTextRange.end) ? childrenTextRange.end : lastChild.end;
|
|
94692
94945
|
return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndNextNonWhitespaceCharacter(end_1, parentNode.end, currentSourceFile, includeComments); });
|
|
94693
94946
|
}
|
|
94694
94947
|
return ts.rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile) ? 0 : 1;
|
|
@@ -94711,14 +94964,14 @@ var ts;
|
|
|
94711
94964
|
return lines;
|
|
94712
94965
|
}
|
|
94713
94966
|
function writeLineSeparatorsAndIndentBefore(node, parent) {
|
|
94714
|
-
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent,
|
|
94967
|
+
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, node, 0);
|
|
94715
94968
|
if (leadingNewlines) {
|
|
94716
94969
|
writeLinesAndIndent(leadingNewlines, false);
|
|
94717
94970
|
}
|
|
94718
94971
|
return !!leadingNewlines;
|
|
94719
94972
|
}
|
|
94720
94973
|
function writeLineSeparatorsAfter(node, parent) {
|
|
94721
|
-
var trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(parent,
|
|
94974
|
+
var trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount(parent, node, 0, undefined);
|
|
94722
94975
|
if (trailingNewlines) {
|
|
94723
94976
|
writeLine(trailingNewlines);
|
|
94724
94977
|
}
|
|
@@ -97773,7 +98026,7 @@ var ts;
|
|
|
97773
98026
|
}
|
|
97774
98027
|
}
|
|
97775
98028
|
function walkArray(nodes, parent) {
|
|
97776
|
-
if (parent.
|
|
98029
|
+
if (ts.canHaveModifiers(parent) && parent.modifiers === nodes && ts.some(nodes, ts.isDecorator) && !options.experimentalDecorators) {
|
|
97777
98030
|
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
98031
|
}
|
|
97779
98032
|
switch (parent.kind) {
|
|
@@ -97800,7 +98053,7 @@ var ts;
|
|
|
97800
98053
|
if (nodes === parent.modifiers) {
|
|
97801
98054
|
for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
|
|
97802
98055
|
var modifier = _a[_i];
|
|
97803
|
-
if (modifier.kind !== 124) {
|
|
98056
|
+
if (ts.isModifier(modifier) && modifier.kind !== 124) {
|
|
97804
98057
|
diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind)));
|
|
97805
98058
|
}
|
|
97806
98059
|
}
|
|
@@ -97808,7 +98061,7 @@ var ts;
|
|
|
97808
98061
|
}
|
|
97809
98062
|
break;
|
|
97810
98063
|
case 164:
|
|
97811
|
-
if (nodes === parent.modifiers) {
|
|
98064
|
+
if (nodes === parent.modifiers && ts.some(nodes, ts.isModifier)) {
|
|
97812
98065
|
diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files));
|
|
97813
98066
|
return "skip";
|
|
97814
98067
|
}
|
|
@@ -97920,7 +98173,7 @@ var ts;
|
|
|
97920
98173
|
}
|
|
97921
98174
|
function createSyntheticImport(text, file) {
|
|
97922
98175
|
var externalHelpersModuleReference = ts.factory.createStringLiteral(text);
|
|
97923
|
-
var importDecl = ts.factory.createImportDeclaration(undefined, undefined,
|
|
98176
|
+
var importDecl = ts.factory.createImportDeclaration(undefined, undefined, externalHelpersModuleReference, undefined);
|
|
97924
98177
|
ts.addEmitFlags(importDecl, 67108864);
|
|
97925
98178
|
ts.setParent(externalHelpersModuleReference, importDecl);
|
|
97926
98179
|
ts.setParent(importDecl, file);
|
|
@@ -105855,6 +106108,7 @@ var ts;
|
|
|
105855
106108
|
}
|
|
105856
106109
|
})(ts || (ts = {}));
|
|
105857
106110
|
// This file actually uses arguments passed on commandline and executes it
|
|
106111
|
+
// enable deprecation logging
|
|
105858
106112
|
ts.Debug.loggingHost = {
|
|
105859
106113
|
log: function (_level, s) {
|
|
105860
106114
|
ts.sys.write("" + (s || "") + ts.sys.newLine);
|