@typescript-deploys/pr-build 5.0.0-pr-52240-9 → 5.0.0-pr-49929-73
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/tsc.js +487 -404
- package/lib/tsserver.js +543 -429
- package/lib/tsserverlibrary.d.ts +76 -22
- package/lib/tsserverlibrary.js +539 -429
- package/lib/typescript.d.ts +66 -18
- package/lib/typescript.js +534 -429
- package/lib/typingsInstaller.js +199 -189
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20230116`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -8369,10 +8369,7 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
|
|
|
8369
8369
|
initial
|
|
8370
8370
|
);
|
|
8371
8371
|
}
|
|
8372
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
8373
|
-
if (!comments) {
|
|
8374
|
-
comments = [];
|
|
8375
|
-
}
|
|
8372
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
|
|
8376
8373
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
8377
8374
|
return comments;
|
|
8378
8375
|
}
|
|
@@ -10073,7 +10070,10 @@ function getOriginalNode(node, nodeTest) {
|
|
|
10073
10070
|
node = node.original;
|
|
10074
10071
|
}
|
|
10075
10072
|
}
|
|
10076
|
-
|
|
10073
|
+
if (!node || !nodeTest) {
|
|
10074
|
+
return node;
|
|
10075
|
+
}
|
|
10076
|
+
return nodeTest(node) ? node : void 0;
|
|
10077
10077
|
}
|
|
10078
10078
|
function findAncestor(node, callback) {
|
|
10079
10079
|
while (node) {
|
|
@@ -10544,9 +10544,6 @@ function isNodeKind(kind) {
|
|
|
10544
10544
|
function isTokenKind(kind) {
|
|
10545
10545
|
return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */;
|
|
10546
10546
|
}
|
|
10547
|
-
function isToken(n) {
|
|
10548
|
-
return isTokenKind(n.kind);
|
|
10549
|
-
}
|
|
10550
10547
|
function isNodeArray(array) {
|
|
10551
10548
|
return hasProperty(array, "pos") && hasProperty(array, "end");
|
|
10552
10549
|
}
|
|
@@ -10760,6 +10757,9 @@ function isDeclarationBindingElement(bindingElement) {
|
|
|
10760
10757
|
}
|
|
10761
10758
|
return false;
|
|
10762
10759
|
}
|
|
10760
|
+
function isBindingOrAssignmentElement(node) {
|
|
10761
|
+
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
10762
|
+
}
|
|
10763
10763
|
function isBindingOrAssignmentPattern(node) {
|
|
10764
10764
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
10765
10765
|
}
|
|
@@ -10789,6 +10789,24 @@ function isArrayBindingOrAssignmentPattern(node) {
|
|
|
10789
10789
|
}
|
|
10790
10790
|
return false;
|
|
10791
10791
|
}
|
|
10792
|
+
function isArrayBindingOrAssignmentElement(node) {
|
|
10793
|
+
switch (node.kind) {
|
|
10794
|
+
case 205 /* BindingElement */:
|
|
10795
|
+
case 229 /* OmittedExpression */:
|
|
10796
|
+
case 227 /* SpreadElement */:
|
|
10797
|
+
case 206 /* ArrayLiteralExpression */:
|
|
10798
|
+
case 207 /* ObjectLiteralExpression */:
|
|
10799
|
+
case 79 /* Identifier */:
|
|
10800
|
+
case 208 /* PropertyAccessExpression */:
|
|
10801
|
+
case 209 /* ElementAccessExpression */:
|
|
10802
|
+
return true;
|
|
10803
|
+
}
|
|
10804
|
+
return isAssignmentExpression(
|
|
10805
|
+
node,
|
|
10806
|
+
/*excludeCompoundAssignment*/
|
|
10807
|
+
true
|
|
10808
|
+
);
|
|
10809
|
+
}
|
|
10792
10810
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
10793
10811
|
const kind = node.kind;
|
|
10794
10812
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -10870,6 +10888,18 @@ function isUnaryExpressionKind(kind) {
|
|
|
10870
10888
|
return isLeftHandSideExpressionKind(kind);
|
|
10871
10889
|
}
|
|
10872
10890
|
}
|
|
10891
|
+
function isLiteralTypeLiteral(node) {
|
|
10892
|
+
node = skipPartiallyEmittedExpressions(node);
|
|
10893
|
+
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
10894
|
+
case 104 /* NullKeyword */:
|
|
10895
|
+
case 110 /* TrueKeyword */:
|
|
10896
|
+
case 95 /* FalseKeyword */:
|
|
10897
|
+
case 221 /* PrefixUnaryExpression */:
|
|
10898
|
+
return true;
|
|
10899
|
+
default:
|
|
10900
|
+
return isLiteralExpression(node);
|
|
10901
|
+
}
|
|
10902
|
+
}
|
|
10873
10903
|
function isExpression(node) {
|
|
10874
10904
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
10875
10905
|
}
|
|
@@ -11151,9 +11181,6 @@ function hasOnlyExpressionInitializer(node) {
|
|
|
11151
11181
|
return false;
|
|
11152
11182
|
}
|
|
11153
11183
|
}
|
|
11154
|
-
function isObjectLiteralElement(node) {
|
|
11155
|
-
return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node);
|
|
11156
|
-
}
|
|
11157
11184
|
function isTypeReferenceType(node) {
|
|
11158
11185
|
return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */;
|
|
11159
11186
|
}
|
|
@@ -15057,7 +15084,7 @@ function getInitializedVariables(node) {
|
|
|
15057
15084
|
return filter(node.declarations, isInitializedVariable);
|
|
15058
15085
|
}
|
|
15059
15086
|
function isInitializedVariable(node) {
|
|
15060
|
-
return node.initializer !== void 0;
|
|
15087
|
+
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
15061
15088
|
}
|
|
15062
15089
|
function isWatchSet(options) {
|
|
15063
15090
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -15218,7 +15245,7 @@ function getLastChild(node) {
|
|
|
15218
15245
|
return lastChild;
|
|
15219
15246
|
}
|
|
15220
15247
|
function isTypeNodeKind(kind) {
|
|
15221
|
-
return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
|
|
15248
|
+
return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
|
|
15222
15249
|
}
|
|
15223
15250
|
function isAccessExpression(node) {
|
|
15224
15251
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -35346,6 +35373,7 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
|
|
|
35346
35373
|
}
|
|
35347
35374
|
}
|
|
35348
35375
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
35376
|
+
Debug.assert(typeof spec === "string");
|
|
35349
35377
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
35350
35378
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
35351
35379
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -42489,7 +42517,7 @@ function createTypeChecker(host) {
|
|
|
42489
42517
|
if (jsxFragmentPragma) {
|
|
42490
42518
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
42491
42519
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
42492
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
42520
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
|
|
42493
42521
|
if (file.localJsxFragmentFactory) {
|
|
42494
42522
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
42495
42523
|
}
|
|
@@ -42532,7 +42560,7 @@ function createTypeChecker(host) {
|
|
|
42532
42560
|
if (jsxPragma) {
|
|
42533
42561
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
42534
42562
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
42535
|
-
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
42563
|
+
visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
|
|
42536
42564
|
if (file.localJsxFactory) {
|
|
42537
42565
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
42538
42566
|
}
|
|
@@ -44043,6 +44071,7 @@ function createTypeChecker(host) {
|
|
|
44043
44071
|
return valueSymbol;
|
|
44044
44072
|
}
|
|
44045
44073
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
44074
|
+
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
44046
44075
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
44047
44076
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
44048
44077
|
if (valueSymbol.valueDeclaration)
|
|
@@ -47682,7 +47711,7 @@ function createTypeChecker(host) {
|
|
|
47682
47711
|
}
|
|
47683
47712
|
let hadError = false;
|
|
47684
47713
|
const file = getSourceFileOfNode(existing);
|
|
47685
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
47714
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
47686
47715
|
if (hadError) {
|
|
47687
47716
|
return void 0;
|
|
47688
47717
|
}
|
|
@@ -47695,16 +47724,16 @@ function createTypeChecker(host) {
|
|
|
47695
47724
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
47696
47725
|
}
|
|
47697
47726
|
if (isJSDocNullableType(node)) {
|
|
47698
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
47727
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
|
|
47699
47728
|
}
|
|
47700
47729
|
if (isJSDocOptionalType(node)) {
|
|
47701
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
47730
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
47702
47731
|
}
|
|
47703
47732
|
if (isJSDocNonNullableType(node)) {
|
|
47704
47733
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
47705
47734
|
}
|
|
47706
47735
|
if (isJSDocVariadicType(node)) {
|
|
47707
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
47736
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
47708
47737
|
}
|
|
47709
47738
|
if (isJSDocTypeLiteral(node)) {
|
|
47710
47739
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -47716,7 +47745,7 @@ function createTypeChecker(host) {
|
|
|
47716
47745
|
void 0,
|
|
47717
47746
|
name,
|
|
47718
47747
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
47719
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47748
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47720
47749
|
);
|
|
47721
47750
|
}));
|
|
47722
47751
|
}
|
|
@@ -47735,9 +47764,9 @@ function createTypeChecker(host) {
|
|
|
47735
47764
|
"x",
|
|
47736
47765
|
/*questionToken*/
|
|
47737
47766
|
void 0,
|
|
47738
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
47767
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
|
|
47739
47768
|
)],
|
|
47740
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
47769
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
|
|
47741
47770
|
)]);
|
|
47742
47771
|
}
|
|
47743
47772
|
if (isJSDocFunctionType(node)) {
|
|
@@ -47746,33 +47775,33 @@ function createTypeChecker(host) {
|
|
|
47746
47775
|
return factory.createConstructorTypeNode(
|
|
47747
47776
|
/*modifiers*/
|
|
47748
47777
|
void 0,
|
|
47749
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
47778
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
47750
47779
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
47751
47780
|
/*modifiers*/
|
|
47752
47781
|
void 0,
|
|
47753
47782
|
getEffectiveDotDotDotForParameter(p),
|
|
47754
47783
|
getNameForJSDocFunctionParameter(p, i),
|
|
47755
47784
|
p.questionToken,
|
|
47756
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
47785
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
47757
47786
|
/*initializer*/
|
|
47758
47787
|
void 0
|
|
47759
47788
|
)),
|
|
47760
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47789
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47761
47790
|
);
|
|
47762
47791
|
} else {
|
|
47763
47792
|
return factory.createFunctionTypeNode(
|
|
47764
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
47793
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
47765
47794
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
47766
47795
|
/*modifiers*/
|
|
47767
47796
|
void 0,
|
|
47768
47797
|
getEffectiveDotDotDotForParameter(p),
|
|
47769
47798
|
getNameForJSDocFunctionParameter(p, i),
|
|
47770
47799
|
p.questionToken,
|
|
47771
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
47800
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
47772
47801
|
/*initializer*/
|
|
47773
47802
|
void 0
|
|
47774
47803
|
)),
|
|
47775
|
-
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47804
|
+
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47776
47805
|
);
|
|
47777
47806
|
}
|
|
47778
47807
|
}
|
|
@@ -48694,7 +48723,7 @@ function createTypeChecker(host) {
|
|
|
48694
48723
|
break;
|
|
48695
48724
|
}
|
|
48696
48725
|
case 268 /* ImportEqualsDeclaration */:
|
|
48697
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
48726
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
|
|
48698
48727
|
serializeMaybeAliasAssignment(symbol);
|
|
48699
48728
|
break;
|
|
48700
48729
|
}
|
|
@@ -49788,13 +49817,7 @@ function createTypeChecker(host) {
|
|
|
49788
49817
|
}
|
|
49789
49818
|
const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
|
|
49790
49819
|
const isOptional = includeOptionality && isOptionalDeclaration(declaration);
|
|
49791
|
-
|
|
49792
|
-
if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
49793
|
-
if (declaredType) {
|
|
49794
|
-
return isTypeAny(declaredType) || declaredType === unknownType ? declaredType : errorType;
|
|
49795
|
-
}
|
|
49796
|
-
declaredType = useUnknownInCatchVariables ? unknownType : anyType;
|
|
49797
|
-
}
|
|
49820
|
+
const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
49798
49821
|
if (declaredType) {
|
|
49799
49822
|
return addOptionality(declaredType, isProperty, isOptional);
|
|
49800
49823
|
}
|
|
@@ -50373,6 +50396,14 @@ function createTypeChecker(host) {
|
|
|
50373
50396
|
}
|
|
50374
50397
|
Debug.assertIsDefined(symbol.valueDeclaration);
|
|
50375
50398
|
const declaration = symbol.valueDeclaration;
|
|
50399
|
+
if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
50400
|
+
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
50401
|
+
if (typeNode === void 0) {
|
|
50402
|
+
return useUnknownInCatchVariables ? unknownType : anyType;
|
|
50403
|
+
}
|
|
50404
|
+
const type2 = getTypeOfNode(typeNode);
|
|
50405
|
+
return isTypeAny(type2) || type2 === unknownType ? type2 : errorType;
|
|
50406
|
+
}
|
|
50376
50407
|
if (isSourceFile(declaration) && isJsonSourceFile(declaration)) {
|
|
50377
50408
|
if (!declaration.statements.length) {
|
|
50378
50409
|
return emptyObjectType;
|
|
@@ -75604,10 +75635,14 @@ function createTypeChecker(host) {
|
|
|
75604
75635
|
if (catchClause) {
|
|
75605
75636
|
if (catchClause.variableDeclaration) {
|
|
75606
75637
|
const declaration = catchClause.variableDeclaration;
|
|
75607
|
-
|
|
75608
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
75638
|
+
const typeNode = getEffectiveTypeAnnotationNode(getRootDeclaration(declaration));
|
|
75609
75639
|
if (typeNode) {
|
|
75610
|
-
const type =
|
|
75640
|
+
const type = getTypeForVariableLikeDeclaration(
|
|
75641
|
+
declaration,
|
|
75642
|
+
/*includeOptionality*/
|
|
75643
|
+
false,
|
|
75644
|
+
0 /* Normal */
|
|
75645
|
+
);
|
|
75611
75646
|
if (type && !(type.flags & 3 /* AnyOrUnknown */)) {
|
|
75612
75647
|
grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
|
|
75613
75648
|
}
|
|
@@ -81001,13 +81036,10 @@ var SymbolTrackerImpl = class {
|
|
|
81001
81036
|
|
|
81002
81037
|
// src/compiler/visitorPublic.ts
|
|
81003
81038
|
function visitNode(node, visitor, test, lift) {
|
|
81004
|
-
if (node === void 0
|
|
81039
|
+
if (node === void 0) {
|
|
81005
81040
|
return node;
|
|
81006
81041
|
}
|
|
81007
81042
|
const visited = visitor(node);
|
|
81008
|
-
if (visited === node) {
|
|
81009
|
-
return node;
|
|
81010
|
-
}
|
|
81011
81043
|
let visitedNode;
|
|
81012
81044
|
if (visited === void 0) {
|
|
81013
81045
|
return void 0;
|
|
@@ -81020,7 +81052,7 @@ function visitNode(node, visitor, test, lift) {
|
|
|
81020
81052
|
return visitedNode;
|
|
81021
81053
|
}
|
|
81022
81054
|
function visitNodes2(nodes, visitor, test, start, count) {
|
|
81023
|
-
if (nodes === void 0
|
|
81055
|
+
if (nodes === void 0) {
|
|
81024
81056
|
return nodes;
|
|
81025
81057
|
}
|
|
81026
81058
|
const length2 = nodes.length;
|
|
@@ -81069,25 +81101,30 @@ function visitArrayWorker(nodes, visitor, test, start, count) {
|
|
|
81069
81101
|
}
|
|
81070
81102
|
for (let i = 0; i < count; i++) {
|
|
81071
81103
|
const node = nodes[i + start];
|
|
81072
|
-
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
81104
|
+
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
81073
81105
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
81074
81106
|
if (updated === void 0) {
|
|
81075
81107
|
updated = nodes.slice(0, i);
|
|
81108
|
+
Debug.assertEachNode(updated, test);
|
|
81076
81109
|
}
|
|
81077
81110
|
if (visited) {
|
|
81078
81111
|
if (isArray(visited)) {
|
|
81079
81112
|
for (const visitedNode of visited) {
|
|
81080
|
-
|
|
81113
|
+
Debug.assertNode(visitedNode, test);
|
|
81081
81114
|
updated.push(visitedNode);
|
|
81082
81115
|
}
|
|
81083
81116
|
} else {
|
|
81084
|
-
|
|
81117
|
+
Debug.assertNode(visited, test);
|
|
81085
81118
|
updated.push(visited);
|
|
81086
81119
|
}
|
|
81087
81120
|
}
|
|
81088
81121
|
}
|
|
81089
81122
|
}
|
|
81090
|
-
|
|
81123
|
+
if (updated) {
|
|
81124
|
+
return updated;
|
|
81125
|
+
}
|
|
81126
|
+
Debug.assertEachNode(nodes, test);
|
|
81127
|
+
return nodes;
|
|
81091
81128
|
}
|
|
81092
81129
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
81093
81130
|
context.startLexicalEnvironment();
|
|
@@ -81101,7 +81138,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
|
|
|
81101
81138
|
context.startLexicalEnvironment();
|
|
81102
81139
|
if (nodes) {
|
|
81103
81140
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
81104
|
-
updated = nodesVisitor(nodes, visitor,
|
|
81141
|
+
updated = nodesVisitor(nodes, visitor, isParameter);
|
|
81105
81142
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
81106
81143
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
81107
81144
|
}
|
|
@@ -81223,6 +81260,7 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
|
|
|
81223
81260
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
81224
81261
|
context.startBlockScope();
|
|
81225
81262
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
81263
|
+
Debug.assert(updated);
|
|
81226
81264
|
const declarations = context.endBlockScope();
|
|
81227
81265
|
if (some(declarations)) {
|
|
81228
81266
|
if (isBlock(updated)) {
|
|
@@ -81245,14 +81283,14 @@ var visitEachChildTable = {
|
|
|
81245
81283
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81246
81284
|
return context.factory.updateQualifiedName(
|
|
81247
81285
|
node,
|
|
81248
|
-
nodeVisitor(node.left, visitor, isEntityName),
|
|
81249
|
-
nodeVisitor(node.right, visitor, isIdentifier)
|
|
81286
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
|
|
81287
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
|
|
81250
81288
|
);
|
|
81251
81289
|
},
|
|
81252
81290
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81253
81291
|
return context.factory.updateComputedPropertyName(
|
|
81254
81292
|
node,
|
|
81255
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81293
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81256
81294
|
);
|
|
81257
81295
|
},
|
|
81258
81296
|
// Signature elements
|
|
@@ -81260,7 +81298,7 @@ var visitEachChildTable = {
|
|
|
81260
81298
|
return context.factory.updateTypeParameterDeclaration(
|
|
81261
81299
|
node,
|
|
81262
81300
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81263
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81301
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81264
81302
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
81265
81303
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
81266
81304
|
);
|
|
@@ -81269,9 +81307,9 @@ var visitEachChildTable = {
|
|
|
81269
81307
|
return context.factory.updateParameterDeclaration(
|
|
81270
81308
|
node,
|
|
81271
81309
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81272
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81273
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81274
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81310
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81311
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
81312
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81275
81313
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81276
81314
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81277
81315
|
);
|
|
@@ -81279,7 +81317,7 @@ var visitEachChildTable = {
|
|
|
81279
81317
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81280
81318
|
return context.factory.updateDecorator(
|
|
81281
81319
|
node,
|
|
81282
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81320
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81283
81321
|
);
|
|
81284
81322
|
},
|
|
81285
81323
|
// Type elements
|
|
@@ -81287,19 +81325,19 @@ var visitEachChildTable = {
|
|
|
81287
81325
|
return context.factory.updatePropertySignature(
|
|
81288
81326
|
node,
|
|
81289
81327
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81290
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81291
|
-
nodeVisitor(node.questionToken, tokenVisitor,
|
|
81328
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81329
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81292
81330
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81293
81331
|
);
|
|
81294
81332
|
},
|
|
81295
81333
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81296
|
-
var _a2;
|
|
81334
|
+
var _a2, _b;
|
|
81297
81335
|
return context.factory.updatePropertyDeclaration(
|
|
81298
81336
|
node,
|
|
81299
81337
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81300
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81338
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81301
81339
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
81302
|
-
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
81340
|
+
tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
|
|
81303
81341
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81304
81342
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81305
81343
|
);
|
|
@@ -81308,10 +81346,10 @@ var visitEachChildTable = {
|
|
|
81308
81346
|
return context.factory.updateMethodSignature(
|
|
81309
81347
|
node,
|
|
81310
81348
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81311
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81312
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81349
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81350
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81313
81351
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81314
|
-
nodesVisitor(node.parameters, visitor,
|
|
81352
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81315
81353
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81316
81354
|
);
|
|
81317
81355
|
},
|
|
@@ -81319,9 +81357,9 @@ var visitEachChildTable = {
|
|
|
81319
81357
|
return context.factory.updateMethodDeclaration(
|
|
81320
81358
|
node,
|
|
81321
81359
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81322
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81323
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81324
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81360
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81361
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81362
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81325
81363
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81326
81364
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81327
81365
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -81340,7 +81378,7 @@ var visitEachChildTable = {
|
|
|
81340
81378
|
return context.factory.updateGetAccessorDeclaration(
|
|
81341
81379
|
node,
|
|
81342
81380
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81343
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81381
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81344
81382
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81345
81383
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81346
81384
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -81350,7 +81388,7 @@ var visitEachChildTable = {
|
|
|
81350
81388
|
return context.factory.updateSetAccessorDeclaration(
|
|
81351
81389
|
node,
|
|
81352
81390
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81353
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81391
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81354
81392
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81355
81393
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
81356
81394
|
);
|
|
@@ -81367,7 +81405,7 @@ var visitEachChildTable = {
|
|
|
81367
81405
|
return context.factory.updateCallSignature(
|
|
81368
81406
|
node,
|
|
81369
81407
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81370
|
-
nodesVisitor(node.parameters, visitor,
|
|
81408
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81371
81409
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81372
81410
|
);
|
|
81373
81411
|
},
|
|
@@ -81375,7 +81413,7 @@ var visitEachChildTable = {
|
|
|
81375
81413
|
return context.factory.updateConstructSignature(
|
|
81376
81414
|
node,
|
|
81377
81415
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81378
|
-
nodesVisitor(node.parameters, visitor,
|
|
81416
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81379
81417
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81380
81418
|
);
|
|
81381
81419
|
},
|
|
@@ -81383,8 +81421,8 @@ var visitEachChildTable = {
|
|
|
81383
81421
|
return context.factory.updateIndexSignature(
|
|
81384
81422
|
node,
|
|
81385
81423
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81386
|
-
nodesVisitor(node.parameters, visitor,
|
|
81387
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81424
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81425
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81388
81426
|
);
|
|
81389
81427
|
},
|
|
81390
81428
|
// Types
|
|
@@ -81392,14 +81430,14 @@ var visitEachChildTable = {
|
|
|
81392
81430
|
return context.factory.updateTypePredicateNode(
|
|
81393
81431
|
node,
|
|
81394
81432
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
81395
|
-
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
81433
|
+
Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
|
|
81396
81434
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81397
81435
|
);
|
|
81398
81436
|
},
|
|
81399
81437
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81400
81438
|
return context.factory.updateTypeReferenceNode(
|
|
81401
81439
|
node,
|
|
81402
|
-
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
81440
|
+
Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
|
|
81403
81441
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81404
81442
|
);
|
|
81405
81443
|
},
|
|
@@ -81407,8 +81445,8 @@ var visitEachChildTable = {
|
|
|
81407
81445
|
return context.factory.updateFunctionTypeNode(
|
|
81408
81446
|
node,
|
|
81409
81447
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81410
|
-
nodesVisitor(node.parameters, visitor,
|
|
81411
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81448
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81449
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81412
81450
|
);
|
|
81413
81451
|
},
|
|
81414
81452
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -81416,14 +81454,14 @@ var visitEachChildTable = {
|
|
|
81416
81454
|
node,
|
|
81417
81455
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81418
81456
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81419
|
-
nodesVisitor(node.parameters, visitor,
|
|
81420
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81457
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81458
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81421
81459
|
);
|
|
81422
81460
|
},
|
|
81423
81461
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81424
81462
|
return context.factory.updateTypeQueryNode(
|
|
81425
81463
|
node,
|
|
81426
|
-
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
81464
|
+
Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
|
|
81427
81465
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81428
81466
|
);
|
|
81429
81467
|
},
|
|
@@ -81436,7 +81474,7 @@ var visitEachChildTable = {
|
|
|
81436
81474
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81437
81475
|
return context.factory.updateArrayTypeNode(
|
|
81438
81476
|
node,
|
|
81439
|
-
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
81477
|
+
Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
|
|
81440
81478
|
);
|
|
81441
81479
|
},
|
|
81442
81480
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -81448,13 +81486,13 @@ var visitEachChildTable = {
|
|
|
81448
81486
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81449
81487
|
return context.factory.updateOptionalTypeNode(
|
|
81450
81488
|
node,
|
|
81451
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81489
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81452
81490
|
);
|
|
81453
81491
|
},
|
|
81454
81492
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81455
81493
|
return context.factory.updateRestTypeNode(
|
|
81456
81494
|
node,
|
|
81457
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81495
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81458
81496
|
);
|
|
81459
81497
|
},
|
|
81460
81498
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -81472,22 +81510,22 @@ var visitEachChildTable = {
|
|
|
81472
81510
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81473
81511
|
return context.factory.updateConditionalTypeNode(
|
|
81474
81512
|
node,
|
|
81475
|
-
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
81476
|
-
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
81477
|
-
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
81478
|
-
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
81513
|
+
Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
|
|
81514
|
+
Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
|
|
81515
|
+
Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
|
|
81516
|
+
Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
|
|
81479
81517
|
);
|
|
81480
81518
|
},
|
|
81481
81519
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81482
81520
|
return context.factory.updateInferTypeNode(
|
|
81483
81521
|
node,
|
|
81484
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
81522
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
|
|
81485
81523
|
);
|
|
81486
81524
|
},
|
|
81487
81525
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81488
81526
|
return context.factory.updateImportTypeNode(
|
|
81489
81527
|
node,
|
|
81490
|
-
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
81528
|
+
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
81491
81529
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
81492
81530
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
81493
81531
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -81497,45 +81535,45 @@ var visitEachChildTable = {
|
|
|
81497
81535
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81498
81536
|
return context.factory.updateImportTypeAssertionContainer(
|
|
81499
81537
|
node,
|
|
81500
|
-
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
81538
|
+
Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
|
|
81501
81539
|
node.multiLine
|
|
81502
81540
|
);
|
|
81503
81541
|
},
|
|
81504
81542
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81505
81543
|
return context.factory.updateNamedTupleMember(
|
|
81506
81544
|
node,
|
|
81507
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81508
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81509
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81510
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81545
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81546
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81547
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81548
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81511
81549
|
);
|
|
81512
81550
|
},
|
|
81513
81551
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81514
81552
|
return context.factory.updateParenthesizedType(
|
|
81515
81553
|
node,
|
|
81516
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81554
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81517
81555
|
);
|
|
81518
81556
|
},
|
|
81519
81557
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81520
81558
|
return context.factory.updateTypeOperatorNode(
|
|
81521
81559
|
node,
|
|
81522
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81560
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81523
81561
|
);
|
|
81524
81562
|
},
|
|
81525
81563
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81526
81564
|
return context.factory.updateIndexedAccessTypeNode(
|
|
81527
81565
|
node,
|
|
81528
|
-
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
81529
|
-
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
81566
|
+
Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
|
|
81567
|
+
Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
|
|
81530
81568
|
);
|
|
81531
81569
|
},
|
|
81532
81570
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81533
81571
|
return context.factory.updateMappedTypeNode(
|
|
81534
81572
|
node,
|
|
81535
|
-
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
81536
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
81573
|
+
tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
|
|
81574
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
|
|
81537
81575
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
81538
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
81576
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
|
|
81539
81577
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81540
81578
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
81541
81579
|
);
|
|
@@ -81543,21 +81581,21 @@ var visitEachChildTable = {
|
|
|
81543
81581
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81544
81582
|
return context.factory.updateLiteralTypeNode(
|
|
81545
81583
|
node,
|
|
81546
|
-
nodeVisitor(node.literal, visitor,
|
|
81584
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
|
|
81547
81585
|
);
|
|
81548
81586
|
},
|
|
81549
81587
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81550
81588
|
return context.factory.updateTemplateLiteralType(
|
|
81551
81589
|
node,
|
|
81552
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
81590
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
81553
81591
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
81554
81592
|
);
|
|
81555
81593
|
},
|
|
81556
81594
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81557
81595
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
81558
81596
|
node,
|
|
81559
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81560
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
81597
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
81598
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
81561
81599
|
);
|
|
81562
81600
|
},
|
|
81563
81601
|
// Binding patterns
|
|
@@ -81576,9 +81614,9 @@ var visitEachChildTable = {
|
|
|
81576
81614
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81577
81615
|
return context.factory.updateBindingElement(
|
|
81578
81616
|
node,
|
|
81579
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81617
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81580
81618
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
81581
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81619
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
81582
81620
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81583
81621
|
);
|
|
81584
81622
|
},
|
|
@@ -81598,37 +81636,37 @@ var visitEachChildTable = {
|
|
|
81598
81636
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81599
81637
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
81600
81638
|
node,
|
|
81601
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81602
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81603
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
81639
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81640
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81641
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
81604
81642
|
) : context.factory.updatePropertyAccessExpression(
|
|
81605
81643
|
node,
|
|
81606
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81607
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
81644
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81645
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
81608
81646
|
);
|
|
81609
81647
|
},
|
|
81610
81648
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81611
81649
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
81612
81650
|
node,
|
|
81613
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81614
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81615
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
81651
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81652
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81653
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
81616
81654
|
) : context.factory.updateElementAccessExpression(
|
|
81617
81655
|
node,
|
|
81618
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81619
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
81656
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81657
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
81620
81658
|
);
|
|
81621
81659
|
},
|
|
81622
81660
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81623
81661
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
81624
81662
|
node,
|
|
81625
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81626
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81663
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81664
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81627
81665
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81628
81666
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81629
81667
|
) : context.factory.updateCallExpression(
|
|
81630
81668
|
node,
|
|
81631
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81669
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81632
81670
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81633
81671
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81634
81672
|
);
|
|
@@ -81636,7 +81674,7 @@ var visitEachChildTable = {
|
|
|
81636
81674
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81637
81675
|
return context.factory.updateNewExpression(
|
|
81638
81676
|
node,
|
|
81639
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81677
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81640
81678
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81641
81679
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81642
81680
|
);
|
|
@@ -81644,29 +81682,29 @@ var visitEachChildTable = {
|
|
|
81644
81682
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81645
81683
|
return context.factory.updateTaggedTemplateExpression(
|
|
81646
81684
|
node,
|
|
81647
|
-
nodeVisitor(node.tag, visitor, isExpression),
|
|
81685
|
+
Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
|
|
81648
81686
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81649
|
-
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
81687
|
+
Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
|
|
81650
81688
|
);
|
|
81651
81689
|
},
|
|
81652
81690
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81653
81691
|
return context.factory.updateTypeAssertion(
|
|
81654
81692
|
node,
|
|
81655
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81656
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81693
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
81694
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81657
81695
|
);
|
|
81658
81696
|
},
|
|
81659
81697
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81660
81698
|
return context.factory.updateParenthesizedExpression(
|
|
81661
81699
|
node,
|
|
81662
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81700
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81663
81701
|
);
|
|
81664
81702
|
},
|
|
81665
81703
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81666
81704
|
return context.factory.updateFunctionExpression(
|
|
81667
81705
|
node,
|
|
81668
81706
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81669
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81707
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81670
81708
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81671
81709
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81672
81710
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -81681,82 +81719,82 @@ var visitEachChildTable = {
|
|
|
81681
81719
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81682
81720
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81683
81721
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81684
|
-
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
81722
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
|
|
81685
81723
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
81686
81724
|
);
|
|
81687
81725
|
},
|
|
81688
81726
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81689
81727
|
return context.factory.updateDeleteExpression(
|
|
81690
81728
|
node,
|
|
81691
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81729
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81692
81730
|
);
|
|
81693
81731
|
},
|
|
81694
81732
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81695
81733
|
return context.factory.updateTypeOfExpression(
|
|
81696
81734
|
node,
|
|
81697
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81735
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81698
81736
|
);
|
|
81699
81737
|
},
|
|
81700
81738
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81701
81739
|
return context.factory.updateVoidExpression(
|
|
81702
81740
|
node,
|
|
81703
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81741
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81704
81742
|
);
|
|
81705
81743
|
},
|
|
81706
81744
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81707
81745
|
return context.factory.updateAwaitExpression(
|
|
81708
81746
|
node,
|
|
81709
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81747
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81710
81748
|
);
|
|
81711
81749
|
},
|
|
81712
81750
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81713
81751
|
return context.factory.updatePrefixUnaryExpression(
|
|
81714
81752
|
node,
|
|
81715
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
81753
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
81716
81754
|
);
|
|
81717
81755
|
},
|
|
81718
81756
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81719
81757
|
return context.factory.updatePostfixUnaryExpression(
|
|
81720
81758
|
node,
|
|
81721
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
81759
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
81722
81760
|
);
|
|
81723
81761
|
},
|
|
81724
81762
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81725
81763
|
return context.factory.updateBinaryExpression(
|
|
81726
81764
|
node,
|
|
81727
|
-
nodeVisitor(node.left, visitor, isExpression),
|
|
81728
|
-
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
81729
|
-
nodeVisitor(node.right, visitor, isExpression)
|
|
81765
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
|
|
81766
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
|
|
81767
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
|
|
81730
81768
|
);
|
|
81731
81769
|
},
|
|
81732
81770
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81733
81771
|
return context.factory.updateConditionalExpression(
|
|
81734
81772
|
node,
|
|
81735
|
-
nodeVisitor(node.condition, visitor, isExpression),
|
|
81736
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81737
|
-
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
81738
|
-
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
81739
|
-
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
81773
|
+
Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
|
|
81774
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
|
|
81775
|
+
Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
|
|
81776
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
|
|
81777
|
+
Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
|
|
81740
81778
|
);
|
|
81741
81779
|
},
|
|
81742
81780
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81743
81781
|
return context.factory.updateTemplateExpression(
|
|
81744
81782
|
node,
|
|
81745
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
81783
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
81746
81784
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
81747
81785
|
);
|
|
81748
81786
|
},
|
|
81749
81787
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81750
81788
|
return context.factory.updateYieldExpression(
|
|
81751
81789
|
node,
|
|
81752
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81790
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81753
81791
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
81754
81792
|
);
|
|
81755
81793
|
},
|
|
81756
81794
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81757
81795
|
return context.factory.updateSpreadElement(
|
|
81758
81796
|
node,
|
|
81759
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81797
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81760
81798
|
);
|
|
81761
81799
|
},
|
|
81762
81800
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -81772,45 +81810,45 @@ var visitEachChildTable = {
|
|
|
81772
81810
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81773
81811
|
return context.factory.updateExpressionWithTypeArguments(
|
|
81774
81812
|
node,
|
|
81775
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81813
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81776
81814
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81777
81815
|
);
|
|
81778
81816
|
},
|
|
81779
81817
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81780
81818
|
return context.factory.updateAsExpression(
|
|
81781
81819
|
node,
|
|
81782
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81783
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81820
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81821
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81784
81822
|
);
|
|
81785
81823
|
},
|
|
81786
81824
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81787
81825
|
return context.factory.updateSatisfiesExpression(
|
|
81788
81826
|
node,
|
|
81789
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81790
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81827
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81828
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81791
81829
|
);
|
|
81792
81830
|
},
|
|
81793
81831
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81794
81832
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
81795
81833
|
node,
|
|
81796
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81834
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81797
81835
|
) : context.factory.updateNonNullExpression(
|
|
81798
81836
|
node,
|
|
81799
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81837
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81800
81838
|
);
|
|
81801
81839
|
},
|
|
81802
81840
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81803
81841
|
return context.factory.updateMetaProperty(
|
|
81804
81842
|
node,
|
|
81805
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
81843
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
81806
81844
|
);
|
|
81807
81845
|
},
|
|
81808
81846
|
// Misc
|
|
81809
81847
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81810
81848
|
return context.factory.updateTemplateSpan(
|
|
81811
81849
|
node,
|
|
81812
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81813
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
81850
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81851
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
81814
81852
|
);
|
|
81815
81853
|
},
|
|
81816
81854
|
// Element
|
|
@@ -81824,20 +81862,20 @@ var visitEachChildTable = {
|
|
|
81824
81862
|
return context.factory.updateVariableStatement(
|
|
81825
81863
|
node,
|
|
81826
81864
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81827
|
-
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
81865
|
+
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
81828
81866
|
);
|
|
81829
81867
|
},
|
|
81830
81868
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81831
81869
|
return context.factory.updateExpressionStatement(
|
|
81832
81870
|
node,
|
|
81833
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81871
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81834
81872
|
);
|
|
81835
81873
|
},
|
|
81836
81874
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81837
81875
|
return context.factory.updateIfStatement(
|
|
81838
81876
|
node,
|
|
81839
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81840
|
-
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
81877
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81878
|
+
Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
|
|
81841
81879
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
81842
81880
|
);
|
|
81843
81881
|
},
|
|
@@ -81845,13 +81883,13 @@ var visitEachChildTable = {
|
|
|
81845
81883
|
return context.factory.updateDoStatement(
|
|
81846
81884
|
node,
|
|
81847
81885
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
81848
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81886
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81849
81887
|
);
|
|
81850
81888
|
},
|
|
81851
81889
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81852
81890
|
return context.factory.updateWhileStatement(
|
|
81853
81891
|
node,
|
|
81854
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81892
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81855
81893
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81856
81894
|
);
|
|
81857
81895
|
},
|
|
@@ -81867,17 +81905,17 @@ var visitEachChildTable = {
|
|
|
81867
81905
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81868
81906
|
return context.factory.updateForInStatement(
|
|
81869
81907
|
node,
|
|
81870
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
81871
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81908
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
81909
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81872
81910
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81873
81911
|
);
|
|
81874
81912
|
},
|
|
81875
81913
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81876
81914
|
return context.factory.updateForOfStatement(
|
|
81877
81915
|
node,
|
|
81878
|
-
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
81879
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
81880
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81916
|
+
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
|
81917
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
81918
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81881
81919
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81882
81920
|
);
|
|
81883
81921
|
},
|
|
@@ -81902,34 +81940,34 @@ var visitEachChildTable = {
|
|
|
81902
81940
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81903
81941
|
return context.factory.updateWithStatement(
|
|
81904
81942
|
node,
|
|
81905
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81906
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
81943
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81944
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
81907
81945
|
);
|
|
81908
81946
|
},
|
|
81909
81947
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81910
81948
|
return context.factory.updateSwitchStatement(
|
|
81911
81949
|
node,
|
|
81912
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81913
|
-
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
81950
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81951
|
+
Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
|
|
81914
81952
|
);
|
|
81915
81953
|
},
|
|
81916
81954
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81917
81955
|
return context.factory.updateLabeledStatement(
|
|
81918
81956
|
node,
|
|
81919
|
-
nodeVisitor(node.label, visitor, isIdentifier),
|
|
81920
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
81957
|
+
Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
|
|
81958
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
81921
81959
|
);
|
|
81922
81960
|
},
|
|
81923
81961
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81924
81962
|
return context.factory.updateThrowStatement(
|
|
81925
81963
|
node,
|
|
81926
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81964
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81927
81965
|
);
|
|
81928
81966
|
},
|
|
81929
81967
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81930
81968
|
return context.factory.updateTryStatement(
|
|
81931
81969
|
node,
|
|
81932
|
-
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
81970
|
+
Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
|
|
81933
81971
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
81934
81972
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
81935
81973
|
);
|
|
@@ -81937,8 +81975,8 @@ var visitEachChildTable = {
|
|
|
81937
81975
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81938
81976
|
return context.factory.updateVariableDeclaration(
|
|
81939
81977
|
node,
|
|
81940
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81941
|
-
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
81978
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
81979
|
+
tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
|
|
81942
81980
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81943
81981
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81944
81982
|
);
|
|
@@ -81953,7 +81991,7 @@ var visitEachChildTable = {
|
|
|
81953
81991
|
return context.factory.updateFunctionDeclaration(
|
|
81954
81992
|
node,
|
|
81955
81993
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81956
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81994
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81957
81995
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81958
81996
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81959
81997
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -81975,7 +82013,7 @@ var visitEachChildTable = {
|
|
|
81975
82013
|
return context.factory.updateInterfaceDeclaration(
|
|
81976
82014
|
node,
|
|
81977
82015
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81978
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82016
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81979
82017
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81980
82018
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
81981
82019
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -81985,16 +82023,16 @@ var visitEachChildTable = {
|
|
|
81985
82023
|
return context.factory.updateTypeAliasDeclaration(
|
|
81986
82024
|
node,
|
|
81987
82025
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81988
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82026
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81989
82027
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81990
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
82028
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81991
82029
|
);
|
|
81992
82030
|
},
|
|
81993
82031
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81994
82032
|
return context.factory.updateEnumDeclaration(
|
|
81995
82033
|
node,
|
|
81996
82034
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81997
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82035
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81998
82036
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
81999
82037
|
);
|
|
82000
82038
|
},
|
|
@@ -82002,7 +82040,7 @@ var visitEachChildTable = {
|
|
|
82002
82040
|
return context.factory.updateModuleDeclaration(
|
|
82003
82041
|
node,
|
|
82004
82042
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82005
|
-
nodeVisitor(node.name, visitor, isModuleName),
|
|
82043
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
82006
82044
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
82007
82045
|
);
|
|
82008
82046
|
},
|
|
@@ -82021,7 +82059,7 @@ var visitEachChildTable = {
|
|
|
82021
82059
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82022
82060
|
return context.factory.updateNamespaceExportDeclaration(
|
|
82023
82061
|
node,
|
|
82024
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82062
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82025
82063
|
);
|
|
82026
82064
|
},
|
|
82027
82065
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82029,8 +82067,8 @@ var visitEachChildTable = {
|
|
|
82029
82067
|
node,
|
|
82030
82068
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82031
82069
|
node.isTypeOnly,
|
|
82032
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82033
|
-
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
82070
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82071
|
+
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
82034
82072
|
);
|
|
82035
82073
|
},
|
|
82036
82074
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82038,7 +82076,7 @@ var visitEachChildTable = {
|
|
|
82038
82076
|
node,
|
|
82039
82077
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82040
82078
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
82041
|
-
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
82079
|
+
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
82042
82080
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
82043
82081
|
);
|
|
82044
82082
|
},
|
|
@@ -82052,8 +82090,8 @@ var visitEachChildTable = {
|
|
|
82052
82090
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82053
82091
|
return context.factory.updateAssertEntry(
|
|
82054
82092
|
node,
|
|
82055
|
-
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
82056
|
-
nodeVisitor(node.value, visitor, isExpression)
|
|
82093
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
|
|
82094
|
+
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
82057
82095
|
);
|
|
82058
82096
|
},
|
|
82059
82097
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82067,13 +82105,13 @@ var visitEachChildTable = {
|
|
|
82067
82105
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82068
82106
|
return context.factory.updateNamespaceImport(
|
|
82069
82107
|
node,
|
|
82070
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82108
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82071
82109
|
);
|
|
82072
82110
|
},
|
|
82073
82111
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82074
82112
|
return context.factory.updateNamespaceExport(
|
|
82075
82113
|
node,
|
|
82076
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82114
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82077
82115
|
);
|
|
82078
82116
|
},
|
|
82079
82117
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -82087,14 +82125,14 @@ var visitEachChildTable = {
|
|
|
82087
82125
|
node,
|
|
82088
82126
|
node.isTypeOnly,
|
|
82089
82127
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
82090
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82128
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82091
82129
|
);
|
|
82092
82130
|
},
|
|
82093
82131
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82094
82132
|
return context.factory.updateExportAssignment(
|
|
82095
82133
|
node,
|
|
82096
82134
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82097
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82135
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82098
82136
|
);
|
|
82099
82137
|
},
|
|
82100
82138
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82118,59 +82156,59 @@ var visitEachChildTable = {
|
|
|
82118
82156
|
node,
|
|
82119
82157
|
node.isTypeOnly,
|
|
82120
82158
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
82121
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82159
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82122
82160
|
);
|
|
82123
82161
|
},
|
|
82124
82162
|
// Module references
|
|
82125
82163
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82126
82164
|
return context.factory.updateExternalModuleReference(
|
|
82127
82165
|
node,
|
|
82128
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82166
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82129
82167
|
);
|
|
82130
82168
|
},
|
|
82131
82169
|
// JSX
|
|
82132
82170
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82133
82171
|
return context.factory.updateJsxElement(
|
|
82134
82172
|
node,
|
|
82135
|
-
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
82173
|
+
Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
|
|
82136
82174
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
82137
|
-
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
82175
|
+
Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
|
|
82138
82176
|
);
|
|
82139
82177
|
},
|
|
82140
82178
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82141
82179
|
return context.factory.updateJsxSelfClosingElement(
|
|
82142
82180
|
node,
|
|
82143
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
82181
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
82144
82182
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
82145
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
82183
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
82146
82184
|
);
|
|
82147
82185
|
},
|
|
82148
82186
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82149
82187
|
return context.factory.updateJsxOpeningElement(
|
|
82150
82188
|
node,
|
|
82151
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
82189
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
82152
82190
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
82153
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
82191
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
82154
82192
|
);
|
|
82155
82193
|
},
|
|
82156
82194
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82157
82195
|
return context.factory.updateJsxClosingElement(
|
|
82158
82196
|
node,
|
|
82159
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
82197
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
|
|
82160
82198
|
);
|
|
82161
82199
|
},
|
|
82162
82200
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82163
82201
|
return context.factory.updateJsxFragment(
|
|
82164
82202
|
node,
|
|
82165
|
-
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
82203
|
+
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
|
82166
82204
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
82167
|
-
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
82205
|
+
Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
|
|
82168
82206
|
);
|
|
82169
82207
|
},
|
|
82170
82208
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82171
82209
|
return context.factory.updateJsxAttribute(
|
|
82172
82210
|
node,
|
|
82173
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82211
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82174
82212
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
82175
82213
|
);
|
|
82176
82214
|
},
|
|
@@ -82183,20 +82221,20 @@ var visitEachChildTable = {
|
|
|
82183
82221
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82184
82222
|
return context.factory.updateJsxSpreadAttribute(
|
|
82185
82223
|
node,
|
|
82186
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82224
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82187
82225
|
);
|
|
82188
82226
|
},
|
|
82189
82227
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82190
82228
|
return context.factory.updateJsxExpression(
|
|
82191
82229
|
node,
|
|
82192
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82230
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82193
82231
|
);
|
|
82194
82232
|
},
|
|
82195
82233
|
// Clauses
|
|
82196
82234
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82197
82235
|
return context.factory.updateCaseClause(
|
|
82198
82236
|
node,
|
|
82199
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
82237
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
82200
82238
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
82201
82239
|
);
|
|
82202
82240
|
},
|
|
@@ -82216,35 +82254,35 @@ var visitEachChildTable = {
|
|
|
82216
82254
|
return context.factory.updateCatchClause(
|
|
82217
82255
|
node,
|
|
82218
82256
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
82219
|
-
nodeVisitor(node.block, visitor, isBlock)
|
|
82257
|
+
Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
|
|
82220
82258
|
);
|
|
82221
82259
|
},
|
|
82222
82260
|
// Property assignments
|
|
82223
82261
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82224
82262
|
return context.factory.updatePropertyAssignment(
|
|
82225
82263
|
node,
|
|
82226
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
82227
|
-
nodeVisitor(node.initializer, visitor, isExpression)
|
|
82264
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
82265
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
|
|
82228
82266
|
);
|
|
82229
82267
|
},
|
|
82230
82268
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82231
82269
|
return context.factory.updateShorthandPropertyAssignment(
|
|
82232
82270
|
node,
|
|
82233
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82271
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82234
82272
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
82235
82273
|
);
|
|
82236
82274
|
},
|
|
82237
82275
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82238
82276
|
return context.factory.updateSpreadAssignment(
|
|
82239
82277
|
node,
|
|
82240
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82278
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82241
82279
|
);
|
|
82242
82280
|
},
|
|
82243
82281
|
// Enum
|
|
82244
82282
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82245
82283
|
return context.factory.updateEnumMember(
|
|
82246
82284
|
node,
|
|
82247
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
82285
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
82248
82286
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
82249
82287
|
);
|
|
82250
82288
|
},
|
|
@@ -82259,7 +82297,7 @@ var visitEachChildTable = {
|
|
|
82259
82297
|
[355 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82260
82298
|
return context.factory.updatePartiallyEmittedExpression(
|
|
82261
82299
|
node,
|
|
82262
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82300
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82263
82301
|
);
|
|
82264
82302
|
},
|
|
82265
82303
|
[356 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -83045,7 +83083,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83045
83083
|
location = node = value;
|
|
83046
83084
|
value = node.right;
|
|
83047
83085
|
} else {
|
|
83048
|
-
return visitNode(value, visitor, isExpression);
|
|
83086
|
+
return Debug.checkDefined(visitNode(value, visitor, isExpression));
|
|
83049
83087
|
}
|
|
83050
83088
|
}
|
|
83051
83089
|
}
|
|
@@ -83064,6 +83102,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83064
83102
|
};
|
|
83065
83103
|
if (value) {
|
|
83066
83104
|
value = visitNode(value, visitor, isExpression);
|
|
83105
|
+
Debug.assert(value);
|
|
83067
83106
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
83068
83107
|
value = ensureIdentifier(
|
|
83069
83108
|
flattenContext,
|
|
@@ -83105,7 +83144,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83105
83144
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
83106
83145
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
83107
83146
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
83108
|
-
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
83147
|
+
context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
|
|
83109
83148
|
location2
|
|
83110
83149
|
);
|
|
83111
83150
|
expression.original = original;
|
|
@@ -83162,7 +83201,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
|
|
|
83162
83201
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
83163
83202
|
initializer = ensureIdentifier(
|
|
83164
83203
|
flattenContext,
|
|
83165
|
-
visitNode(initializer, flattenContext.visitor),
|
|
83204
|
+
Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
|
|
83166
83205
|
/*reuseIdentifierExpressions*/
|
|
83167
83206
|
false,
|
|
83168
83207
|
initializer
|
|
@@ -83283,7 +83322,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent, pattern
|
|
|
83283
83322
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
83284
83323
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
83285
83324
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
83286
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
83325
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
|
|
83287
83326
|
} else {
|
|
83288
83327
|
if (bindingElements) {
|
|
83289
83328
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -83421,7 +83460,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
|
|
|
83421
83460
|
if (isComputedPropertyName(propertyName)) {
|
|
83422
83461
|
const argumentExpression = ensureIdentifier(
|
|
83423
83462
|
flattenContext,
|
|
83424
|
-
visitNode(propertyName.expression, flattenContext.visitor),
|
|
83463
|
+
Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
|
|
83425
83464
|
/*reuseIdentifierExpressions*/
|
|
83426
83465
|
false,
|
|
83427
83466
|
/*location*/
|
|
@@ -83464,6 +83503,7 @@ function makeArrayBindingPattern(factory2, elements) {
|
|
|
83464
83503
|
return factory2.createArrayBindingPattern(elements);
|
|
83465
83504
|
}
|
|
83466
83505
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
83506
|
+
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
83467
83507
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
83468
83508
|
}
|
|
83469
83509
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -83471,6 +83511,7 @@ function makeObjectBindingPattern(factory2, elements) {
|
|
|
83471
83511
|
return factory2.createObjectBindingPattern(elements);
|
|
83472
83512
|
}
|
|
83473
83513
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
83514
|
+
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
83474
83515
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
83475
83516
|
}
|
|
83476
83517
|
function makeBindingElement(factory2, name) {
|
|
@@ -83489,6 +83530,7 @@ function makeAssignmentElement(name) {
|
|
|
83489
83530
|
// src/compiler/transformers/taggedTemplate.ts
|
|
83490
83531
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
83491
83532
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
83533
|
+
Debug.assert(tag);
|
|
83492
83534
|
const templateArguments = [void 0];
|
|
83493
83535
|
const cookedStrings = [];
|
|
83494
83536
|
const rawStrings = [];
|
|
@@ -83505,7 +83547,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
|
|
|
83505
83547
|
for (const templateSpan of template.templateSpans) {
|
|
83506
83548
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
83507
83549
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
83508
|
-
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
83550
|
+
templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
|
|
83509
83551
|
}
|
|
83510
83552
|
}
|
|
83511
83553
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -83878,7 +83920,7 @@ function transformTypeScript(context) {
|
|
|
83878
83920
|
function visitObjectLiteralExpression(node) {
|
|
83879
83921
|
return factory2.updateObjectLiteralExpression(
|
|
83880
83922
|
node,
|
|
83881
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
83923
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
|
|
83882
83924
|
);
|
|
83883
83925
|
}
|
|
83884
83926
|
function getClassFacts(node, staticProperties) {
|
|
@@ -84076,6 +84118,7 @@ function transformTypeScript(context) {
|
|
|
84076
84118
|
const decorators = [];
|
|
84077
84119
|
for (const parameterDecorator of parameterDecorators) {
|
|
84078
84120
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
84121
|
+
Debug.assert(expression);
|
|
84079
84122
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
84080
84123
|
setTextRange(helper, parameterDecorator.expression);
|
|
84081
84124
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -84199,6 +84242,7 @@ function transformTypeScript(context) {
|
|
|
84199
84242
|
const name = member.name;
|
|
84200
84243
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
84201
84244
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
84245
|
+
Debug.assert(expression);
|
|
84202
84246
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
84203
84247
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
84204
84248
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -84206,7 +84250,7 @@ function transformTypeScript(context) {
|
|
|
84206
84250
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
84207
84251
|
}
|
|
84208
84252
|
}
|
|
84209
|
-
return visitNode(name, visitor, isPropertyName);
|
|
84253
|
+
return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
|
|
84210
84254
|
}
|
|
84211
84255
|
function visitHeritageClause(node) {
|
|
84212
84256
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -84217,7 +84261,7 @@ function transformTypeScript(context) {
|
|
|
84217
84261
|
function visitExpressionWithTypeArguments(node) {
|
|
84218
84262
|
return factory2.updateExpressionWithTypeArguments(
|
|
84219
84263
|
node,
|
|
84220
|
-
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
84264
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
84221
84265
|
/*typeArguments*/
|
|
84222
84266
|
void 0
|
|
84223
84267
|
);
|
|
@@ -84236,7 +84280,7 @@ function transformTypeScript(context) {
|
|
|
84236
84280
|
return factory2.updatePropertyDeclaration(
|
|
84237
84281
|
node,
|
|
84238
84282
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
84239
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
84283
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
84240
84284
|
/*questionOrExclamationToken*/
|
|
84241
84285
|
void 0,
|
|
84242
84286
|
/*type*/
|
|
@@ -84253,7 +84297,7 @@ function transformTypeScript(context) {
|
|
|
84253
84297
|
void 0,
|
|
84254
84298
|
/*type*/
|
|
84255
84299
|
void 0,
|
|
84256
|
-
visitNode(node.initializer, visitor)
|
|
84300
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
84257
84301
|
);
|
|
84258
84302
|
}
|
|
84259
84303
|
function visitConstructor(node) {
|
|
@@ -84472,7 +84516,7 @@ function transformTypeScript(context) {
|
|
|
84472
84516
|
elideNodes(factory2, node.modifiers),
|
|
84473
84517
|
// preserve positions, if available
|
|
84474
84518
|
node.dotDotDotToken,
|
|
84475
|
-
visitNode(node.name, visitor, isBindingName),
|
|
84519
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
84476
84520
|
/*questionToken*/
|
|
84477
84521
|
void 0,
|
|
84478
84522
|
/*type*/
|
|
@@ -84521,7 +84565,7 @@ function transformTypeScript(context) {
|
|
|
84521
84565
|
return setTextRange(
|
|
84522
84566
|
factory2.createAssignment(
|
|
84523
84567
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
84524
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
84568
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
84525
84569
|
),
|
|
84526
84570
|
/*location*/
|
|
84527
84571
|
node
|
|
@@ -84531,7 +84575,7 @@ function transformTypeScript(context) {
|
|
|
84531
84575
|
function visitVariableDeclaration(node) {
|
|
84532
84576
|
const updated = factory2.updateVariableDeclaration(
|
|
84533
84577
|
node,
|
|
84534
|
-
visitNode(node.name, visitor, isBindingName),
|
|
84578
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
84535
84579
|
/*exclamationToken*/
|
|
84536
84580
|
void 0,
|
|
84537
84581
|
/*type*/
|
|
@@ -84547,26 +84591,30 @@ function transformTypeScript(context) {
|
|
|
84547
84591
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
84548
84592
|
if (isAssertionExpression(innerExpression)) {
|
|
84549
84593
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84594
|
+
Debug.assert(expression);
|
|
84550
84595
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84551
84596
|
}
|
|
84552
84597
|
return visitEachChild(node, visitor, context);
|
|
84553
84598
|
}
|
|
84554
84599
|
function visitAssertionExpression(node) {
|
|
84555
84600
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84601
|
+
Debug.assert(expression);
|
|
84556
84602
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84557
84603
|
}
|
|
84558
84604
|
function visitNonNullExpression(node) {
|
|
84559
84605
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
84606
|
+
Debug.assert(expression);
|
|
84560
84607
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84561
84608
|
}
|
|
84562
84609
|
function visitSatisfiesExpression(node) {
|
|
84563
84610
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84611
|
+
Debug.assert(expression);
|
|
84564
84612
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84565
84613
|
}
|
|
84566
84614
|
function visitCallExpression(node) {
|
|
84567
84615
|
return factory2.updateCallExpression(
|
|
84568
84616
|
node,
|
|
84569
|
-
visitNode(node.expression, visitor, isExpression),
|
|
84617
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
84570
84618
|
/*typeArguments*/
|
|
84571
84619
|
void 0,
|
|
84572
84620
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -84575,7 +84623,7 @@ function transformTypeScript(context) {
|
|
|
84575
84623
|
function visitNewExpression(node) {
|
|
84576
84624
|
return factory2.updateNewExpression(
|
|
84577
84625
|
node,
|
|
84578
|
-
visitNode(node.expression, visitor, isExpression),
|
|
84626
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
84579
84627
|
/*typeArguments*/
|
|
84580
84628
|
void 0,
|
|
84581
84629
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -84584,28 +84632,28 @@ function transformTypeScript(context) {
|
|
|
84584
84632
|
function visitTaggedTemplateExpression(node) {
|
|
84585
84633
|
return factory2.updateTaggedTemplateExpression(
|
|
84586
84634
|
node,
|
|
84587
|
-
visitNode(node.tag, visitor, isExpression),
|
|
84635
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
84588
84636
|
/*typeArguments*/
|
|
84589
84637
|
void 0,
|
|
84590
|
-
visitNode(node.template, visitor,
|
|
84638
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
84591
84639
|
);
|
|
84592
84640
|
}
|
|
84593
84641
|
function visitJsxSelfClosingElement(node) {
|
|
84594
84642
|
return factory2.updateJsxSelfClosingElement(
|
|
84595
84643
|
node,
|
|
84596
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
84644
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84597
84645
|
/*typeArguments*/
|
|
84598
84646
|
void 0,
|
|
84599
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
84647
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
84600
84648
|
);
|
|
84601
84649
|
}
|
|
84602
84650
|
function visitJsxJsxOpeningElement(node) {
|
|
84603
84651
|
return factory2.updateJsxOpeningElement(
|
|
84604
84652
|
node,
|
|
84605
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
84653
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84606
84654
|
/*typeArguments*/
|
|
84607
84655
|
void 0,
|
|
84608
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
84656
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
84609
84657
|
);
|
|
84610
84658
|
}
|
|
84611
84659
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -84751,7 +84799,7 @@ function transformTypeScript(context) {
|
|
|
84751
84799
|
} else {
|
|
84752
84800
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
84753
84801
|
if (member.initializer) {
|
|
84754
|
-
return visitNode(member.initializer, visitor, isExpression);
|
|
84802
|
+
return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
|
|
84755
84803
|
} else {
|
|
84756
84804
|
return factory2.createVoidZero();
|
|
84757
84805
|
}
|
|
@@ -85032,7 +85080,7 @@ function transformTypeScript(context) {
|
|
|
85032
85080
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
85033
85081
|
}
|
|
85034
85082
|
function visitNamespaceExports(node) {
|
|
85035
|
-
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
85083
|
+
return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
|
|
85036
85084
|
}
|
|
85037
85085
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
85038
85086
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -85504,6 +85552,7 @@ function transformClassFields(context) {
|
|
|
85504
85552
|
const info = accessPrivateIdentifier(node.left);
|
|
85505
85553
|
if (info) {
|
|
85506
85554
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
85555
|
+
Debug.assert(receiver);
|
|
85507
85556
|
return setOriginalNode(
|
|
85508
85557
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
85509
85558
|
node
|
|
@@ -85521,6 +85570,7 @@ function transformClassFields(context) {
|
|
|
85521
85570
|
}
|
|
85522
85571
|
function visitComputedPropertyName(node) {
|
|
85523
85572
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
85573
|
+
Debug.assert(expression);
|
|
85524
85574
|
if (some(pendingExpressions)) {
|
|
85525
85575
|
if (isParenthesizedExpression(expression)) {
|
|
85526
85576
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -85602,6 +85652,7 @@ function transformClassFields(context) {
|
|
|
85602
85652
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
85603
85653
|
setSourceMapRange(temp, name.expression);
|
|
85604
85654
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
85655
|
+
Debug.assert(expression);
|
|
85605
85656
|
const assignment = factory2.createAssignment(temp, expression);
|
|
85606
85657
|
setSourceMapRange(assignment, name.expression);
|
|
85607
85658
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -85684,7 +85735,7 @@ function transformClassFields(context) {
|
|
|
85684
85735
|
return transformFieldInitializer(node);
|
|
85685
85736
|
}
|
|
85686
85737
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
85687
|
-
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
85738
|
+
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
|
|
85688
85739
|
}
|
|
85689
85740
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
85690
85741
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -85754,7 +85805,7 @@ function transformClassFields(context) {
|
|
|
85754
85805
|
if (classConstructor && superClassReference) {
|
|
85755
85806
|
const superProperty = factory2.createReflectGetCall(
|
|
85756
85807
|
superClassReference,
|
|
85757
|
-
visitNode(node.argumentExpression, visitor, isExpression),
|
|
85808
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
|
|
85758
85809
|
classConstructor
|
|
85759
85810
|
);
|
|
85760
85811
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -85771,6 +85822,7 @@ function transformClassFields(context) {
|
|
|
85771
85822
|
let info;
|
|
85772
85823
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
85773
85824
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
85825
|
+
Debug.assert(receiver);
|
|
85774
85826
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
85775
85827
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
85776
85828
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -85807,7 +85859,7 @@ function transformClassFields(context) {
|
|
|
85807
85859
|
getterName = setterName = operand.argumentExpression;
|
|
85808
85860
|
} else {
|
|
85809
85861
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
85810
|
-
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
85862
|
+
setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
|
|
85811
85863
|
}
|
|
85812
85864
|
}
|
|
85813
85865
|
if (setterName && getterName) {
|
|
@@ -85841,7 +85893,7 @@ function transformClassFields(context) {
|
|
|
85841
85893
|
function visitExpressionStatement(node) {
|
|
85842
85894
|
return factory2.updateExpressionStatement(
|
|
85843
85895
|
node,
|
|
85844
|
-
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
85896
|
+
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
|
|
85845
85897
|
);
|
|
85846
85898
|
}
|
|
85847
85899
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -85859,25 +85911,25 @@ function transformClassFields(context) {
|
|
|
85859
85911
|
if (isCallChain(node)) {
|
|
85860
85912
|
return factory2.updateCallChain(
|
|
85861
85913
|
node,
|
|
85862
|
-
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
85914
|
+
factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
|
|
85863
85915
|
/*questionDotToken*/
|
|
85864
85916
|
void 0,
|
|
85865
85917
|
/*typeArguments*/
|
|
85866
85918
|
void 0,
|
|
85867
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85919
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85868
85920
|
);
|
|
85869
85921
|
}
|
|
85870
85922
|
return factory2.updateCallExpression(
|
|
85871
85923
|
node,
|
|
85872
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
85924
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
|
|
85873
85925
|
/*typeArguments*/
|
|
85874
85926
|
void 0,
|
|
85875
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85927
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85876
85928
|
);
|
|
85877
85929
|
}
|
|
85878
85930
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
85879
85931
|
const invocation = factory2.createFunctionCallCall(
|
|
85880
|
-
visitNode(node.expression, visitor, isExpression),
|
|
85932
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
85881
85933
|
currentClassLexicalEnvironment.classConstructor,
|
|
85882
85934
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
85883
85935
|
);
|
|
@@ -85893,19 +85945,19 @@ function transformClassFields(context) {
|
|
|
85893
85945
|
return factory2.updateTaggedTemplateExpression(
|
|
85894
85946
|
node,
|
|
85895
85947
|
factory2.createCallExpression(
|
|
85896
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
85948
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
|
|
85897
85949
|
/*typeArguments*/
|
|
85898
85950
|
void 0,
|
|
85899
|
-
[visitNode(thisArg, visitor, isExpression)]
|
|
85951
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
|
|
85900
85952
|
),
|
|
85901
85953
|
/*typeArguments*/
|
|
85902
85954
|
void 0,
|
|
85903
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
85955
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
85904
85956
|
);
|
|
85905
85957
|
}
|
|
85906
85958
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
85907
85959
|
const invocation = factory2.createFunctionBindCall(
|
|
85908
|
-
visitNode(node.tag, visitor, isExpression),
|
|
85960
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
85909
85961
|
currentClassLexicalEnvironment.classConstructor,
|
|
85910
85962
|
[]
|
|
85911
85963
|
);
|
|
@@ -85916,7 +85968,7 @@ function transformClassFields(context) {
|
|
|
85916
85968
|
invocation,
|
|
85917
85969
|
/*typeArguments*/
|
|
85918
85970
|
void 0,
|
|
85919
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
85971
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
85920
85972
|
);
|
|
85921
85973
|
}
|
|
85922
85974
|
return visitEachChild(node, visitor, context);
|
|
@@ -85946,9 +85998,9 @@ function transformClassFields(context) {
|
|
|
85946
85998
|
pendingExpressions = void 0;
|
|
85947
85999
|
node = factory2.updateBinaryExpression(
|
|
85948
86000
|
node,
|
|
85949
|
-
visitNode(node.left, assignmentTargetVisitor),
|
|
86001
|
+
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
|
|
85950
86002
|
node.operatorToken,
|
|
85951
|
-
visitNode(node.right, visitor)
|
|
86003
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
85952
86004
|
);
|
|
85953
86005
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
85954
86006
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -85973,7 +86025,7 @@ function transformClassFields(context) {
|
|
|
85973
86025
|
node,
|
|
85974
86026
|
visitInvalidSuperProperty(node.left),
|
|
85975
86027
|
node.operatorToken,
|
|
85976
|
-
visitNode(node.right, visitor, isExpression)
|
|
86028
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
85977
86029
|
);
|
|
85978
86030
|
}
|
|
85979
86031
|
if (classConstructor && superClassReference) {
|
|
@@ -85993,6 +86045,7 @@ function transformClassFields(context) {
|
|
|
85993
86045
|
);
|
|
85994
86046
|
setOriginalNode(superPropertyGet, node.left);
|
|
85995
86047
|
setTextRange(superPropertyGet, node.left);
|
|
86048
|
+
Debug.assert(expression);
|
|
85996
86049
|
expression = factory2.createBinaryExpression(
|
|
85997
86050
|
superPropertyGet,
|
|
85998
86051
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -86002,9 +86055,11 @@ function transformClassFields(context) {
|
|
|
86002
86055
|
}
|
|
86003
86056
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
86004
86057
|
if (temp) {
|
|
86058
|
+
Debug.assert(expression);
|
|
86005
86059
|
expression = factory2.createAssignment(temp, expression);
|
|
86006
86060
|
setTextRange(temp, node);
|
|
86007
86061
|
}
|
|
86062
|
+
Debug.assert(expression);
|
|
86008
86063
|
expression = factory2.createReflectSetCall(
|
|
86009
86064
|
superClassReference,
|
|
86010
86065
|
setterName,
|
|
@@ -86028,8 +86083,8 @@ function transformClassFields(context) {
|
|
|
86028
86083
|
return visitEachChild(node, visitor, context);
|
|
86029
86084
|
}
|
|
86030
86085
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
86031
|
-
receiver = visitNode(receiver, visitor, isExpression);
|
|
86032
|
-
right = visitNode(right, visitor, isExpression);
|
|
86086
|
+
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
|
|
86087
|
+
right = Debug.checkDefined(visitNode(right, visitor, isExpression));
|
|
86033
86088
|
if (isCompoundAssignment(operator)) {
|
|
86034
86089
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
86035
86090
|
receiver = initializeExpression || readExpression;
|
|
@@ -86132,7 +86187,7 @@ function transformClassFields(context) {
|
|
|
86132
86187
|
node,
|
|
86133
86188
|
factory2.createAssignment(
|
|
86134
86189
|
temp,
|
|
86135
|
-
visitNode(node.expression, visitor, isExpression)
|
|
86190
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
86136
86191
|
),
|
|
86137
86192
|
/*typeArguments*/
|
|
86138
86193
|
void 0
|
|
@@ -86694,7 +86749,7 @@ function transformClassFields(context) {
|
|
|
86694
86749
|
) : factory2.updateElementAccessExpression(
|
|
86695
86750
|
node,
|
|
86696
86751
|
factory2.createVoidZero(),
|
|
86697
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
86752
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
86698
86753
|
);
|
|
86699
86754
|
}
|
|
86700
86755
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -86811,6 +86866,7 @@ function transformClassFields(context) {
|
|
|
86811
86866
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
86812
86867
|
if (isComputedPropertyName(name)) {
|
|
86813
86868
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
86869
|
+
Debug.assert(expression);
|
|
86814
86870
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
86815
86871
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
86816
86872
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -87032,7 +87088,7 @@ function transformClassFields(context) {
|
|
|
87032
87088
|
/*reservedInNestedScopes*/
|
|
87033
87089
|
true
|
|
87034
87090
|
);
|
|
87035
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
87091
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
87036
87092
|
}
|
|
87037
87093
|
return factory2.createAssignmentTargetWrapper(
|
|
87038
87094
|
parameter,
|
|
@@ -87045,6 +87101,7 @@ function transformClassFields(context) {
|
|
|
87045
87101
|
);
|
|
87046
87102
|
}
|
|
87047
87103
|
function visitArrayAssignmentTarget(node) {
|
|
87104
|
+
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
87048
87105
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
87049
87106
|
if (target) {
|
|
87050
87107
|
let wrapped;
|
|
@@ -87079,7 +87136,7 @@ function transformClassFields(context) {
|
|
|
87079
87136
|
node,
|
|
87080
87137
|
wrapped,
|
|
87081
87138
|
node.operatorToken,
|
|
87082
|
-
visitNode(node.right, visitor, isExpression)
|
|
87139
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
87083
87140
|
);
|
|
87084
87141
|
} else if (isSpreadElement(node)) {
|
|
87085
87142
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -87125,14 +87182,14 @@ function transformClassFields(context) {
|
|
|
87125
87182
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
87126
87183
|
return factory2.updatePropertyAssignment(
|
|
87127
87184
|
node,
|
|
87128
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87129
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
87185
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87186
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
|
|
87130
87187
|
);
|
|
87131
87188
|
}
|
|
87132
87189
|
if (isSpreadAssignment(node)) {
|
|
87133
87190
|
return factory2.updateSpreadAssignment(
|
|
87134
87191
|
node,
|
|
87135
|
-
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
87192
|
+
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
|
|
87136
87193
|
);
|
|
87137
87194
|
}
|
|
87138
87195
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -87746,7 +87803,7 @@ function transformLegacyDecorators(context) {
|
|
|
87746
87803
|
return factory2.updateConstructorDeclaration(
|
|
87747
87804
|
node,
|
|
87748
87805
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87749
|
-
visitNodes2(node.parameters, visitor,
|
|
87806
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87750
87807
|
visitNode(node.body, visitor, isBlock)
|
|
87751
87808
|
);
|
|
87752
87809
|
}
|
|
@@ -87762,12 +87819,12 @@ function transformLegacyDecorators(context) {
|
|
|
87762
87819
|
node,
|
|
87763
87820
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87764
87821
|
node.asteriskToken,
|
|
87765
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87822
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87766
87823
|
/*questionToken*/
|
|
87767
87824
|
void 0,
|
|
87768
87825
|
/*typeParameters*/
|
|
87769
87826
|
void 0,
|
|
87770
|
-
visitNodes2(node.parameters, visitor,
|
|
87827
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87771
87828
|
/*type*/
|
|
87772
87829
|
void 0,
|
|
87773
87830
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -87777,8 +87834,8 @@ function transformLegacyDecorators(context) {
|
|
|
87777
87834
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
87778
87835
|
node,
|
|
87779
87836
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87780
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87781
|
-
visitNodes2(node.parameters, visitor,
|
|
87837
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87838
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87782
87839
|
/*type*/
|
|
87783
87840
|
void 0,
|
|
87784
87841
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -87788,8 +87845,8 @@ function transformLegacyDecorators(context) {
|
|
|
87788
87845
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
87789
87846
|
node,
|
|
87790
87847
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87791
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87792
|
-
visitNodes2(node.parameters, visitor,
|
|
87848
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87849
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87793
87850
|
visitNode(node.body, visitor, isBlock)
|
|
87794
87851
|
), node);
|
|
87795
87852
|
}
|
|
@@ -87800,7 +87857,7 @@ function transformLegacyDecorators(context) {
|
|
|
87800
87857
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
87801
87858
|
node,
|
|
87802
87859
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87803
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87860
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87804
87861
|
/*questionOrExclamationToken*/
|
|
87805
87862
|
void 0,
|
|
87806
87863
|
/*type*/
|
|
@@ -87813,7 +87870,7 @@ function transformLegacyDecorators(context) {
|
|
|
87813
87870
|
node,
|
|
87814
87871
|
elideNodes(factory2, node.modifiers),
|
|
87815
87872
|
node.dotDotDotToken,
|
|
87816
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87873
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87817
87874
|
/*questionToken*/
|
|
87818
87875
|
void 0,
|
|
87819
87876
|
/*type*/
|
|
@@ -87910,7 +87967,7 @@ function transformLegacyDecorators(context) {
|
|
|
87910
87967
|
return expression;
|
|
87911
87968
|
}
|
|
87912
87969
|
function transformDecorator(decorator) {
|
|
87913
|
-
return visitNode(decorator.expression, visitor, isExpression);
|
|
87970
|
+
return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
|
|
87914
87971
|
}
|
|
87915
87972
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
87916
87973
|
let expressions;
|
|
@@ -88176,21 +88233,21 @@ function transformES2017(context) {
|
|
|
88176
88233
|
node.initializer,
|
|
88177
88234
|
/*hasReceiver*/
|
|
88178
88235
|
true
|
|
88179
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
88180
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88236
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
88237
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88181
88238
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
88182
88239
|
);
|
|
88183
88240
|
}
|
|
88184
88241
|
function visitForOfStatementInAsyncBody(node) {
|
|
88185
88242
|
return factory2.updateForOfStatement(
|
|
88186
88243
|
node,
|
|
88187
|
-
visitNode(node.awaitModifier, visitor,
|
|
88244
|
+
visitNode(node.awaitModifier, visitor, isAwaitKeyword),
|
|
88188
88245
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
88189
88246
|
node.initializer,
|
|
88190
88247
|
/*hasReceiver*/
|
|
88191
88248
|
true
|
|
88192
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
88193
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88249
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
88250
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88194
88251
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
88195
88252
|
);
|
|
88196
88253
|
}
|
|
@@ -88227,7 +88284,7 @@ function transformES2017(context) {
|
|
|
88227
88284
|
function visitConstructorDeclaration(node) {
|
|
88228
88285
|
return factory2.updateConstructorDeclaration(
|
|
88229
88286
|
node,
|
|
88230
|
-
visitNodes2(node.modifiers, visitor,
|
|
88287
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88231
88288
|
visitParameterList(node.parameters, visitor, context),
|
|
88232
88289
|
transformMethodBody(node)
|
|
88233
88290
|
);
|
|
@@ -88285,7 +88342,7 @@ function transformES2017(context) {
|
|
|
88285
88342
|
function visitFunctionExpression(node) {
|
|
88286
88343
|
return factory2.updateFunctionExpression(
|
|
88287
88344
|
node,
|
|
88288
|
-
visitNodes2(node.modifiers, visitor,
|
|
88345
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88289
88346
|
node.asteriskToken,
|
|
88290
88347
|
node.name,
|
|
88291
88348
|
/*typeParameters*/
|
|
@@ -88299,7 +88356,7 @@ function transformES2017(context) {
|
|
|
88299
88356
|
function visitArrowFunction(node) {
|
|
88300
88357
|
return factory2.updateArrowFunction(
|
|
88301
88358
|
node,
|
|
88302
|
-
visitNodes2(node.modifiers, visitor,
|
|
88359
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88303
88360
|
/*typeParameters*/
|
|
88304
88361
|
void 0,
|
|
88305
88362
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -88356,7 +88413,7 @@ function transformES2017(context) {
|
|
|
88356
88413
|
),
|
|
88357
88414
|
node
|
|
88358
88415
|
);
|
|
88359
|
-
return visitNode(converted, visitor, isExpression);
|
|
88416
|
+
return Debug.checkDefined(visitNode(converted, visitor, isExpression));
|
|
88360
88417
|
}
|
|
88361
88418
|
function collidesWithParameterName({ name }) {
|
|
88362
88419
|
if (isIdentifier(name)) {
|
|
@@ -88488,7 +88545,7 @@ function transformES2017(context) {
|
|
|
88488
88545
|
if (isBlock(body)) {
|
|
88489
88546
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));
|
|
88490
88547
|
} else {
|
|
88491
|
-
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
88548
|
+
return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
|
|
88492
88549
|
}
|
|
88493
88550
|
}
|
|
88494
88551
|
function getPromiseConstructor(type) {
|
|
@@ -89601,7 +89658,7 @@ function transformES2018(context) {
|
|
|
89601
89658
|
/*questionToken*/
|
|
89602
89659
|
void 0,
|
|
89603
89660
|
visitor,
|
|
89604
|
-
|
|
89661
|
+
isQuestionToken
|
|
89605
89662
|
),
|
|
89606
89663
|
/*typeParameters*/
|
|
89607
89664
|
void 0,
|
|
@@ -90729,7 +90786,7 @@ function transformJsx(context) {
|
|
|
90729
90786
|
return element;
|
|
90730
90787
|
}
|
|
90731
90788
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
90732
|
-
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
90789
|
+
return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
90733
90790
|
}
|
|
90734
90791
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
90735
90792
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -90759,7 +90816,7 @@ function transformJsx(context) {
|
|
|
90759
90816
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
90760
90817
|
}
|
|
90761
90818
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
90762
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
90819
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
90763
90820
|
}
|
|
90764
90821
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
90765
90822
|
const name = getAttributeName(node);
|
|
@@ -90779,7 +90836,7 @@ function transformJsx(context) {
|
|
|
90779
90836
|
if (node.expression === void 0) {
|
|
90780
90837
|
return factory2.createTrue();
|
|
90781
90838
|
}
|
|
90782
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
90839
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
90783
90840
|
}
|
|
90784
90841
|
if (isJsxElement(node)) {
|
|
90785
90842
|
return visitJsxElement(
|
|
@@ -91524,7 +91581,7 @@ function transformES2015(context) {
|
|
|
91524
91581
|
[
|
|
91525
91582
|
factory2.createPropertyAssignment(
|
|
91526
91583
|
factory2.createIdentifier("value"),
|
|
91527
|
-
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
91584
|
+
node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
|
|
91528
91585
|
)
|
|
91529
91586
|
]
|
|
91530
91587
|
)
|
|
@@ -91695,7 +91752,7 @@ function transformES2015(context) {
|
|
|
91695
91752
|
outer,
|
|
91696
91753
|
/*typeArguments*/
|
|
91697
91754
|
void 0,
|
|
91698
|
-
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
91755
|
+
extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
|
|
91699
91756
|
)
|
|
91700
91757
|
);
|
|
91701
91758
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -92037,7 +92094,7 @@ function transformES2015(context) {
|
|
|
92037
92094
|
factory2.createExpressionStatement(
|
|
92038
92095
|
factory2.createAssignment(
|
|
92039
92096
|
factory2.getGeneratedNameForNode(parameter),
|
|
92040
|
-
visitNode(initializer, visitor, isExpression)
|
|
92097
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
92041
92098
|
)
|
|
92042
92099
|
),
|
|
92043
92100
|
2097152 /* CustomPrologue */
|
|
@@ -92048,7 +92105,7 @@ function transformES2015(context) {
|
|
|
92048
92105
|
return false;
|
|
92049
92106
|
}
|
|
92050
92107
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
92051
|
-
initializer = visitNode(initializer, visitor, isExpression);
|
|
92108
|
+
initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
92052
92109
|
const statement = factory2.createIfStatement(
|
|
92053
92110
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
92054
92111
|
setEmitFlags(
|
|
@@ -92324,6 +92381,7 @@ function transformES2015(context) {
|
|
|
92324
92381
|
container
|
|
92325
92382
|
);
|
|
92326
92383
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
92384
|
+
Debug.assert(propertyName);
|
|
92327
92385
|
let e;
|
|
92328
92386
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
92329
92387
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -92367,6 +92425,7 @@ function transformES2015(context) {
|
|
|
92367
92425
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
92368
92426
|
setSourceMapRange(target, firstAccessor.name);
|
|
92369
92427
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
92428
|
+
Debug.assert(visitedAccessorName);
|
|
92370
92429
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
92371
92430
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
92372
92431
|
}
|
|
@@ -92639,9 +92698,9 @@ function transformES2015(context) {
|
|
|
92639
92698
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
92640
92699
|
return factory2.updateBinaryExpression(
|
|
92641
92700
|
node,
|
|
92642
|
-
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
92701
|
+
Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
|
|
92643
92702
|
node.operatorToken,
|
|
92644
|
-
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
92703
|
+
Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
|
|
92645
92704
|
);
|
|
92646
92705
|
}
|
|
92647
92706
|
return visitEachChild(node, visitor, context);
|
|
@@ -92656,6 +92715,7 @@ function transformES2015(context) {
|
|
|
92656
92715
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
92657
92716
|
if (result || visited !== element) {
|
|
92658
92717
|
result || (result = node.elements.slice(0, i));
|
|
92718
|
+
Debug.assert(visited);
|
|
92659
92719
|
result.push(visited);
|
|
92660
92720
|
}
|
|
92661
92721
|
}
|
|
@@ -92682,7 +92742,7 @@ function transformES2015(context) {
|
|
|
92682
92742
|
0 /* All */
|
|
92683
92743
|
);
|
|
92684
92744
|
} else {
|
|
92685
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
92745
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
|
|
92686
92746
|
setTextRange(assignment, decl);
|
|
92687
92747
|
}
|
|
92688
92748
|
assignments = append(assignments, assignment);
|
|
@@ -92704,7 +92764,7 @@ function transformES2015(context) {
|
|
|
92704
92764
|
if (node.flags & 3 /* BlockScoped */) {
|
|
92705
92765
|
enableSubstitutionsForBlockScopedBindings();
|
|
92706
92766
|
}
|
|
92707
|
-
const declarations =
|
|
92767
|
+
const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
|
|
92708
92768
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
92709
92769
|
setOriginalNode(declarationList, node);
|
|
92710
92770
|
setTextRange(declarationList, node);
|
|
@@ -92788,7 +92848,7 @@ function transformES2015(context) {
|
|
|
92788
92848
|
statement,
|
|
92789
92849
|
/*outermostLabeledStatement*/
|
|
92790
92850
|
node
|
|
92791
|
-
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
92851
|
+
) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
|
|
92792
92852
|
}
|
|
92793
92853
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
92794
92854
|
switch (node.kind) {
|
|
@@ -92831,7 +92891,7 @@ function transformES2015(context) {
|
|
|
92831
92891
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
92832
92892
|
visitNode(node.condition, visitor, isExpression),
|
|
92833
92893
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
92834
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
92894
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
92835
92895
|
);
|
|
92836
92896
|
}
|
|
92837
92897
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -92917,13 +92977,14 @@ function transformES2015(context) {
|
|
|
92917
92977
|
)));
|
|
92918
92978
|
} else {
|
|
92919
92979
|
setTextRangeEnd(assignment, initializer.end);
|
|
92920
|
-
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
92980
|
+
statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
|
|
92921
92981
|
}
|
|
92922
92982
|
}
|
|
92923
92983
|
if (convertedLoopBodyStatements) {
|
|
92924
92984
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
92925
92985
|
} else {
|
|
92926
92986
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
92987
|
+
Debug.assert(statement);
|
|
92927
92988
|
if (isBlock(statement)) {
|
|
92928
92989
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
92929
92990
|
} else {
|
|
@@ -92944,6 +93005,7 @@ function transformES2015(context) {
|
|
|
92944
93005
|
}
|
|
92945
93006
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
92946
93007
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
93008
|
+
Debug.assert(expression);
|
|
92947
93009
|
const counter = factory2.createLoopVariable();
|
|
92948
93010
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
92949
93011
|
/*recordTempVariable*/
|
|
@@ -93003,6 +93065,7 @@ function transformES2015(context) {
|
|
|
93003
93065
|
}
|
|
93004
93066
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
93005
93067
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
93068
|
+
Debug.assert(expression);
|
|
93006
93069
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
93007
93070
|
/*recordTempVariable*/
|
|
93008
93071
|
void 0
|
|
@@ -93260,7 +93323,7 @@ function transformES2015(context) {
|
|
|
93260
93323
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
93261
93324
|
}
|
|
93262
93325
|
} else {
|
|
93263
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
93326
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
|
|
93264
93327
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
93265
93328
|
}
|
|
93266
93329
|
statements.push(loop);
|
|
@@ -93298,16 +93361,16 @@ function transformES2015(context) {
|
|
|
93298
93361
|
node,
|
|
93299
93362
|
/*awaitModifier*/
|
|
93300
93363
|
void 0,
|
|
93301
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
93302
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93364
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93365
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93303
93366
|
convertedLoopBody
|
|
93304
93367
|
);
|
|
93305
93368
|
}
|
|
93306
93369
|
function convertForInStatement(node, convertedLoopBody) {
|
|
93307
93370
|
return factory2.updateForInStatement(
|
|
93308
93371
|
node,
|
|
93309
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
93310
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93372
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93373
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93311
93374
|
convertedLoopBody
|
|
93312
93375
|
);
|
|
93313
93376
|
}
|
|
@@ -93315,13 +93378,13 @@ function transformES2015(context) {
|
|
|
93315
93378
|
return factory2.updateDoStatement(
|
|
93316
93379
|
node,
|
|
93317
93380
|
convertedLoopBody,
|
|
93318
|
-
visitNode(node.expression, visitor, isExpression)
|
|
93381
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
93319
93382
|
);
|
|
93320
93383
|
}
|
|
93321
93384
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
93322
93385
|
return factory2.updateWhileStatement(
|
|
93323
93386
|
node,
|
|
93324
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93387
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93325
93388
|
convertedLoopBody
|
|
93326
93389
|
);
|
|
93327
93390
|
}
|
|
@@ -93483,7 +93546,7 @@ function transformES2015(context) {
|
|
|
93483
93546
|
void 0,
|
|
93484
93547
|
/*type*/
|
|
93485
93548
|
void 0,
|
|
93486
|
-
visitNode(
|
|
93549
|
+
Debug.checkDefined(visitNode(
|
|
93487
93550
|
factory2.createBlock(
|
|
93488
93551
|
statements,
|
|
93489
93552
|
/*multiLine*/
|
|
@@ -93491,7 +93554,7 @@ function transformES2015(context) {
|
|
|
93491
93554
|
),
|
|
93492
93555
|
visitor,
|
|
93493
93556
|
isBlock
|
|
93494
|
-
)
|
|
93557
|
+
))
|
|
93495
93558
|
),
|
|
93496
93559
|
emitFlags
|
|
93497
93560
|
)
|
|
@@ -93514,7 +93577,7 @@ function transformES2015(context) {
|
|
|
93514
93577
|
if (node.incrementor) {
|
|
93515
93578
|
statements.push(factory2.createIfStatement(
|
|
93516
93579
|
currentState.conditionVariable,
|
|
93517
|
-
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
93580
|
+
factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
|
|
93518
93581
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
93519
93582
|
));
|
|
93520
93583
|
} else {
|
|
@@ -93525,11 +93588,12 @@ function transformES2015(context) {
|
|
|
93525
93588
|
}
|
|
93526
93589
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
93527
93590
|
statements.push(factory2.createIfStatement(
|
|
93528
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
93529
|
-
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
93591
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
|
|
93592
|
+
Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
|
|
93530
93593
|
));
|
|
93531
93594
|
}
|
|
93532
93595
|
}
|
|
93596
|
+
Debug.assert(statement);
|
|
93533
93597
|
if (isBlock(statement)) {
|
|
93534
93598
|
addRange(statements, statement.statements);
|
|
93535
93599
|
} else {
|
|
@@ -93797,9 +93861,9 @@ function transformES2015(context) {
|
|
|
93797
93861
|
createMemberAccessForPropertyName(
|
|
93798
93862
|
factory2,
|
|
93799
93863
|
receiver,
|
|
93800
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
93864
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
93801
93865
|
),
|
|
93802
|
-
visitNode(property.initializer, visitor, isExpression)
|
|
93866
|
+
Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
|
|
93803
93867
|
);
|
|
93804
93868
|
setTextRange(expression, property);
|
|
93805
93869
|
if (startsOnNewLine) {
|
|
@@ -93812,7 +93876,7 @@ function transformES2015(context) {
|
|
|
93812
93876
|
createMemberAccessForPropertyName(
|
|
93813
93877
|
factory2,
|
|
93814
93878
|
receiver,
|
|
93815
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
93879
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
93816
93880
|
),
|
|
93817
93881
|
factory2.cloneNode(property.name)
|
|
93818
93882
|
);
|
|
@@ -93827,7 +93891,7 @@ function transformES2015(context) {
|
|
|
93827
93891
|
createMemberAccessForPropertyName(
|
|
93828
93892
|
factory2,
|
|
93829
93893
|
receiver,
|
|
93830
|
-
visitNode(method.name, visitor, isPropertyName)
|
|
93894
|
+
Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
|
|
93831
93895
|
),
|
|
93832
93896
|
transformFunctionLikeToExpression(
|
|
93833
93897
|
method,
|
|
@@ -93961,7 +94025,7 @@ function transformES2015(context) {
|
|
|
93961
94025
|
}
|
|
93962
94026
|
return factory2.updateCallExpression(
|
|
93963
94027
|
node,
|
|
93964
|
-
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
94028
|
+
Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
|
|
93965
94029
|
/*typeArguments*/
|
|
93966
94030
|
void 0,
|
|
93967
94031
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -94073,8 +94137,8 @@ function transformES2015(context) {
|
|
|
94073
94137
|
let resultingCall;
|
|
94074
94138
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
94075
94139
|
resultingCall = factory2.createFunctionApplyCall(
|
|
94076
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
94077
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
94140
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
94141
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
94078
94142
|
transformAndSpreadElements(
|
|
94079
94143
|
node.arguments,
|
|
94080
94144
|
/*isArgumentList*/
|
|
@@ -94088,8 +94152,8 @@ function transformES2015(context) {
|
|
|
94088
94152
|
} else {
|
|
94089
94153
|
resultingCall = setTextRange(
|
|
94090
94154
|
factory2.createFunctionCallCall(
|
|
94091
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
94092
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
94155
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
94156
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
94093
94157
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
94094
94158
|
),
|
|
94095
94159
|
node
|
|
@@ -94111,7 +94175,7 @@ function transformES2015(context) {
|
|
|
94111
94175
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
94112
94176
|
return factory2.createNewExpression(
|
|
94113
94177
|
factory2.createFunctionApplyCall(
|
|
94114
|
-
visitNode(target, visitor, isExpression),
|
|
94178
|
+
Debug.checkDefined(visitNode(target, visitor, isExpression)),
|
|
94115
94179
|
thisArg,
|
|
94116
94180
|
transformAndSpreadElements(
|
|
94117
94181
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -94168,7 +94232,9 @@ function transformES2015(context) {
|
|
|
94168
94232
|
return map(chunk, visitExpressionOfSpread);
|
|
94169
94233
|
}
|
|
94170
94234
|
function visitExpressionOfSpread(node) {
|
|
94235
|
+
Debug.assertNode(node, isSpreadElement);
|
|
94171
94236
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
94237
|
+
Debug.assert(expression);
|
|
94172
94238
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
94173
94239
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
94174
94240
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -94219,7 +94285,7 @@ function transformES2015(context) {
|
|
|
94219
94285
|
function visitTemplateExpression(node) {
|
|
94220
94286
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
94221
94287
|
for (const span of node.templateSpans) {
|
|
94222
|
-
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
94288
|
+
const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
|
|
94223
94289
|
if (span.literal.text.length > 0) {
|
|
94224
94290
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
94225
94291
|
}
|
|
@@ -94785,19 +94851,19 @@ function transformGenerators(context) {
|
|
|
94785
94851
|
case 208 /* PropertyAccessExpression */:
|
|
94786
94852
|
target = factory2.updatePropertyAccessExpression(
|
|
94787
94853
|
left,
|
|
94788
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
94854
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
94789
94855
|
left.name
|
|
94790
94856
|
);
|
|
94791
94857
|
break;
|
|
94792
94858
|
case 209 /* ElementAccessExpression */:
|
|
94793
94859
|
target = factory2.updateElementAccessExpression(
|
|
94794
94860
|
left,
|
|
94795
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
94796
|
-
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
94861
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
94862
|
+
cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
|
|
94797
94863
|
);
|
|
94798
94864
|
break;
|
|
94799
94865
|
default:
|
|
94800
|
-
target = visitNode(left, visitor, isExpression);
|
|
94866
|
+
target = Debug.checkDefined(visitNode(left, visitor, isExpression));
|
|
94801
94867
|
break;
|
|
94802
94868
|
}
|
|
94803
94869
|
const operator = node.operatorToken.kind;
|
|
@@ -94809,7 +94875,7 @@ function transformGenerators(context) {
|
|
|
94809
94875
|
factory2.createBinaryExpression(
|
|
94810
94876
|
cacheExpression(target),
|
|
94811
94877
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
94812
|
-
visitNode(right, visitor, isExpression)
|
|
94878
|
+
Debug.checkDefined(visitNode(right, visitor, isExpression))
|
|
94813
94879
|
),
|
|
94814
94880
|
node
|
|
94815
94881
|
)
|
|
@@ -94817,7 +94883,7 @@ function transformGenerators(context) {
|
|
|
94817
94883
|
node
|
|
94818
94884
|
);
|
|
94819
94885
|
} else {
|
|
94820
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
94886
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
|
|
94821
94887
|
}
|
|
94822
94888
|
}
|
|
94823
94889
|
return visitEachChild(node, visitor, context);
|
|
@@ -94831,9 +94897,9 @@ function transformGenerators(context) {
|
|
|
94831
94897
|
}
|
|
94832
94898
|
return factory2.updateBinaryExpression(
|
|
94833
94899
|
node,
|
|
94834
|
-
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
94900
|
+
cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
|
|
94835
94901
|
node.operatorToken,
|
|
94836
|
-
visitNode(node.right, visitor, isExpression)
|
|
94902
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
94837
94903
|
);
|
|
94838
94904
|
}
|
|
94839
94905
|
return visitEachChild(node, visitor, context);
|
|
@@ -94852,7 +94918,7 @@ function transformGenerators(context) {
|
|
|
94852
94918
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
94853
94919
|
pendingExpressions = [];
|
|
94854
94920
|
}
|
|
94855
|
-
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
94921
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
|
|
94856
94922
|
}
|
|
94857
94923
|
}
|
|
94858
94924
|
}
|
|
@@ -94866,7 +94932,7 @@ function transformGenerators(context) {
|
|
|
94866
94932
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
94867
94933
|
pendingExpressions = [];
|
|
94868
94934
|
}
|
|
94869
|
-
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
94935
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
|
|
94870
94936
|
}
|
|
94871
94937
|
}
|
|
94872
94938
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -94876,7 +94942,7 @@ function transformGenerators(context) {
|
|
|
94876
94942
|
const resultLocal = declareLocal();
|
|
94877
94943
|
emitAssignment(
|
|
94878
94944
|
resultLocal,
|
|
94879
|
-
visitNode(node.left, visitor, isExpression),
|
|
94945
|
+
Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
|
|
94880
94946
|
/*location*/
|
|
94881
94947
|
node.left
|
|
94882
94948
|
);
|
|
@@ -94897,7 +94963,7 @@ function transformGenerators(context) {
|
|
|
94897
94963
|
}
|
|
94898
94964
|
emitAssignment(
|
|
94899
94965
|
resultLocal,
|
|
94900
|
-
visitNode(node.right, visitor, isExpression),
|
|
94966
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
|
|
94901
94967
|
/*location*/
|
|
94902
94968
|
node.right
|
|
94903
94969
|
);
|
|
@@ -94911,13 +94977,13 @@ function transformGenerators(context) {
|
|
|
94911
94977
|
const resultLocal = declareLocal();
|
|
94912
94978
|
emitBreakWhenFalse(
|
|
94913
94979
|
whenFalseLabel,
|
|
94914
|
-
visitNode(node.condition, visitor, isExpression),
|
|
94980
|
+
Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
|
|
94915
94981
|
/*location*/
|
|
94916
94982
|
node.condition
|
|
94917
94983
|
);
|
|
94918
94984
|
emitAssignment(
|
|
94919
94985
|
resultLocal,
|
|
94920
|
-
visitNode(node.whenTrue, visitor, isExpression),
|
|
94986
|
+
Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
|
|
94921
94987
|
/*location*/
|
|
94922
94988
|
node.whenTrue
|
|
94923
94989
|
);
|
|
@@ -94925,7 +94991,7 @@ function transformGenerators(context) {
|
|
|
94925
94991
|
markLabel(whenFalseLabel);
|
|
94926
94992
|
emitAssignment(
|
|
94927
94993
|
resultLocal,
|
|
94928
|
-
visitNode(node.whenFalse, visitor, isExpression),
|
|
94994
|
+
Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
|
|
94929
94995
|
/*location*/
|
|
94930
94996
|
node.whenFalse
|
|
94931
94997
|
);
|
|
@@ -95005,7 +95071,7 @@ function transformGenerators(context) {
|
|
|
95005
95071
|
leadingElement = void 0;
|
|
95006
95072
|
expressions2 = [];
|
|
95007
95073
|
}
|
|
95008
|
-
expressions2.push(visitNode(element, visitor, isExpression));
|
|
95074
|
+
expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
|
|
95009
95075
|
return expressions2;
|
|
95010
95076
|
}
|
|
95011
95077
|
}
|
|
@@ -95044,8 +95110,8 @@ function transformGenerators(context) {
|
|
|
95044
95110
|
if (containsYield(node.argumentExpression)) {
|
|
95045
95111
|
return factory2.updateElementAccessExpression(
|
|
95046
95112
|
node,
|
|
95047
|
-
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
95048
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
95113
|
+
cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
|
|
95114
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
95049
95115
|
);
|
|
95050
95116
|
}
|
|
95051
95117
|
return visitEachChild(node, visitor, context);
|
|
@@ -95062,7 +95128,7 @@ function transformGenerators(context) {
|
|
|
95062
95128
|
return setOriginalNode(
|
|
95063
95129
|
setTextRange(
|
|
95064
95130
|
factory2.createFunctionApplyCall(
|
|
95065
|
-
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
95131
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
|
|
95066
95132
|
thisArg,
|
|
95067
95133
|
visitElements(node.arguments)
|
|
95068
95134
|
),
|
|
@@ -95080,7 +95146,7 @@ function transformGenerators(context) {
|
|
|
95080
95146
|
setTextRange(
|
|
95081
95147
|
factory2.createNewExpression(
|
|
95082
95148
|
factory2.createFunctionApplyCall(
|
|
95083
|
-
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
95149
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
|
|
95084
95150
|
thisArg,
|
|
95085
95151
|
visitElements(
|
|
95086
95152
|
node.arguments,
|
|
@@ -95196,7 +95262,7 @@ function transformGenerators(context) {
|
|
|
95196
95262
|
return setSourceMapRange(
|
|
95197
95263
|
factory2.createAssignment(
|
|
95198
95264
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
95199
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
95265
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
95200
95266
|
),
|
|
95201
95267
|
node
|
|
95202
95268
|
);
|
|
@@ -95208,7 +95274,7 @@ function transformGenerators(context) {
|
|
|
95208
95274
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
95209
95275
|
emitBreakWhenFalse(
|
|
95210
95276
|
node.elseStatement ? elseLabel : endLabel,
|
|
95211
|
-
visitNode(node.expression, visitor, isExpression),
|
|
95277
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
95212
95278
|
/*location*/
|
|
95213
95279
|
node.expression
|
|
95214
95280
|
);
|
|
@@ -95237,7 +95303,7 @@ function transformGenerators(context) {
|
|
|
95237
95303
|
markLabel(loopLabel);
|
|
95238
95304
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95239
95305
|
markLabel(conditionLabel);
|
|
95240
|
-
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
95306
|
+
emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95241
95307
|
endLoopBlock();
|
|
95242
95308
|
} else {
|
|
95243
95309
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -95258,7 +95324,7 @@ function transformGenerators(context) {
|
|
|
95258
95324
|
const loopLabel = defineLabel();
|
|
95259
95325
|
const endLabel = beginLoopBlock(loopLabel);
|
|
95260
95326
|
markLabel(loopLabel);
|
|
95261
|
-
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
95327
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95262
95328
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95263
95329
|
emitBreak(loopLabel);
|
|
95264
95330
|
endLoopBlock();
|
|
@@ -95289,7 +95355,7 @@ function transformGenerators(context) {
|
|
|
95289
95355
|
emitStatement(
|
|
95290
95356
|
setTextRange(
|
|
95291
95357
|
factory2.createExpressionStatement(
|
|
95292
|
-
visitNode(initializer, visitor, isExpression)
|
|
95358
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
95293
95359
|
),
|
|
95294
95360
|
initializer
|
|
95295
95361
|
)
|
|
@@ -95298,7 +95364,7 @@ function transformGenerators(context) {
|
|
|
95298
95364
|
}
|
|
95299
95365
|
markLabel(conditionLabel);
|
|
95300
95366
|
if (node.condition) {
|
|
95301
|
-
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
95367
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
|
|
95302
95368
|
}
|
|
95303
95369
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95304
95370
|
markLabel(incrementLabel);
|
|
@@ -95306,7 +95372,7 @@ function transformGenerators(context) {
|
|
|
95306
95372
|
emitStatement(
|
|
95307
95373
|
setTextRange(
|
|
95308
95374
|
factory2.createExpressionStatement(
|
|
95309
|
-
visitNode(node.incrementor, visitor, isExpression)
|
|
95375
|
+
Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
|
|
95310
95376
|
),
|
|
95311
95377
|
node.incrementor
|
|
95312
95378
|
)
|
|
@@ -95351,7 +95417,7 @@ function transformGenerators(context) {
|
|
|
95351
95417
|
const keysIndex = factory2.createLoopVariable();
|
|
95352
95418
|
const initializer = node.initializer;
|
|
95353
95419
|
hoistVariableDeclaration(keysIndex);
|
|
95354
|
-
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
95420
|
+
emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95355
95421
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
95356
95422
|
emitStatement(
|
|
95357
95423
|
factory2.createForInStatement(
|
|
@@ -95382,7 +95448,7 @@ function transformGenerators(context) {
|
|
|
95382
95448
|
}
|
|
95383
95449
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
95384
95450
|
} else {
|
|
95385
|
-
variable = visitNode(initializer, visitor, isExpression);
|
|
95451
|
+
variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
95386
95452
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
95387
95453
|
}
|
|
95388
95454
|
emitAssignment(variable, key);
|
|
@@ -95407,8 +95473,8 @@ function transformGenerators(context) {
|
|
|
95407
95473
|
node = factory2.updateForInStatement(
|
|
95408
95474
|
node,
|
|
95409
95475
|
initializer.declarations[0].name,
|
|
95410
|
-
visitNode(node.expression, visitor, isExpression),
|
|
95411
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
95476
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
95477
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
95412
95478
|
);
|
|
95413
95479
|
} else {
|
|
95414
95480
|
node = visitEachChild(node, visitor, context);
|
|
@@ -95484,7 +95550,7 @@ function transformGenerators(context) {
|
|
|
95484
95550
|
}
|
|
95485
95551
|
function transformAndEmitWithStatement(node) {
|
|
95486
95552
|
if (containsYield(node)) {
|
|
95487
|
-
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
95553
|
+
beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
95488
95554
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95489
95555
|
endWithBlock();
|
|
95490
95556
|
} else {
|
|
@@ -95496,7 +95562,7 @@ function transformGenerators(context) {
|
|
|
95496
95562
|
const caseBlock = node.caseBlock;
|
|
95497
95563
|
const numClauses = caseBlock.clauses.length;
|
|
95498
95564
|
const endLabel = beginSwitchBlock();
|
|
95499
|
-
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
95565
|
+
const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95500
95566
|
const clauseLabels = [];
|
|
95501
95567
|
let defaultClauseIndex = -1;
|
|
95502
95568
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -95518,7 +95584,7 @@ function transformGenerators(context) {
|
|
|
95518
95584
|
}
|
|
95519
95585
|
pendingClauses.push(
|
|
95520
95586
|
factory2.createCaseClause(
|
|
95521
|
-
visitNode(clause.expression, visitor, isExpression),
|
|
95587
|
+
Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
|
|
95522
95588
|
[
|
|
95523
95589
|
createInlineBreak(
|
|
95524
95590
|
clauseLabels[i],
|
|
@@ -95588,7 +95654,7 @@ function transformGenerators(context) {
|
|
|
95588
95654
|
function transformAndEmitThrowStatement(node) {
|
|
95589
95655
|
var _a2;
|
|
95590
95656
|
emitThrow(
|
|
95591
|
-
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
95657
|
+
Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
|
|
95592
95658
|
/*location*/
|
|
95593
95659
|
node
|
|
95594
95660
|
);
|
|
@@ -96872,7 +96938,7 @@ function transformModule(context) {
|
|
|
96872
96938
|
}
|
|
96873
96939
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
96874
96940
|
if (currentModuleInfo.exportEquals) {
|
|
96875
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
96941
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
|
|
96876
96942
|
if (expressionResult) {
|
|
96877
96943
|
if (emitAsReturn) {
|
|
96878
96944
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -97067,7 +97133,7 @@ function transformModule(context) {
|
|
|
97067
97133
|
}
|
|
97068
97134
|
function visitImportCallExpression(node) {
|
|
97069
97135
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
97070
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
97136
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
97071
97137
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
97072
97138
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
97073
97139
|
switch (compilerOptions.module) {
|
|
@@ -97596,7 +97662,7 @@ function transformModule(context) {
|
|
|
97596
97662
|
deferredExports[id] = appendExportStatement(
|
|
97597
97663
|
deferredExports[id],
|
|
97598
97664
|
factory2.createIdentifier("default"),
|
|
97599
|
-
visitNode(node.expression, visitor),
|
|
97665
|
+
visitNode(node.expression, visitor, isExpression),
|
|
97600
97666
|
/*location*/
|
|
97601
97667
|
node,
|
|
97602
97668
|
/*allowComments*/
|
|
@@ -97606,7 +97672,7 @@ function transformModule(context) {
|
|
|
97606
97672
|
statements = appendExportStatement(
|
|
97607
97673
|
statements,
|
|
97608
97674
|
factory2.createIdentifier("default"),
|
|
97609
|
-
visitNode(node.expression, visitor),
|
|
97675
|
+
visitNode(node.expression, visitor, isExpression),
|
|
97610
97676
|
/*location*/
|
|
97611
97677
|
node,
|
|
97612
97678
|
/*allowComments*/
|
|
@@ -97634,7 +97700,7 @@ function transformModule(context) {
|
|
|
97634
97700
|
),
|
|
97635
97701
|
/*typeParameters*/
|
|
97636
97702
|
void 0,
|
|
97637
|
-
visitNodes2(node.parameters, visitor),
|
|
97703
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
97638
97704
|
/*type*/
|
|
97639
97705
|
void 0,
|
|
97640
97706
|
visitEachChild(node.body, visitor, context)
|
|
@@ -97675,8 +97741,8 @@ function transformModule(context) {
|
|
|
97675
97741
|
),
|
|
97676
97742
|
/*typeParameters*/
|
|
97677
97743
|
void 0,
|
|
97678
|
-
visitNodes2(node.heritageClauses, visitor),
|
|
97679
|
-
visitNodes2(node.members, visitor)
|
|
97744
|
+
visitNodes2(node.heritageClauses, visitor, isHeritageClause),
|
|
97745
|
+
visitNodes2(node.members, visitor, isClassElement)
|
|
97680
97746
|
),
|
|
97681
97747
|
node
|
|
97682
97748
|
),
|
|
@@ -97724,7 +97790,7 @@ function transformModule(context) {
|
|
|
97724
97790
|
variable.name,
|
|
97725
97791
|
variable.exclamationToken,
|
|
97726
97792
|
variable.type,
|
|
97727
|
-
visitNode(variable.initializer, visitor)
|
|
97793
|
+
visitNode(variable.initializer, visitor, isExpression)
|
|
97728
97794
|
);
|
|
97729
97795
|
variables = append(variables, updatedVariable);
|
|
97730
97796
|
expressions = append(expressions, expression);
|
|
@@ -97775,9 +97841,8 @@ function transformModule(context) {
|
|
|
97775
97841
|
function transformInitializedVariable(node) {
|
|
97776
97842
|
if (isBindingPattern(node.name)) {
|
|
97777
97843
|
return flattenDestructuringAssignment(
|
|
97778
|
-
visitNode(node, visitor),
|
|
97779
|
-
|
|
97780
|
-
void 0,
|
|
97844
|
+
visitNode(node, visitor, isInitializedVariable),
|
|
97845
|
+
visitor,
|
|
97781
97846
|
context,
|
|
97782
97847
|
0 /* All */,
|
|
97783
97848
|
/*needsValue*/
|
|
@@ -97794,7 +97859,7 @@ function transformModule(context) {
|
|
|
97794
97859
|
/*location*/
|
|
97795
97860
|
node.name
|
|
97796
97861
|
),
|
|
97797
|
-
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
97862
|
+
node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
|
|
97798
97863
|
);
|
|
97799
97864
|
}
|
|
97800
97865
|
}
|
|
@@ -98737,7 +98802,7 @@ function transformSystemModule(context) {
|
|
|
98737
98802
|
),
|
|
98738
98803
|
/*typeParameters*/
|
|
98739
98804
|
void 0,
|
|
98740
|
-
visitNodes2(node.parameters, visitor,
|
|
98805
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
98741
98806
|
/*type*/
|
|
98742
98807
|
void 0,
|
|
98743
98808
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -99111,7 +99176,7 @@ function transformSystemModule(context) {
|
|
|
99111
99176
|
}
|
|
99112
99177
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
99113
99178
|
} else {
|
|
99114
|
-
return visitNode(node, discardedValueVisitor,
|
|
99179
|
+
return visitNode(node, discardedValueVisitor, isForInitializer);
|
|
99115
99180
|
}
|
|
99116
99181
|
}
|
|
99117
99182
|
function visitDoStatement(node) {
|
|
@@ -99132,21 +99197,21 @@ function transformSystemModule(context) {
|
|
|
99132
99197
|
return factory2.updateLabeledStatement(
|
|
99133
99198
|
node,
|
|
99134
99199
|
node.label,
|
|
99135
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
99200
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
99136
99201
|
);
|
|
99137
99202
|
}
|
|
99138
99203
|
function visitWithStatement(node) {
|
|
99139
99204
|
return factory2.updateWithStatement(
|
|
99140
99205
|
node,
|
|
99141
99206
|
visitNode(node.expression, visitor, isExpression),
|
|
99142
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
99207
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
99143
99208
|
);
|
|
99144
99209
|
}
|
|
99145
99210
|
function visitSwitchStatement(node) {
|
|
99146
99211
|
return factory2.updateSwitchStatement(
|
|
99147
99212
|
node,
|
|
99148
99213
|
visitNode(node.expression, visitor, isExpression),
|
|
99149
|
-
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
99214
|
+
Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
|
|
99150
99215
|
);
|
|
99151
99216
|
}
|
|
99152
99217
|
function visitCaseBlock(node) {
|
|
@@ -99178,7 +99243,7 @@ function transformSystemModule(context) {
|
|
|
99178
99243
|
node = factory2.updateCatchClause(
|
|
99179
99244
|
node,
|
|
99180
99245
|
node.variableDeclaration,
|
|
99181
|
-
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
99246
|
+
Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
|
|
99182
99247
|
);
|
|
99183
99248
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
99184
99249
|
return node;
|
|
@@ -99248,7 +99313,7 @@ function transformSystemModule(context) {
|
|
|
99248
99313
|
}
|
|
99249
99314
|
function visitImportCallExpression(node) {
|
|
99250
99315
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
99251
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
99316
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
99252
99317
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
99253
99318
|
return factory2.createCallExpression(
|
|
99254
99319
|
factory2.createPropertyAccessExpression(
|
|
@@ -100369,7 +100434,7 @@ function transformDeclarations(context) {
|
|
|
100369
100434
|
sourceFile,
|
|
100370
100435
|
/*bundled*/
|
|
100371
100436
|
true
|
|
100372
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
100437
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
100373
100438
|
const newFile = factory2.updateSourceFile(
|
|
100374
100439
|
sourceFile,
|
|
100375
100440
|
[factory2.createModuleDeclaration(
|
|
@@ -100391,7 +100456,7 @@ function transformDeclarations(context) {
|
|
|
100391
100456
|
return newFile;
|
|
100392
100457
|
}
|
|
100393
100458
|
needsDeclare = true;
|
|
100394
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
100459
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
100395
100460
|
return factory2.updateSourceFile(
|
|
100396
100461
|
sourceFile,
|
|
100397
100462
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -100460,7 +100525,7 @@ function transformDeclarations(context) {
|
|
|
100460
100525
|
refs.forEach(referenceVisitor);
|
|
100461
100526
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
100462
100527
|
} else {
|
|
100463
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
100528
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
|
|
100464
100529
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
100465
100530
|
refs.forEach(referenceVisitor);
|
|
100466
100531
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -100577,9 +100642,9 @@ function transformDeclarations(context) {
|
|
|
100577
100642
|
return name;
|
|
100578
100643
|
} else {
|
|
100579
100644
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
100580
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
100645
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
100581
100646
|
} else {
|
|
100582
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
100647
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
100583
100648
|
}
|
|
100584
100649
|
}
|
|
100585
100650
|
function visitBindingElement(elem) {
|
|
@@ -100649,10 +100714,10 @@ function transformDeclarations(context) {
|
|
|
100649
100714
|
}
|
|
100650
100715
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
100651
100716
|
if (type && !shouldUseResolverType) {
|
|
100652
|
-
return visitNode(type, visitDeclarationSubtree);
|
|
100717
|
+
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
100653
100718
|
}
|
|
100654
100719
|
if (!getParseTreeNode(node)) {
|
|
100655
|
-
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
100720
|
+
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
100656
100721
|
}
|
|
100657
100722
|
if (node.kind === 175 /* SetAccessor */) {
|
|
100658
100723
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -100766,7 +100831,7 @@ function transformDeclarations(context) {
|
|
|
100766
100831
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
100767
100832
|
}
|
|
100768
100833
|
function ensureTypeParams(node, params) {
|
|
100769
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
100834
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
|
|
100770
100835
|
}
|
|
100771
100836
|
function isEnclosingDeclaration(node) {
|
|
100772
100837
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -100901,7 +100966,7 @@ function transformDeclarations(context) {
|
|
|
100901
100966
|
needsDeclare = priorNeedsDeclare;
|
|
100902
100967
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
100903
100968
|
}
|
|
100904
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
100969
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
100905
100970
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
100906
100971
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
100907
100972
|
const key = getOriginalNodeId(statement);
|
|
@@ -101115,7 +101180,7 @@ function transformDeclarations(context) {
|
|
|
101115
101180
|
input,
|
|
101116
101181
|
ensureModifiers(input),
|
|
101117
101182
|
updateParamsList(input, input.parameters),
|
|
101118
|
-
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
101183
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
101119
101184
|
));
|
|
101120
101185
|
}
|
|
101121
101186
|
case 257 /* VariableDeclaration */: {
|
|
@@ -101148,20 +101213,24 @@ function transformDeclarations(context) {
|
|
|
101148
101213
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
101149
101214
|
}
|
|
101150
101215
|
case 191 /* ConditionalType */: {
|
|
101151
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
101152
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
101216
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
|
|
101217
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
|
|
101153
101218
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
101154
101219
|
enclosingDeclaration = input.trueType;
|
|
101155
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
101220
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
|
|
101156
101221
|
enclosingDeclaration = oldEnclosingDecl;
|
|
101157
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
101222
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
|
|
101223
|
+
Debug.assert(checkType);
|
|
101224
|
+
Debug.assert(extendsType);
|
|
101225
|
+
Debug.assert(trueType);
|
|
101226
|
+
Debug.assert(falseType);
|
|
101158
101227
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
101159
101228
|
}
|
|
101160
101229
|
case 181 /* FunctionType */: {
|
|
101161
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
101230
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
101162
101231
|
}
|
|
101163
101232
|
case 182 /* ConstructorType */: {
|
|
101164
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
101233
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
101165
101234
|
}
|
|
101166
101235
|
case 202 /* ImportType */: {
|
|
101167
101236
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -101305,7 +101374,7 @@ function transformDeclarations(context) {
|
|
|
101305
101374
|
ensureModifiers(input),
|
|
101306
101375
|
input.name,
|
|
101307
101376
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
101308
|
-
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
101377
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
101309
101378
|
));
|
|
101310
101379
|
needsDeclare = previousNeedsDeclare;
|
|
101311
101380
|
return clean2;
|
|
@@ -101317,7 +101386,7 @@ function transformDeclarations(context) {
|
|
|
101317
101386
|
input.name,
|
|
101318
101387
|
ensureTypeParams(input, input.typeParameters),
|
|
101319
101388
|
transformHeritageClauses(input.heritageClauses),
|
|
101320
|
-
visitNodes2(input.members, visitDeclarationSubtree)
|
|
101389
|
+
visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
|
|
101321
101390
|
));
|
|
101322
101391
|
}
|
|
101323
101392
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -101434,7 +101503,7 @@ function transformDeclarations(context) {
|
|
|
101434
101503
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
101435
101504
|
resultHasScopeMarker = false;
|
|
101436
101505
|
needsScopeFixMarker = false;
|
|
101437
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
101506
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
|
|
101438
101507
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
101439
101508
|
if (input.flags & 16777216 /* Ambient */) {
|
|
101440
101509
|
needsScopeFixMarker = false;
|
|
@@ -101443,7 +101512,7 @@ function transformDeclarations(context) {
|
|
|
101443
101512
|
if (needsScopeFixMarker) {
|
|
101444
101513
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
101445
101514
|
} else {
|
|
101446
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
101515
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
|
|
101447
101516
|
}
|
|
101448
101517
|
}
|
|
101449
101518
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -101539,7 +101608,7 @@ function transformDeclarations(context) {
|
|
|
101539
101608
|
void 0
|
|
101540
101609
|
)
|
|
101541
101610
|
] : void 0;
|
|
101542
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
101611
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
101543
101612
|
const members = factory2.createNodeArray(memberNodes);
|
|
101544
101613
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
101545
101614
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -101563,11 +101632,11 @@ function transformDeclarations(context) {
|
|
|
101563
101632
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
101564
101633
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
101565
101634
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
101566
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
101635
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
101567
101636
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
101568
101637
|
return newClause;
|
|
101569
101638
|
}
|
|
101570
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
101639
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
|
|
101571
101640
|
}));
|
|
101572
101641
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
101573
101642
|
input,
|
|
@@ -101623,7 +101692,7 @@ function transformDeclarations(context) {
|
|
|
101623
101692
|
function transformVariableStatement(input) {
|
|
101624
101693
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
101625
101694
|
return;
|
|
101626
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
101695
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
|
|
101627
101696
|
if (!length(nodes))
|
|
101628
101697
|
return;
|
|
101629
101698
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -101714,7 +101783,7 @@ function transformDeclarations(context) {
|
|
|
101714
101783
|
function transformHeritageClauses(nodes) {
|
|
101715
101784
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
101716
101785
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
101717
|
-
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
101786
|
+
})), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
|
|
101718
101787
|
}
|
|
101719
101788
|
}
|
|
101720
101789
|
function isAlwaysType(node) {
|
|
@@ -114360,6 +114429,9 @@ function getFilesInErrorForSummary(diagnostics) {
|
|
|
114360
114429
|
}
|
|
114361
114430
|
);
|
|
114362
114431
|
return filesInError.map((fileName) => {
|
|
114432
|
+
if (fileName === void 0) {
|
|
114433
|
+
return void 0;
|
|
114434
|
+
}
|
|
114363
114435
|
const diagnosticForFileName = find(
|
|
114364
114436
|
diagnostics,
|
|
114365
114437
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -115008,6 +115080,8 @@ function createWatchProgram(host) {
|
|
|
115008
115080
|
parseConfigFile2();
|
|
115009
115081
|
newLine = updateNewLine();
|
|
115010
115082
|
}
|
|
115083
|
+
Debug.assert(compilerOptions);
|
|
115084
|
+
Debug.assert(rootFileNames);
|
|
115011
115085
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
115012
115086
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
115013
115087
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -115110,6 +115184,8 @@ function createWatchProgram(host) {
|
|
|
115110
115184
|
}
|
|
115111
115185
|
function synchronizeProgram() {
|
|
115112
115186
|
writeLog(`Synchronizing program`);
|
|
115187
|
+
Debug.assert(compilerOptions);
|
|
115188
|
+
Debug.assert(rootFileNames);
|
|
115113
115189
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
115114
115190
|
const program = getCurrentBuilderProgram();
|
|
115115
115191
|
if (hasChangedCompilerOptions) {
|
|
@@ -115349,6 +115425,8 @@ function createWatchProgram(host) {
|
|
|
115349
115425
|
}
|
|
115350
115426
|
function reloadFileNamesFromConfigFile() {
|
|
115351
115427
|
writeLog("Reloading new file names and options");
|
|
115428
|
+
Debug.assert(compilerOptions);
|
|
115429
|
+
Debug.assert(configFileName);
|
|
115352
115430
|
reloadLevel = 0 /* None */;
|
|
115353
115431
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
115354
115432
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -115357,6 +115435,7 @@ function createWatchProgram(host) {
|
|
|
115357
115435
|
synchronizeProgram();
|
|
115358
115436
|
}
|
|
115359
115437
|
function reloadConfigFile() {
|
|
115438
|
+
Debug.assert(configFileName);
|
|
115360
115439
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
115361
115440
|
reloadLevel = 0 /* None */;
|
|
115362
115441
|
if (cachedDirectoryStructureHost) {
|
|
@@ -115369,6 +115448,7 @@ function createWatchProgram(host) {
|
|
|
115369
115448
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
115370
115449
|
}
|
|
115371
115450
|
function parseConfigFile2() {
|
|
115451
|
+
Debug.assert(configFileName);
|
|
115372
115452
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
115373
115453
|
configFileName,
|
|
115374
115454
|
optionsToExtendForConfigFile,
|
|
@@ -115396,6 +115476,7 @@ function createWatchProgram(host) {
|
|
|
115396
115476
|
return config.parsedCommandLine;
|
|
115397
115477
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
115398
115478
|
writeLog("Reloading new file names and options");
|
|
115479
|
+
Debug.assert(compilerOptions);
|
|
115399
115480
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
115400
115481
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
115401
115482
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -115487,7 +115568,8 @@ function createWatchProgram(host) {
|
|
|
115487
115568
|
return watchDirectory(
|
|
115488
115569
|
directory,
|
|
115489
115570
|
(fileOrDirectory) => {
|
|
115490
|
-
Debug.assert(
|
|
115571
|
+
Debug.assert(configFileName);
|
|
115572
|
+
Debug.assert(compilerOptions);
|
|
115491
115573
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
115492
115574
|
if (cachedDirectoryStructureHost) {
|
|
115493
115575
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -115518,6 +115600,7 @@ function createWatchProgram(host) {
|
|
|
115518
115600
|
);
|
|
115519
115601
|
}
|
|
115520
115602
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
115603
|
+
Debug.assert(configFileName);
|
|
115521
115604
|
updateSharedExtendedConfigFileWatcher(
|
|
115522
115605
|
forProjectPath,
|
|
115523
115606
|
options,
|