@typescript-deploys/pr-build 5.0.0-pr-52280-2 → 5.0.0-pr-52280-7
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 +478 -400
- package/lib/tsserver.js +521 -416
- package/lib/tsserverlibrary.d.ts +76 -22
- package/lib/tsserverlibrary.js +517 -416
- package/lib/typescript.d.ts +66 -18
- package/lib/typescript.js +512 -416
- package/lib/typingsInstaller.js +201 -191
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -1342,6 +1342,7 @@ __export(server_exports, {
|
|
|
1342
1342
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
1343
1343
|
isArray: () => isArray,
|
|
1344
1344
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
1345
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
1345
1346
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
1346
1347
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
1347
1348
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -1374,6 +1375,7 @@ __export(server_exports, {
|
|
|
1374
1375
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
1375
1376
|
isBindingElement: () => isBindingElement,
|
|
1376
1377
|
isBindingName: () => isBindingName,
|
|
1378
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
1377
1379
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
1378
1380
|
isBindingPattern: () => isBindingPattern,
|
|
1379
1381
|
isBlock: () => isBlock,
|
|
@@ -1580,6 +1582,7 @@ __export(server_exports, {
|
|
|
1580
1582
|
isInferTypeNode: () => isInferTypeNode,
|
|
1581
1583
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
1582
1584
|
isInitializedProperty: () => isInitializedProperty,
|
|
1585
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
1583
1586
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
1584
1587
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
1585
1588
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -1686,6 +1689,7 @@ __export(server_exports, {
|
|
|
1686
1689
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
1687
1690
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
1688
1691
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
1692
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
1689
1693
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
1690
1694
|
isLocalName: () => isLocalName,
|
|
1691
1695
|
isLogicalOperator: () => isLogicalOperator,
|
|
@@ -2678,7 +2682,7 @@ __export(ts_server_exports3, {
|
|
|
2678
2682
|
|
|
2679
2683
|
// src/compiler/corePublic.ts
|
|
2680
2684
|
var versionMajorMinor = "5.0";
|
|
2681
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2685
|
+
var version = `${versionMajorMinor}.0-insiders.20230118`;
|
|
2682
2686
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2683
2687
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2684
2688
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -10678,7 +10682,7 @@ var Diagnostics = {
|
|
|
10678
10682
|
Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
|
|
10679
10683
|
Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
|
|
10680
10684
|
Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."),
|
|
10681
|
-
|
|
10685
|
+
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
|
10682
10686
|
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
|
10683
10687
|
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
|
10684
10688
|
Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
@@ -12212,10 +12216,7 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
|
|
|
12212
12216
|
initial
|
|
12213
12217
|
);
|
|
12214
12218
|
}
|
|
12215
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
12216
|
-
if (!comments) {
|
|
12217
|
-
comments = [];
|
|
12218
|
-
}
|
|
12219
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
|
|
12219
12220
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
12220
12221
|
return comments;
|
|
12221
12222
|
}
|
|
@@ -13998,7 +13999,10 @@ function getOriginalNode(node, nodeTest) {
|
|
|
13998
13999
|
node = node.original;
|
|
13999
14000
|
}
|
|
14000
14001
|
}
|
|
14001
|
-
|
|
14002
|
+
if (!node || !nodeTest) {
|
|
14003
|
+
return node;
|
|
14004
|
+
}
|
|
14005
|
+
return nodeTest(node) ? node : void 0;
|
|
14002
14006
|
}
|
|
14003
14007
|
function findAncestor(node, callback) {
|
|
14004
14008
|
while (node) {
|
|
@@ -14742,6 +14746,9 @@ function isDeclarationBindingElement(bindingElement) {
|
|
|
14742
14746
|
}
|
|
14743
14747
|
return false;
|
|
14744
14748
|
}
|
|
14749
|
+
function isBindingOrAssignmentElement(node) {
|
|
14750
|
+
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
14751
|
+
}
|
|
14745
14752
|
function isBindingOrAssignmentPattern(node) {
|
|
14746
14753
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
14747
14754
|
}
|
|
@@ -14771,6 +14778,24 @@ function isArrayBindingOrAssignmentPattern(node) {
|
|
|
14771
14778
|
}
|
|
14772
14779
|
return false;
|
|
14773
14780
|
}
|
|
14781
|
+
function isArrayBindingOrAssignmentElement(node) {
|
|
14782
|
+
switch (node.kind) {
|
|
14783
|
+
case 205 /* BindingElement */:
|
|
14784
|
+
case 229 /* OmittedExpression */:
|
|
14785
|
+
case 227 /* SpreadElement */:
|
|
14786
|
+
case 206 /* ArrayLiteralExpression */:
|
|
14787
|
+
case 207 /* ObjectLiteralExpression */:
|
|
14788
|
+
case 79 /* Identifier */:
|
|
14789
|
+
case 208 /* PropertyAccessExpression */:
|
|
14790
|
+
case 209 /* ElementAccessExpression */:
|
|
14791
|
+
return true;
|
|
14792
|
+
}
|
|
14793
|
+
return isAssignmentExpression(
|
|
14794
|
+
node,
|
|
14795
|
+
/*excludeCompoundAssignment*/
|
|
14796
|
+
true
|
|
14797
|
+
);
|
|
14798
|
+
}
|
|
14774
14799
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
14775
14800
|
const kind = node.kind;
|
|
14776
14801
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -14866,6 +14891,18 @@ function isUnaryExpressionWithWrite(expr) {
|
|
|
14866
14891
|
return false;
|
|
14867
14892
|
}
|
|
14868
14893
|
}
|
|
14894
|
+
function isLiteralTypeLiteral(node) {
|
|
14895
|
+
node = skipPartiallyEmittedExpressions(node);
|
|
14896
|
+
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
14897
|
+
case 104 /* NullKeyword */:
|
|
14898
|
+
case 110 /* TrueKeyword */:
|
|
14899
|
+
case 95 /* FalseKeyword */:
|
|
14900
|
+
case 221 /* PrefixUnaryExpression */:
|
|
14901
|
+
return true;
|
|
14902
|
+
default:
|
|
14903
|
+
return isLiteralExpression(node);
|
|
14904
|
+
}
|
|
14905
|
+
}
|
|
14869
14906
|
function isExpression(node) {
|
|
14870
14907
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
14871
14908
|
}
|
|
@@ -15856,6 +15893,7 @@ function isBlockScope(node, parentNode) {
|
|
|
15856
15893
|
return false;
|
|
15857
15894
|
}
|
|
15858
15895
|
function isDeclarationWithTypeParameters(node) {
|
|
15896
|
+
Debug.type(node);
|
|
15859
15897
|
switch (node.kind) {
|
|
15860
15898
|
case 341 /* JSDocCallbackTag */:
|
|
15861
15899
|
case 349 /* JSDocTypedefTag */:
|
|
@@ -15867,6 +15905,7 @@ function isDeclarationWithTypeParameters(node) {
|
|
|
15867
15905
|
}
|
|
15868
15906
|
}
|
|
15869
15907
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
15908
|
+
Debug.type(node);
|
|
15870
15909
|
switch (node.kind) {
|
|
15871
15910
|
case 176 /* CallSignature */:
|
|
15872
15911
|
case 177 /* ConstructSignature */:
|
|
@@ -19403,7 +19442,7 @@ function getInitializedVariables(node) {
|
|
|
19403
19442
|
return filter(node.declarations, isInitializedVariable);
|
|
19404
19443
|
}
|
|
19405
19444
|
function isInitializedVariable(node) {
|
|
19406
|
-
return node.initializer !== void 0;
|
|
19445
|
+
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
19407
19446
|
}
|
|
19408
19447
|
function isWatchSet(options) {
|
|
19409
19448
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -19590,7 +19629,7 @@ function isObjectTypeDeclaration(node) {
|
|
|
19590
19629
|
return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);
|
|
19591
19630
|
}
|
|
19592
19631
|
function isTypeNodeKind(kind) {
|
|
19593
|
-
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 */;
|
|
19632
|
+
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 */;
|
|
19594
19633
|
}
|
|
19595
19634
|
function isAccessExpression(node) {
|
|
19596
19635
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -37910,7 +37949,7 @@ var commandOptionsWithoutBuild = [
|
|
|
37910
37949
|
{
|
|
37911
37950
|
name: "allowImportingTsExtensions",
|
|
37912
37951
|
type: "boolean",
|
|
37913
|
-
|
|
37952
|
+
affectsSemanticDiagnostics: true,
|
|
37914
37953
|
category: Diagnostics.Modules,
|
|
37915
37954
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
37916
37955
|
defaultValueDescription: false
|
|
@@ -40111,6 +40150,7 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
|
|
|
40111
40150
|
}
|
|
40112
40151
|
}
|
|
40113
40152
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
40153
|
+
Debug.assert(typeof spec === "string");
|
|
40114
40154
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
40115
40155
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
40116
40156
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -42692,7 +42732,7 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
42692
42732
|
}
|
|
42693
42733
|
}
|
|
42694
42734
|
function shouldAllowImportingTsExtension(compilerOptions, fromFileName) {
|
|
42695
|
-
return
|
|
42735
|
+
return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName);
|
|
42696
42736
|
}
|
|
42697
42737
|
function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
|
|
42698
42738
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -47469,7 +47509,7 @@ function createTypeChecker(host) {
|
|
|
47469
47509
|
if (jsxFragmentPragma) {
|
|
47470
47510
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
47471
47511
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
47472
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
47512
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
|
|
47473
47513
|
if (file.localJsxFragmentFactory) {
|
|
47474
47514
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
47475
47515
|
}
|
|
@@ -47512,7 +47552,7 @@ function createTypeChecker(host) {
|
|
|
47512
47552
|
if (jsxPragma) {
|
|
47513
47553
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
47514
47554
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
47515
|
-
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
47555
|
+
visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
|
|
47516
47556
|
if (file.localJsxFactory) {
|
|
47517
47557
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
47518
47558
|
}
|
|
@@ -49023,6 +49063,7 @@ function createTypeChecker(host) {
|
|
|
49023
49063
|
return valueSymbol;
|
|
49024
49064
|
}
|
|
49025
49065
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
49066
|
+
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
49026
49067
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
49027
49068
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
49028
49069
|
if (valueSymbol.valueDeclaration)
|
|
@@ -52662,7 +52703,7 @@ function createTypeChecker(host) {
|
|
|
52662
52703
|
}
|
|
52663
52704
|
let hadError = false;
|
|
52664
52705
|
const file = getSourceFileOfNode(existing);
|
|
52665
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
52706
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
52666
52707
|
if (hadError) {
|
|
52667
52708
|
return void 0;
|
|
52668
52709
|
}
|
|
@@ -52675,16 +52716,16 @@ function createTypeChecker(host) {
|
|
|
52675
52716
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
52676
52717
|
}
|
|
52677
52718
|
if (isJSDocNullableType(node)) {
|
|
52678
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
52719
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
|
|
52679
52720
|
}
|
|
52680
52721
|
if (isJSDocOptionalType(node)) {
|
|
52681
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
52722
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
52682
52723
|
}
|
|
52683
52724
|
if (isJSDocNonNullableType(node)) {
|
|
52684
52725
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
52685
52726
|
}
|
|
52686
52727
|
if (isJSDocVariadicType(node)) {
|
|
52687
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
52728
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
52688
52729
|
}
|
|
52689
52730
|
if (isJSDocTypeLiteral(node)) {
|
|
52690
52731
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -52696,7 +52737,7 @@ function createTypeChecker(host) {
|
|
|
52696
52737
|
void 0,
|
|
52697
52738
|
name,
|
|
52698
52739
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
52699
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52740
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52700
52741
|
);
|
|
52701
52742
|
}));
|
|
52702
52743
|
}
|
|
@@ -52715,9 +52756,9 @@ function createTypeChecker(host) {
|
|
|
52715
52756
|
"x",
|
|
52716
52757
|
/*questionToken*/
|
|
52717
52758
|
void 0,
|
|
52718
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
52759
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
|
|
52719
52760
|
)],
|
|
52720
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
52761
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
|
|
52721
52762
|
)]);
|
|
52722
52763
|
}
|
|
52723
52764
|
if (isJSDocFunctionType(node)) {
|
|
@@ -52726,33 +52767,33 @@ function createTypeChecker(host) {
|
|
|
52726
52767
|
return factory.createConstructorTypeNode(
|
|
52727
52768
|
/*modifiers*/
|
|
52728
52769
|
void 0,
|
|
52729
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
52770
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
52730
52771
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
52731
52772
|
/*modifiers*/
|
|
52732
52773
|
void 0,
|
|
52733
52774
|
getEffectiveDotDotDotForParameter(p),
|
|
52734
52775
|
getNameForJSDocFunctionParameter(p, i),
|
|
52735
52776
|
p.questionToken,
|
|
52736
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
52777
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
52737
52778
|
/*initializer*/
|
|
52738
52779
|
void 0
|
|
52739
52780
|
)),
|
|
52740
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52781
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52741
52782
|
);
|
|
52742
52783
|
} else {
|
|
52743
52784
|
return factory.createFunctionTypeNode(
|
|
52744
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
52785
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
52745
52786
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
52746
52787
|
/*modifiers*/
|
|
52747
52788
|
void 0,
|
|
52748
52789
|
getEffectiveDotDotDotForParameter(p),
|
|
52749
52790
|
getNameForJSDocFunctionParameter(p, i),
|
|
52750
52791
|
p.questionToken,
|
|
52751
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
52792
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
52752
52793
|
/*initializer*/
|
|
52753
52794
|
void 0
|
|
52754
52795
|
)),
|
|
52755
|
-
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52796
|
+
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52756
52797
|
);
|
|
52757
52798
|
}
|
|
52758
52799
|
}
|
|
@@ -53674,7 +53715,7 @@ function createTypeChecker(host) {
|
|
|
53674
53715
|
break;
|
|
53675
53716
|
}
|
|
53676
53717
|
case 268 /* ImportEqualsDeclaration */:
|
|
53677
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
53718
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
|
|
53678
53719
|
serializeMaybeAliasAssignment(symbol);
|
|
53679
53720
|
break;
|
|
53680
53721
|
}
|
|
@@ -69149,7 +69190,7 @@ function createTypeChecker(host) {
|
|
|
69149
69190
|
return getNonMissingTypeOfSymbol(symbol);
|
|
69150
69191
|
}
|
|
69151
69192
|
function getControlFlowContainer(node) {
|
|
69152
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
69193
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 295 /* CatchClause */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
69153
69194
|
}
|
|
69154
69195
|
function isSymbolAssigned(symbol) {
|
|
69155
69196
|
if (!symbol.valueDeclaration) {
|
|
@@ -69407,13 +69448,14 @@ function createTypeChecker(host) {
|
|
|
69407
69448
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
69408
69449
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
69409
69450
|
let flowContainer = getControlFlowContainer(node);
|
|
69451
|
+
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
69410
69452
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
69411
69453
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
69412
69454
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
69413
69455
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
69414
69456
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
69415
69457
|
}
|
|
69416
|
-
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
69458
|
+
const assumeInitialized = isParameter2 || isCatch || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
69417
69459
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
69418
69460
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
69419
69461
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -86018,13 +86060,10 @@ var SymbolTrackerImpl = class {
|
|
|
86018
86060
|
|
|
86019
86061
|
// src/compiler/visitorPublic.ts
|
|
86020
86062
|
function visitNode(node, visitor, test, lift) {
|
|
86021
|
-
if (node === void 0
|
|
86063
|
+
if (node === void 0) {
|
|
86022
86064
|
return node;
|
|
86023
86065
|
}
|
|
86024
86066
|
const visited = visitor(node);
|
|
86025
|
-
if (visited === node) {
|
|
86026
|
-
return node;
|
|
86027
|
-
}
|
|
86028
86067
|
let visitedNode;
|
|
86029
86068
|
if (visited === void 0) {
|
|
86030
86069
|
return void 0;
|
|
@@ -86037,7 +86076,7 @@ function visitNode(node, visitor, test, lift) {
|
|
|
86037
86076
|
return visitedNode;
|
|
86038
86077
|
}
|
|
86039
86078
|
function visitNodes2(nodes, visitor, test, start2, count) {
|
|
86040
|
-
if (nodes === void 0
|
|
86079
|
+
if (nodes === void 0) {
|
|
86041
86080
|
return nodes;
|
|
86042
86081
|
}
|
|
86043
86082
|
const length2 = nodes.length;
|
|
@@ -86086,25 +86125,30 @@ function visitArrayWorker(nodes, visitor, test, start2, count) {
|
|
|
86086
86125
|
}
|
|
86087
86126
|
for (let i = 0; i < count; i++) {
|
|
86088
86127
|
const node = nodes[i + start2];
|
|
86089
|
-
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
86128
|
+
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
86090
86129
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
86091
86130
|
if (updated === void 0) {
|
|
86092
86131
|
updated = nodes.slice(0, i);
|
|
86132
|
+
Debug.assertEachNode(updated, test);
|
|
86093
86133
|
}
|
|
86094
86134
|
if (visited) {
|
|
86095
86135
|
if (isArray(visited)) {
|
|
86096
86136
|
for (const visitedNode of visited) {
|
|
86097
|
-
|
|
86137
|
+
Debug.assertNode(visitedNode, test);
|
|
86098
86138
|
updated.push(visitedNode);
|
|
86099
86139
|
}
|
|
86100
86140
|
} else {
|
|
86101
|
-
|
|
86141
|
+
Debug.assertNode(visited, test);
|
|
86102
86142
|
updated.push(visited);
|
|
86103
86143
|
}
|
|
86104
86144
|
}
|
|
86105
86145
|
}
|
|
86106
86146
|
}
|
|
86107
|
-
|
|
86147
|
+
if (updated) {
|
|
86148
|
+
return updated;
|
|
86149
|
+
}
|
|
86150
|
+
Debug.assertEachNode(nodes, test);
|
|
86151
|
+
return nodes;
|
|
86108
86152
|
}
|
|
86109
86153
|
function visitLexicalEnvironment(statements, visitor, context, start2, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
86110
86154
|
context.startLexicalEnvironment();
|
|
@@ -86118,7 +86162,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
|
|
|
86118
86162
|
context.startLexicalEnvironment();
|
|
86119
86163
|
if (nodes) {
|
|
86120
86164
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
86121
|
-
updated = nodesVisitor(nodes, visitor,
|
|
86165
|
+
updated = nodesVisitor(nodes, visitor, isParameter);
|
|
86122
86166
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
86123
86167
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
86124
86168
|
}
|
|
@@ -86240,6 +86284,7 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
|
|
|
86240
86284
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
86241
86285
|
context.startBlockScope();
|
|
86242
86286
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
86287
|
+
Debug.assert(updated);
|
|
86243
86288
|
const declarations = context.endBlockScope();
|
|
86244
86289
|
if (some(declarations)) {
|
|
86245
86290
|
if (isBlock(updated)) {
|
|
@@ -86262,14 +86307,14 @@ var visitEachChildTable = {
|
|
|
86262
86307
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86263
86308
|
return context.factory.updateQualifiedName(
|
|
86264
86309
|
node,
|
|
86265
|
-
nodeVisitor(node.left, visitor, isEntityName),
|
|
86266
|
-
nodeVisitor(node.right, visitor, isIdentifier)
|
|
86310
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
|
|
86311
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
|
|
86267
86312
|
);
|
|
86268
86313
|
},
|
|
86269
86314
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86270
86315
|
return context.factory.updateComputedPropertyName(
|
|
86271
86316
|
node,
|
|
86272
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86317
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86273
86318
|
);
|
|
86274
86319
|
},
|
|
86275
86320
|
// Signature elements
|
|
@@ -86277,7 +86322,7 @@ var visitEachChildTable = {
|
|
|
86277
86322
|
return context.factory.updateTypeParameterDeclaration(
|
|
86278
86323
|
node,
|
|
86279
86324
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86280
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86325
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
86281
86326
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
86282
86327
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
86283
86328
|
);
|
|
@@ -86286,9 +86331,9 @@ var visitEachChildTable = {
|
|
|
86286
86331
|
return context.factory.updateParameterDeclaration(
|
|
86287
86332
|
node,
|
|
86288
86333
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86289
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86290
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
86291
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86334
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
86335
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
86336
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
86292
86337
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86293
86338
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86294
86339
|
);
|
|
@@ -86296,7 +86341,7 @@ var visitEachChildTable = {
|
|
|
86296
86341
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86297
86342
|
return context.factory.updateDecorator(
|
|
86298
86343
|
node,
|
|
86299
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86344
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86300
86345
|
);
|
|
86301
86346
|
},
|
|
86302
86347
|
// Type elements
|
|
@@ -86304,19 +86349,19 @@ var visitEachChildTable = {
|
|
|
86304
86349
|
return context.factory.updatePropertySignature(
|
|
86305
86350
|
node,
|
|
86306
86351
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86307
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86308
|
-
nodeVisitor(node.questionToken, tokenVisitor,
|
|
86352
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86353
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
86309
86354
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86310
86355
|
);
|
|
86311
86356
|
},
|
|
86312
86357
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86313
|
-
var _a2;
|
|
86358
|
+
var _a2, _b;
|
|
86314
86359
|
return context.factory.updatePropertyDeclaration(
|
|
86315
86360
|
node,
|
|
86316
86361
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86317
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86362
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86318
86363
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
86319
|
-
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
86364
|
+
tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
|
|
86320
86365
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86321
86366
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86322
86367
|
);
|
|
@@ -86325,10 +86370,10 @@ var visitEachChildTable = {
|
|
|
86325
86370
|
return context.factory.updateMethodSignature(
|
|
86326
86371
|
node,
|
|
86327
86372
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86328
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86329
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86373
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86374
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
86330
86375
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86331
|
-
nodesVisitor(node.parameters, visitor,
|
|
86376
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86332
86377
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86333
86378
|
);
|
|
86334
86379
|
},
|
|
@@ -86336,9 +86381,9 @@ var visitEachChildTable = {
|
|
|
86336
86381
|
return context.factory.updateMethodDeclaration(
|
|
86337
86382
|
node,
|
|
86338
86383
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86339
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86340
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86341
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86384
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
86385
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86386
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
86342
86387
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86343
86388
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86344
86389
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -86357,7 +86402,7 @@ var visitEachChildTable = {
|
|
|
86357
86402
|
return context.factory.updateGetAccessorDeclaration(
|
|
86358
86403
|
node,
|
|
86359
86404
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86360
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86405
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86361
86406
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86362
86407
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86363
86408
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -86367,7 +86412,7 @@ var visitEachChildTable = {
|
|
|
86367
86412
|
return context.factory.updateSetAccessorDeclaration(
|
|
86368
86413
|
node,
|
|
86369
86414
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86370
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86415
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
86371
86416
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86372
86417
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
86373
86418
|
);
|
|
@@ -86384,7 +86429,7 @@ var visitEachChildTable = {
|
|
|
86384
86429
|
return context.factory.updateCallSignature(
|
|
86385
86430
|
node,
|
|
86386
86431
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86387
|
-
nodesVisitor(node.parameters, visitor,
|
|
86432
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86388
86433
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86389
86434
|
);
|
|
86390
86435
|
},
|
|
@@ -86392,7 +86437,7 @@ var visitEachChildTable = {
|
|
|
86392
86437
|
return context.factory.updateConstructSignature(
|
|
86393
86438
|
node,
|
|
86394
86439
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86395
|
-
nodesVisitor(node.parameters, visitor,
|
|
86440
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86396
86441
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86397
86442
|
);
|
|
86398
86443
|
},
|
|
@@ -86400,8 +86445,8 @@ var visitEachChildTable = {
|
|
|
86400
86445
|
return context.factory.updateIndexSignature(
|
|
86401
86446
|
node,
|
|
86402
86447
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86403
|
-
nodesVisitor(node.parameters, visitor,
|
|
86404
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86448
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86449
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86405
86450
|
);
|
|
86406
86451
|
},
|
|
86407
86452
|
// Types
|
|
@@ -86409,14 +86454,14 @@ var visitEachChildTable = {
|
|
|
86409
86454
|
return context.factory.updateTypePredicateNode(
|
|
86410
86455
|
node,
|
|
86411
86456
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
86412
|
-
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
86457
|
+
Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
|
|
86413
86458
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86414
86459
|
);
|
|
86415
86460
|
},
|
|
86416
86461
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86417
86462
|
return context.factory.updateTypeReferenceNode(
|
|
86418
86463
|
node,
|
|
86419
|
-
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
86464
|
+
Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
|
|
86420
86465
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86421
86466
|
);
|
|
86422
86467
|
},
|
|
@@ -86424,8 +86469,8 @@ var visitEachChildTable = {
|
|
|
86424
86469
|
return context.factory.updateFunctionTypeNode(
|
|
86425
86470
|
node,
|
|
86426
86471
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86427
|
-
nodesVisitor(node.parameters, visitor,
|
|
86428
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86472
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86473
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86429
86474
|
);
|
|
86430
86475
|
},
|
|
86431
86476
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -86433,14 +86478,14 @@ var visitEachChildTable = {
|
|
|
86433
86478
|
node,
|
|
86434
86479
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86435
86480
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86436
|
-
nodesVisitor(node.parameters, visitor,
|
|
86437
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86481
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
86482
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86438
86483
|
);
|
|
86439
86484
|
},
|
|
86440
86485
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86441
86486
|
return context.factory.updateTypeQueryNode(
|
|
86442
86487
|
node,
|
|
86443
|
-
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
86488
|
+
Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
|
|
86444
86489
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86445
86490
|
);
|
|
86446
86491
|
},
|
|
@@ -86453,7 +86498,7 @@ var visitEachChildTable = {
|
|
|
86453
86498
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86454
86499
|
return context.factory.updateArrayTypeNode(
|
|
86455
86500
|
node,
|
|
86456
|
-
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
86501
|
+
Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
|
|
86457
86502
|
);
|
|
86458
86503
|
},
|
|
86459
86504
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -86465,13 +86510,13 @@ var visitEachChildTable = {
|
|
|
86465
86510
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86466
86511
|
return context.factory.updateOptionalTypeNode(
|
|
86467
86512
|
node,
|
|
86468
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86513
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86469
86514
|
);
|
|
86470
86515
|
},
|
|
86471
86516
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86472
86517
|
return context.factory.updateRestTypeNode(
|
|
86473
86518
|
node,
|
|
86474
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86519
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86475
86520
|
);
|
|
86476
86521
|
},
|
|
86477
86522
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -86489,22 +86534,22 @@ var visitEachChildTable = {
|
|
|
86489
86534
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86490
86535
|
return context.factory.updateConditionalTypeNode(
|
|
86491
86536
|
node,
|
|
86492
|
-
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
86493
|
-
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
86494
|
-
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
86495
|
-
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
86537
|
+
Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
|
|
86538
|
+
Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
|
|
86539
|
+
Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
|
|
86540
|
+
Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
|
|
86496
86541
|
);
|
|
86497
86542
|
},
|
|
86498
86543
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86499
86544
|
return context.factory.updateInferTypeNode(
|
|
86500
86545
|
node,
|
|
86501
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
86546
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
|
|
86502
86547
|
);
|
|
86503
86548
|
},
|
|
86504
86549
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86505
86550
|
return context.factory.updateImportTypeNode(
|
|
86506
86551
|
node,
|
|
86507
|
-
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
86552
|
+
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
86508
86553
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
86509
86554
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
86510
86555
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -86514,45 +86559,45 @@ var visitEachChildTable = {
|
|
|
86514
86559
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86515
86560
|
return context.factory.updateImportTypeAssertionContainer(
|
|
86516
86561
|
node,
|
|
86517
|
-
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
86562
|
+
Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
|
|
86518
86563
|
node.multiLine
|
|
86519
86564
|
);
|
|
86520
86565
|
},
|
|
86521
86566
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86522
86567
|
return context.factory.updateNamedTupleMember(
|
|
86523
86568
|
node,
|
|
86524
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86525
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86526
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86527
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86569
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
86570
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
86571
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
86572
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86528
86573
|
);
|
|
86529
86574
|
},
|
|
86530
86575
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86531
86576
|
return context.factory.updateParenthesizedType(
|
|
86532
86577
|
node,
|
|
86533
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86578
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86534
86579
|
);
|
|
86535
86580
|
},
|
|
86536
86581
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86537
86582
|
return context.factory.updateTypeOperatorNode(
|
|
86538
86583
|
node,
|
|
86539
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86584
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86540
86585
|
);
|
|
86541
86586
|
},
|
|
86542
86587
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86543
86588
|
return context.factory.updateIndexedAccessTypeNode(
|
|
86544
86589
|
node,
|
|
86545
|
-
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
86546
|
-
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
86590
|
+
Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
|
|
86591
|
+
Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
|
|
86547
86592
|
);
|
|
86548
86593
|
},
|
|
86549
86594
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86550
86595
|
return context.factory.updateMappedTypeNode(
|
|
86551
86596
|
node,
|
|
86552
|
-
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
86553
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
86597
|
+
tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
|
|
86598
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
|
|
86554
86599
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
86555
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
86600
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
|
|
86556
86601
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86557
86602
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
86558
86603
|
);
|
|
@@ -86560,21 +86605,21 @@ var visitEachChildTable = {
|
|
|
86560
86605
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86561
86606
|
return context.factory.updateLiteralTypeNode(
|
|
86562
86607
|
node,
|
|
86563
|
-
nodeVisitor(node.literal, visitor,
|
|
86608
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
|
|
86564
86609
|
);
|
|
86565
86610
|
},
|
|
86566
86611
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86567
86612
|
return context.factory.updateTemplateLiteralType(
|
|
86568
86613
|
node,
|
|
86569
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
86614
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
86570
86615
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
86571
86616
|
);
|
|
86572
86617
|
},
|
|
86573
86618
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86574
86619
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
86575
86620
|
node,
|
|
86576
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86577
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
86621
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
86622
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
86578
86623
|
);
|
|
86579
86624
|
},
|
|
86580
86625
|
// Binding patterns
|
|
@@ -86593,9 +86638,9 @@ var visitEachChildTable = {
|
|
|
86593
86638
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86594
86639
|
return context.factory.updateBindingElement(
|
|
86595
86640
|
node,
|
|
86596
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86641
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
86597
86642
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
86598
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
86643
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
86599
86644
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86600
86645
|
);
|
|
86601
86646
|
},
|
|
@@ -86615,37 +86660,37 @@ var visitEachChildTable = {
|
|
|
86615
86660
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86616
86661
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
86617
86662
|
node,
|
|
86618
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86619
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86620
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
86663
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86664
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
86665
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
86621
86666
|
) : context.factory.updatePropertyAccessExpression(
|
|
86622
86667
|
node,
|
|
86623
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86624
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
86668
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86669
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
86625
86670
|
);
|
|
86626
86671
|
},
|
|
86627
86672
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86628
86673
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
86629
86674
|
node,
|
|
86630
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86631
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86632
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
86675
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86676
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
86677
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
86633
86678
|
) : context.factory.updateElementAccessExpression(
|
|
86634
86679
|
node,
|
|
86635
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86636
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
86680
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86681
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
86637
86682
|
);
|
|
86638
86683
|
},
|
|
86639
86684
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86640
86685
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
86641
86686
|
node,
|
|
86642
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86643
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86687
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86688
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
86644
86689
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86645
86690
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86646
86691
|
) : context.factory.updateCallExpression(
|
|
86647
86692
|
node,
|
|
86648
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86693
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86649
86694
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86650
86695
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86651
86696
|
);
|
|
@@ -86653,7 +86698,7 @@ var visitEachChildTable = {
|
|
|
86653
86698
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86654
86699
|
return context.factory.updateNewExpression(
|
|
86655
86700
|
node,
|
|
86656
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86701
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86657
86702
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86658
86703
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86659
86704
|
);
|
|
@@ -86661,29 +86706,29 @@ var visitEachChildTable = {
|
|
|
86661
86706
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86662
86707
|
return context.factory.updateTaggedTemplateExpression(
|
|
86663
86708
|
node,
|
|
86664
|
-
nodeVisitor(node.tag, visitor, isExpression),
|
|
86709
|
+
Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
|
|
86665
86710
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86666
|
-
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
86711
|
+
Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
|
|
86667
86712
|
);
|
|
86668
86713
|
},
|
|
86669
86714
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86670
86715
|
return context.factory.updateTypeAssertion(
|
|
86671
86716
|
node,
|
|
86672
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86673
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86717
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
86718
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86674
86719
|
);
|
|
86675
86720
|
},
|
|
86676
86721
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86677
86722
|
return context.factory.updateParenthesizedExpression(
|
|
86678
86723
|
node,
|
|
86679
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86724
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86680
86725
|
);
|
|
86681
86726
|
},
|
|
86682
86727
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86683
86728
|
return context.factory.updateFunctionExpression(
|
|
86684
86729
|
node,
|
|
86685
86730
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86686
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86731
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
86687
86732
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86688
86733
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86689
86734
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -86698,82 +86743,82 @@ var visitEachChildTable = {
|
|
|
86698
86743
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86699
86744
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86700
86745
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86701
|
-
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
86746
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
|
|
86702
86747
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
86703
86748
|
);
|
|
86704
86749
|
},
|
|
86705
86750
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86706
86751
|
return context.factory.updateDeleteExpression(
|
|
86707
86752
|
node,
|
|
86708
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86753
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86709
86754
|
);
|
|
86710
86755
|
},
|
|
86711
86756
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86712
86757
|
return context.factory.updateTypeOfExpression(
|
|
86713
86758
|
node,
|
|
86714
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86759
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86715
86760
|
);
|
|
86716
86761
|
},
|
|
86717
86762
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86718
86763
|
return context.factory.updateVoidExpression(
|
|
86719
86764
|
node,
|
|
86720
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86765
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86721
86766
|
);
|
|
86722
86767
|
},
|
|
86723
86768
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86724
86769
|
return context.factory.updateAwaitExpression(
|
|
86725
86770
|
node,
|
|
86726
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86771
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86727
86772
|
);
|
|
86728
86773
|
},
|
|
86729
86774
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86730
86775
|
return context.factory.updatePrefixUnaryExpression(
|
|
86731
86776
|
node,
|
|
86732
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
86777
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
86733
86778
|
);
|
|
86734
86779
|
},
|
|
86735
86780
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86736
86781
|
return context.factory.updatePostfixUnaryExpression(
|
|
86737
86782
|
node,
|
|
86738
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
86783
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
86739
86784
|
);
|
|
86740
86785
|
},
|
|
86741
86786
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86742
86787
|
return context.factory.updateBinaryExpression(
|
|
86743
86788
|
node,
|
|
86744
|
-
nodeVisitor(node.left, visitor, isExpression),
|
|
86745
|
-
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
86746
|
-
nodeVisitor(node.right, visitor, isExpression)
|
|
86789
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
|
|
86790
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
|
|
86791
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
|
|
86747
86792
|
);
|
|
86748
86793
|
},
|
|
86749
86794
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86750
86795
|
return context.factory.updateConditionalExpression(
|
|
86751
86796
|
node,
|
|
86752
|
-
nodeVisitor(node.condition, visitor, isExpression),
|
|
86753
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86754
|
-
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
86755
|
-
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
86756
|
-
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
86797
|
+
Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
|
|
86798
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
|
|
86799
|
+
Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
|
|
86800
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
|
|
86801
|
+
Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
|
|
86757
86802
|
);
|
|
86758
86803
|
},
|
|
86759
86804
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86760
86805
|
return context.factory.updateTemplateExpression(
|
|
86761
86806
|
node,
|
|
86762
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
86807
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
86763
86808
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
86764
86809
|
);
|
|
86765
86810
|
},
|
|
86766
86811
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86767
86812
|
return context.factory.updateYieldExpression(
|
|
86768
86813
|
node,
|
|
86769
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86814
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
86770
86815
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
86771
86816
|
);
|
|
86772
86817
|
},
|
|
86773
86818
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86774
86819
|
return context.factory.updateSpreadElement(
|
|
86775
86820
|
node,
|
|
86776
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86821
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86777
86822
|
);
|
|
86778
86823
|
},
|
|
86779
86824
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -86789,45 +86834,45 @@ var visitEachChildTable = {
|
|
|
86789
86834
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86790
86835
|
return context.factory.updateExpressionWithTypeArguments(
|
|
86791
86836
|
node,
|
|
86792
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86837
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86793
86838
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86794
86839
|
);
|
|
86795
86840
|
},
|
|
86796
86841
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86797
86842
|
return context.factory.updateAsExpression(
|
|
86798
86843
|
node,
|
|
86799
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86800
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86844
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86845
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86801
86846
|
);
|
|
86802
86847
|
},
|
|
86803
86848
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86804
86849
|
return context.factory.updateSatisfiesExpression(
|
|
86805
86850
|
node,
|
|
86806
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86807
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86851
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86852
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
86808
86853
|
);
|
|
86809
86854
|
},
|
|
86810
86855
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86811
86856
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
86812
86857
|
node,
|
|
86813
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86858
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86814
86859
|
) : context.factory.updateNonNullExpression(
|
|
86815
86860
|
node,
|
|
86816
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86861
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86817
86862
|
);
|
|
86818
86863
|
},
|
|
86819
86864
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86820
86865
|
return context.factory.updateMetaProperty(
|
|
86821
86866
|
node,
|
|
86822
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
86867
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
86823
86868
|
);
|
|
86824
86869
|
},
|
|
86825
86870
|
// Misc
|
|
86826
86871
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86827
86872
|
return context.factory.updateTemplateSpan(
|
|
86828
86873
|
node,
|
|
86829
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86830
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
86874
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86875
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
86831
86876
|
);
|
|
86832
86877
|
},
|
|
86833
86878
|
// Element
|
|
@@ -86841,20 +86886,20 @@ var visitEachChildTable = {
|
|
|
86841
86886
|
return context.factory.updateVariableStatement(
|
|
86842
86887
|
node,
|
|
86843
86888
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86844
|
-
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
86889
|
+
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
86845
86890
|
);
|
|
86846
86891
|
},
|
|
86847
86892
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86848
86893
|
return context.factory.updateExpressionStatement(
|
|
86849
86894
|
node,
|
|
86850
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86895
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86851
86896
|
);
|
|
86852
86897
|
},
|
|
86853
86898
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86854
86899
|
return context.factory.updateIfStatement(
|
|
86855
86900
|
node,
|
|
86856
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86857
|
-
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
86901
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86902
|
+
Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
|
|
86858
86903
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
86859
86904
|
);
|
|
86860
86905
|
},
|
|
@@ -86862,13 +86907,13 @@ var visitEachChildTable = {
|
|
|
86862
86907
|
return context.factory.updateDoStatement(
|
|
86863
86908
|
node,
|
|
86864
86909
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
86865
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86910
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86866
86911
|
);
|
|
86867
86912
|
},
|
|
86868
86913
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86869
86914
|
return context.factory.updateWhileStatement(
|
|
86870
86915
|
node,
|
|
86871
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86916
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86872
86917
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86873
86918
|
);
|
|
86874
86919
|
},
|
|
@@ -86884,17 +86929,17 @@ var visitEachChildTable = {
|
|
|
86884
86929
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86885
86930
|
return context.factory.updateForInStatement(
|
|
86886
86931
|
node,
|
|
86887
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
86888
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86932
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
86933
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86889
86934
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86890
86935
|
);
|
|
86891
86936
|
},
|
|
86892
86937
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86893
86938
|
return context.factory.updateForOfStatement(
|
|
86894
86939
|
node,
|
|
86895
|
-
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
86896
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
86897
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86940
|
+
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
|
86941
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
86942
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86898
86943
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86899
86944
|
);
|
|
86900
86945
|
},
|
|
@@ -86919,34 +86964,34 @@ var visitEachChildTable = {
|
|
|
86919
86964
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86920
86965
|
return context.factory.updateWithStatement(
|
|
86921
86966
|
node,
|
|
86922
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86923
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
86967
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86968
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
86924
86969
|
);
|
|
86925
86970
|
},
|
|
86926
86971
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86927
86972
|
return context.factory.updateSwitchStatement(
|
|
86928
86973
|
node,
|
|
86929
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
86930
|
-
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
86974
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
86975
|
+
Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
|
|
86931
86976
|
);
|
|
86932
86977
|
},
|
|
86933
86978
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86934
86979
|
return context.factory.updateLabeledStatement(
|
|
86935
86980
|
node,
|
|
86936
|
-
nodeVisitor(node.label, visitor, isIdentifier),
|
|
86937
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
86981
|
+
Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
|
|
86982
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
86938
86983
|
);
|
|
86939
86984
|
},
|
|
86940
86985
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86941
86986
|
return context.factory.updateThrowStatement(
|
|
86942
86987
|
node,
|
|
86943
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
86988
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86944
86989
|
);
|
|
86945
86990
|
},
|
|
86946
86991
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86947
86992
|
return context.factory.updateTryStatement(
|
|
86948
86993
|
node,
|
|
86949
|
-
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
86994
|
+
Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
|
|
86950
86995
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
86951
86996
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
86952
86997
|
);
|
|
@@ -86954,8 +86999,8 @@ var visitEachChildTable = {
|
|
|
86954
86999
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86955
87000
|
return context.factory.updateVariableDeclaration(
|
|
86956
87001
|
node,
|
|
86957
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
86958
|
-
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
87002
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
87003
|
+
tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
|
|
86959
87004
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86960
87005
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86961
87006
|
);
|
|
@@ -86970,7 +87015,7 @@ var visitEachChildTable = {
|
|
|
86970
87015
|
return context.factory.updateFunctionDeclaration(
|
|
86971
87016
|
node,
|
|
86972
87017
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86973
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
87018
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
86974
87019
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86975
87020
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86976
87021
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -86992,7 +87037,7 @@ var visitEachChildTable = {
|
|
|
86992
87037
|
return context.factory.updateInterfaceDeclaration(
|
|
86993
87038
|
node,
|
|
86994
87039
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86995
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87040
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
86996
87041
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86997
87042
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
86998
87043
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -87002,16 +87047,16 @@ var visitEachChildTable = {
|
|
|
87002
87047
|
return context.factory.updateTypeAliasDeclaration(
|
|
87003
87048
|
node,
|
|
87004
87049
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87005
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87050
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
87006
87051
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
87007
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
87052
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
87008
87053
|
);
|
|
87009
87054
|
},
|
|
87010
87055
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87011
87056
|
return context.factory.updateEnumDeclaration(
|
|
87012
87057
|
node,
|
|
87013
87058
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87014
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87059
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
87015
87060
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
87016
87061
|
);
|
|
87017
87062
|
},
|
|
@@ -87019,7 +87064,7 @@ var visitEachChildTable = {
|
|
|
87019
87064
|
return context.factory.updateModuleDeclaration(
|
|
87020
87065
|
node,
|
|
87021
87066
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87022
|
-
nodeVisitor(node.name, visitor, isModuleName),
|
|
87067
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
87023
87068
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
87024
87069
|
);
|
|
87025
87070
|
},
|
|
@@ -87038,7 +87083,7 @@ var visitEachChildTable = {
|
|
|
87038
87083
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87039
87084
|
return context.factory.updateNamespaceExportDeclaration(
|
|
87040
87085
|
node,
|
|
87041
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87086
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
87042
87087
|
);
|
|
87043
87088
|
},
|
|
87044
87089
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87046,8 +87091,8 @@ var visitEachChildTable = {
|
|
|
87046
87091
|
node,
|
|
87047
87092
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87048
87093
|
node.isTypeOnly,
|
|
87049
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87050
|
-
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
87094
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
87095
|
+
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
87051
87096
|
);
|
|
87052
87097
|
},
|
|
87053
87098
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87055,7 +87100,7 @@ var visitEachChildTable = {
|
|
|
87055
87100
|
node,
|
|
87056
87101
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87057
87102
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
87058
|
-
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
87103
|
+
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
87059
87104
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
87060
87105
|
);
|
|
87061
87106
|
},
|
|
@@ -87069,8 +87114,8 @@ var visitEachChildTable = {
|
|
|
87069
87114
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87070
87115
|
return context.factory.updateAssertEntry(
|
|
87071
87116
|
node,
|
|
87072
|
-
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
87073
|
-
nodeVisitor(node.value, visitor, isExpression)
|
|
87117
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
|
|
87118
|
+
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
87074
87119
|
);
|
|
87075
87120
|
},
|
|
87076
87121
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87084,13 +87129,13 @@ var visitEachChildTable = {
|
|
|
87084
87129
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87085
87130
|
return context.factory.updateNamespaceImport(
|
|
87086
87131
|
node,
|
|
87087
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87132
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
87088
87133
|
);
|
|
87089
87134
|
},
|
|
87090
87135
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87091
87136
|
return context.factory.updateNamespaceExport(
|
|
87092
87137
|
node,
|
|
87093
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87138
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
87094
87139
|
);
|
|
87095
87140
|
},
|
|
87096
87141
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -87104,14 +87149,14 @@ var visitEachChildTable = {
|
|
|
87104
87149
|
node,
|
|
87105
87150
|
node.isTypeOnly,
|
|
87106
87151
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
87107
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87152
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
87108
87153
|
);
|
|
87109
87154
|
},
|
|
87110
87155
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87111
87156
|
return context.factory.updateExportAssignment(
|
|
87112
87157
|
node,
|
|
87113
87158
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87114
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87159
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87115
87160
|
);
|
|
87116
87161
|
},
|
|
87117
87162
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87135,59 +87180,59 @@ var visitEachChildTable = {
|
|
|
87135
87180
|
node,
|
|
87136
87181
|
node.isTypeOnly,
|
|
87137
87182
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
87138
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87183
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
87139
87184
|
);
|
|
87140
87185
|
},
|
|
87141
87186
|
// Module references
|
|
87142
87187
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87143
87188
|
return context.factory.updateExternalModuleReference(
|
|
87144
87189
|
node,
|
|
87145
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87190
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87146
87191
|
);
|
|
87147
87192
|
},
|
|
87148
87193
|
// JSX
|
|
87149
87194
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87150
87195
|
return context.factory.updateJsxElement(
|
|
87151
87196
|
node,
|
|
87152
|
-
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
87197
|
+
Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
|
|
87153
87198
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
87154
|
-
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
87199
|
+
Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
|
|
87155
87200
|
);
|
|
87156
87201
|
},
|
|
87157
87202
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87158
87203
|
return context.factory.updateJsxSelfClosingElement(
|
|
87159
87204
|
node,
|
|
87160
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
87205
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87161
87206
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87162
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
87207
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
87163
87208
|
);
|
|
87164
87209
|
},
|
|
87165
87210
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87166
87211
|
return context.factory.updateJsxOpeningElement(
|
|
87167
87212
|
node,
|
|
87168
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
87213
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87169
87214
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87170
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
87215
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
87171
87216
|
);
|
|
87172
87217
|
},
|
|
87173
87218
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87174
87219
|
return context.factory.updateJsxClosingElement(
|
|
87175
87220
|
node,
|
|
87176
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
87221
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
|
|
87177
87222
|
);
|
|
87178
87223
|
},
|
|
87179
87224
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87180
87225
|
return context.factory.updateJsxFragment(
|
|
87181
87226
|
node,
|
|
87182
|
-
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
87227
|
+
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
|
87183
87228
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
87184
|
-
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
87229
|
+
Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
|
|
87185
87230
|
);
|
|
87186
87231
|
},
|
|
87187
87232
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87188
87233
|
return context.factory.updateJsxAttribute(
|
|
87189
87234
|
node,
|
|
87190
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87235
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
87191
87236
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
87192
87237
|
);
|
|
87193
87238
|
},
|
|
@@ -87200,20 +87245,20 @@ var visitEachChildTable = {
|
|
|
87200
87245
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87201
87246
|
return context.factory.updateJsxSpreadAttribute(
|
|
87202
87247
|
node,
|
|
87203
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87248
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87204
87249
|
);
|
|
87205
87250
|
},
|
|
87206
87251
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87207
87252
|
return context.factory.updateJsxExpression(
|
|
87208
87253
|
node,
|
|
87209
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87254
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87210
87255
|
);
|
|
87211
87256
|
},
|
|
87212
87257
|
// Clauses
|
|
87213
87258
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87214
87259
|
return context.factory.updateCaseClause(
|
|
87215
87260
|
node,
|
|
87216
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
87261
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
87217
87262
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
87218
87263
|
);
|
|
87219
87264
|
},
|
|
@@ -87233,35 +87278,35 @@ var visitEachChildTable = {
|
|
|
87233
87278
|
return context.factory.updateCatchClause(
|
|
87234
87279
|
node,
|
|
87235
87280
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
87236
|
-
nodeVisitor(node.block, visitor, isBlock)
|
|
87281
|
+
Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
|
|
87237
87282
|
);
|
|
87238
87283
|
},
|
|
87239
87284
|
// Property assignments
|
|
87240
87285
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87241
87286
|
return context.factory.updatePropertyAssignment(
|
|
87242
87287
|
node,
|
|
87243
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
87244
|
-
nodeVisitor(node.initializer, visitor, isExpression)
|
|
87288
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
87289
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
|
|
87245
87290
|
);
|
|
87246
87291
|
},
|
|
87247
87292
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87248
87293
|
return context.factory.updateShorthandPropertyAssignment(
|
|
87249
87294
|
node,
|
|
87250
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87295
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
87251
87296
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
87252
87297
|
);
|
|
87253
87298
|
},
|
|
87254
87299
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87255
87300
|
return context.factory.updateSpreadAssignment(
|
|
87256
87301
|
node,
|
|
87257
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87302
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87258
87303
|
);
|
|
87259
87304
|
},
|
|
87260
87305
|
// Enum
|
|
87261
87306
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87262
87307
|
return context.factory.updateEnumMember(
|
|
87263
87308
|
node,
|
|
87264
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
87309
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
87265
87310
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
87266
87311
|
);
|
|
87267
87312
|
},
|
|
@@ -87276,7 +87321,7 @@ var visitEachChildTable = {
|
|
|
87276
87321
|
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87277
87322
|
return context.factory.updatePartiallyEmittedExpression(
|
|
87278
87323
|
node,
|
|
87279
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
87324
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
87280
87325
|
);
|
|
87281
87326
|
},
|
|
87282
87327
|
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -88228,7 +88273,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88228
88273
|
location = node = value;
|
|
88229
88274
|
value = node.right;
|
|
88230
88275
|
} else {
|
|
88231
|
-
return visitNode(value, visitor, isExpression);
|
|
88276
|
+
return Debug.checkDefined(visitNode(value, visitor, isExpression));
|
|
88232
88277
|
}
|
|
88233
88278
|
}
|
|
88234
88279
|
}
|
|
@@ -88247,6 +88292,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88247
88292
|
};
|
|
88248
88293
|
if (value) {
|
|
88249
88294
|
value = visitNode(value, visitor, isExpression);
|
|
88295
|
+
Debug.assert(value);
|
|
88250
88296
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
88251
88297
|
value = ensureIdentifier(
|
|
88252
88298
|
flattenContext,
|
|
@@ -88288,7 +88334,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88288
88334
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
88289
88335
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
88290
88336
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
88291
|
-
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
88337
|
+
context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
|
|
88292
88338
|
location2
|
|
88293
88339
|
);
|
|
88294
88340
|
expression.original = original;
|
|
@@ -88345,7 +88391,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
|
|
|
88345
88391
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
88346
88392
|
initializer = ensureIdentifier(
|
|
88347
88393
|
flattenContext,
|
|
88348
|
-
visitNode(initializer, flattenContext.visitor),
|
|
88394
|
+
Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
|
|
88349
88395
|
/*reuseIdentifierExpressions*/
|
|
88350
88396
|
false,
|
|
88351
88397
|
initializer
|
|
@@ -88466,7 +88512,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent2, patter
|
|
|
88466
88512
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
88467
88513
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
88468
88514
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
88469
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
88515
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
|
|
88470
88516
|
} else {
|
|
88471
88517
|
if (bindingElements) {
|
|
88472
88518
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -88604,7 +88650,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
|
|
|
88604
88650
|
if (isComputedPropertyName(propertyName)) {
|
|
88605
88651
|
const argumentExpression = ensureIdentifier(
|
|
88606
88652
|
flattenContext,
|
|
88607
|
-
visitNode(propertyName.expression, flattenContext.visitor),
|
|
88653
|
+
Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
|
|
88608
88654
|
/*reuseIdentifierExpressions*/
|
|
88609
88655
|
false,
|
|
88610
88656
|
/*location*/
|
|
@@ -88647,6 +88693,7 @@ function makeArrayBindingPattern(factory2, elements) {
|
|
|
88647
88693
|
return factory2.createArrayBindingPattern(elements);
|
|
88648
88694
|
}
|
|
88649
88695
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
88696
|
+
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
88650
88697
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
88651
88698
|
}
|
|
88652
88699
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -88654,6 +88701,7 @@ function makeObjectBindingPattern(factory2, elements) {
|
|
|
88654
88701
|
return factory2.createObjectBindingPattern(elements);
|
|
88655
88702
|
}
|
|
88656
88703
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
88704
|
+
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
88657
88705
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
88658
88706
|
}
|
|
88659
88707
|
function makeBindingElement(factory2, name) {
|
|
@@ -88677,6 +88725,7 @@ var ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => {
|
|
|
88677
88725
|
})(ProcessLevel || {});
|
|
88678
88726
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
88679
88727
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
88728
|
+
Debug.assert(tag);
|
|
88680
88729
|
const templateArguments = [void 0];
|
|
88681
88730
|
const cookedStrings = [];
|
|
88682
88731
|
const rawStrings = [];
|
|
@@ -88693,7 +88742,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
|
|
|
88693
88742
|
for (const templateSpan of template.templateSpans) {
|
|
88694
88743
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
88695
88744
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
88696
|
-
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
88745
|
+
templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
|
|
88697
88746
|
}
|
|
88698
88747
|
}
|
|
88699
88748
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -89066,7 +89115,7 @@ function transformTypeScript(context) {
|
|
|
89066
89115
|
function visitObjectLiteralExpression(node) {
|
|
89067
89116
|
return factory2.updateObjectLiteralExpression(
|
|
89068
89117
|
node,
|
|
89069
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
89118
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
|
|
89070
89119
|
);
|
|
89071
89120
|
}
|
|
89072
89121
|
function getClassFacts(node, staticProperties) {
|
|
@@ -89264,6 +89313,7 @@ function transformTypeScript(context) {
|
|
|
89264
89313
|
const decorators = [];
|
|
89265
89314
|
for (const parameterDecorator of parameterDecorators) {
|
|
89266
89315
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
89316
|
+
Debug.assert(expression);
|
|
89267
89317
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
89268
89318
|
setTextRange(helper, parameterDecorator.expression);
|
|
89269
89319
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -89387,6 +89437,7 @@ function transformTypeScript(context) {
|
|
|
89387
89437
|
const name = member.name;
|
|
89388
89438
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
89389
89439
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
89440
|
+
Debug.assert(expression);
|
|
89390
89441
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
89391
89442
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
89392
89443
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -89394,7 +89445,7 @@ function transformTypeScript(context) {
|
|
|
89394
89445
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
89395
89446
|
}
|
|
89396
89447
|
}
|
|
89397
|
-
return visitNode(name, visitor, isPropertyName);
|
|
89448
|
+
return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
|
|
89398
89449
|
}
|
|
89399
89450
|
function visitHeritageClause(node) {
|
|
89400
89451
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -89405,7 +89456,7 @@ function transformTypeScript(context) {
|
|
|
89405
89456
|
function visitExpressionWithTypeArguments(node) {
|
|
89406
89457
|
return factory2.updateExpressionWithTypeArguments(
|
|
89407
89458
|
node,
|
|
89408
|
-
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
89459
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
89409
89460
|
/*typeArguments*/
|
|
89410
89461
|
void 0
|
|
89411
89462
|
);
|
|
@@ -89424,7 +89475,7 @@ function transformTypeScript(context) {
|
|
|
89424
89475
|
return factory2.updatePropertyDeclaration(
|
|
89425
89476
|
node,
|
|
89426
89477
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
89427
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
89478
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
89428
89479
|
/*questionOrExclamationToken*/
|
|
89429
89480
|
void 0,
|
|
89430
89481
|
/*type*/
|
|
@@ -89441,7 +89492,7 @@ function transformTypeScript(context) {
|
|
|
89441
89492
|
void 0,
|
|
89442
89493
|
/*type*/
|
|
89443
89494
|
void 0,
|
|
89444
|
-
visitNode(node.initializer, visitor)
|
|
89495
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
89445
89496
|
);
|
|
89446
89497
|
}
|
|
89447
89498
|
function visitConstructor(node) {
|
|
@@ -89660,7 +89711,7 @@ function transformTypeScript(context) {
|
|
|
89660
89711
|
elideNodes(factory2, node.modifiers),
|
|
89661
89712
|
// preserve positions, if available
|
|
89662
89713
|
node.dotDotDotToken,
|
|
89663
|
-
visitNode(node.name, visitor, isBindingName),
|
|
89714
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
89664
89715
|
/*questionToken*/
|
|
89665
89716
|
void 0,
|
|
89666
89717
|
/*type*/
|
|
@@ -89709,7 +89760,7 @@ function transformTypeScript(context) {
|
|
|
89709
89760
|
return setTextRange(
|
|
89710
89761
|
factory2.createAssignment(
|
|
89711
89762
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
89712
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
89763
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
89713
89764
|
),
|
|
89714
89765
|
/*location*/
|
|
89715
89766
|
node
|
|
@@ -89719,7 +89770,7 @@ function transformTypeScript(context) {
|
|
|
89719
89770
|
function visitVariableDeclaration(node) {
|
|
89720
89771
|
const updated = factory2.updateVariableDeclaration(
|
|
89721
89772
|
node,
|
|
89722
|
-
visitNode(node.name, visitor, isBindingName),
|
|
89773
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
89723
89774
|
/*exclamationToken*/
|
|
89724
89775
|
void 0,
|
|
89725
89776
|
/*type*/
|
|
@@ -89735,26 +89786,30 @@ function transformTypeScript(context) {
|
|
|
89735
89786
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
89736
89787
|
if (isAssertionExpression(innerExpression)) {
|
|
89737
89788
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89789
|
+
Debug.assert(expression);
|
|
89738
89790
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89739
89791
|
}
|
|
89740
89792
|
return visitEachChild(node, visitor, context);
|
|
89741
89793
|
}
|
|
89742
89794
|
function visitAssertionExpression(node) {
|
|
89743
89795
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89796
|
+
Debug.assert(expression);
|
|
89744
89797
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89745
89798
|
}
|
|
89746
89799
|
function visitNonNullExpression(node) {
|
|
89747
89800
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
89801
|
+
Debug.assert(expression);
|
|
89748
89802
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89749
89803
|
}
|
|
89750
89804
|
function visitSatisfiesExpression(node) {
|
|
89751
89805
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89806
|
+
Debug.assert(expression);
|
|
89752
89807
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89753
89808
|
}
|
|
89754
89809
|
function visitCallExpression(node) {
|
|
89755
89810
|
return factory2.updateCallExpression(
|
|
89756
89811
|
node,
|
|
89757
|
-
visitNode(node.expression, visitor, isExpression),
|
|
89812
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
89758
89813
|
/*typeArguments*/
|
|
89759
89814
|
void 0,
|
|
89760
89815
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -89763,7 +89818,7 @@ function transformTypeScript(context) {
|
|
|
89763
89818
|
function visitNewExpression(node) {
|
|
89764
89819
|
return factory2.updateNewExpression(
|
|
89765
89820
|
node,
|
|
89766
|
-
visitNode(node.expression, visitor, isExpression),
|
|
89821
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
89767
89822
|
/*typeArguments*/
|
|
89768
89823
|
void 0,
|
|
89769
89824
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -89772,28 +89827,28 @@ function transformTypeScript(context) {
|
|
|
89772
89827
|
function visitTaggedTemplateExpression(node) {
|
|
89773
89828
|
return factory2.updateTaggedTemplateExpression(
|
|
89774
89829
|
node,
|
|
89775
|
-
visitNode(node.tag, visitor, isExpression),
|
|
89830
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
89776
89831
|
/*typeArguments*/
|
|
89777
89832
|
void 0,
|
|
89778
|
-
visitNode(node.template, visitor,
|
|
89833
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
89779
89834
|
);
|
|
89780
89835
|
}
|
|
89781
89836
|
function visitJsxSelfClosingElement(node) {
|
|
89782
89837
|
return factory2.updateJsxSelfClosingElement(
|
|
89783
89838
|
node,
|
|
89784
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
89839
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
89785
89840
|
/*typeArguments*/
|
|
89786
89841
|
void 0,
|
|
89787
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
89842
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
89788
89843
|
);
|
|
89789
89844
|
}
|
|
89790
89845
|
function visitJsxJsxOpeningElement(node) {
|
|
89791
89846
|
return factory2.updateJsxOpeningElement(
|
|
89792
89847
|
node,
|
|
89793
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
89848
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
89794
89849
|
/*typeArguments*/
|
|
89795
89850
|
void 0,
|
|
89796
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
89851
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
89797
89852
|
);
|
|
89798
89853
|
}
|
|
89799
89854
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -89939,7 +89994,7 @@ function transformTypeScript(context) {
|
|
|
89939
89994
|
} else {
|
|
89940
89995
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
89941
89996
|
if (member.initializer) {
|
|
89942
|
-
return visitNode(member.initializer, visitor, isExpression);
|
|
89997
|
+
return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
|
|
89943
89998
|
} else {
|
|
89944
89999
|
return factory2.createVoidZero();
|
|
89945
90000
|
}
|
|
@@ -90220,7 +90275,7 @@ function transformTypeScript(context) {
|
|
|
90220
90275
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
90221
90276
|
}
|
|
90222
90277
|
function visitNamespaceExports(node) {
|
|
90223
|
-
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
90278
|
+
return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
|
|
90224
90279
|
}
|
|
90225
90280
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
90226
90281
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -90698,6 +90753,7 @@ function transformClassFields(context) {
|
|
|
90698
90753
|
const info = accessPrivateIdentifier(node.left);
|
|
90699
90754
|
if (info) {
|
|
90700
90755
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
90756
|
+
Debug.assert(receiver);
|
|
90701
90757
|
return setOriginalNode(
|
|
90702
90758
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
90703
90759
|
node
|
|
@@ -90715,6 +90771,7 @@ function transformClassFields(context) {
|
|
|
90715
90771
|
}
|
|
90716
90772
|
function visitComputedPropertyName(node) {
|
|
90717
90773
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
90774
|
+
Debug.assert(expression);
|
|
90718
90775
|
if (some(pendingExpressions)) {
|
|
90719
90776
|
if (isParenthesizedExpression(expression)) {
|
|
90720
90777
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -90796,6 +90853,7 @@ function transformClassFields(context) {
|
|
|
90796
90853
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
90797
90854
|
setSourceMapRange(temp, name.expression);
|
|
90798
90855
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
90856
|
+
Debug.assert(expression);
|
|
90799
90857
|
const assignment = factory2.createAssignment(temp, expression);
|
|
90800
90858
|
setSourceMapRange(assignment, name.expression);
|
|
90801
90859
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -90878,7 +90936,7 @@ function transformClassFields(context) {
|
|
|
90878
90936
|
return transformFieldInitializer(node);
|
|
90879
90937
|
}
|
|
90880
90938
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
90881
|
-
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
90939
|
+
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
|
|
90882
90940
|
}
|
|
90883
90941
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
90884
90942
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -90948,7 +91006,7 @@ function transformClassFields(context) {
|
|
|
90948
91006
|
if (classConstructor && superClassReference) {
|
|
90949
91007
|
const superProperty = factory2.createReflectGetCall(
|
|
90950
91008
|
superClassReference,
|
|
90951
|
-
visitNode(node.argumentExpression, visitor, isExpression),
|
|
91009
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
|
|
90952
91010
|
classConstructor
|
|
90953
91011
|
);
|
|
90954
91012
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -90965,6 +91023,7 @@ function transformClassFields(context) {
|
|
|
90965
91023
|
let info;
|
|
90966
91024
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
90967
91025
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
91026
|
+
Debug.assert(receiver);
|
|
90968
91027
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
90969
91028
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
90970
91029
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -91001,7 +91060,7 @@ function transformClassFields(context) {
|
|
|
91001
91060
|
getterName = setterName = operand.argumentExpression;
|
|
91002
91061
|
} else {
|
|
91003
91062
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
91004
|
-
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
91063
|
+
setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
|
|
91005
91064
|
}
|
|
91006
91065
|
}
|
|
91007
91066
|
if (setterName && getterName) {
|
|
@@ -91035,7 +91094,7 @@ function transformClassFields(context) {
|
|
|
91035
91094
|
function visitExpressionStatement(node) {
|
|
91036
91095
|
return factory2.updateExpressionStatement(
|
|
91037
91096
|
node,
|
|
91038
|
-
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
91097
|
+
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
|
|
91039
91098
|
);
|
|
91040
91099
|
}
|
|
91041
91100
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -91053,25 +91112,25 @@ function transformClassFields(context) {
|
|
|
91053
91112
|
if (isCallChain(node)) {
|
|
91054
91113
|
return factory2.updateCallChain(
|
|
91055
91114
|
node,
|
|
91056
|
-
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
91115
|
+
factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
|
|
91057
91116
|
/*questionDotToken*/
|
|
91058
91117
|
void 0,
|
|
91059
91118
|
/*typeArguments*/
|
|
91060
91119
|
void 0,
|
|
91061
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91120
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91062
91121
|
);
|
|
91063
91122
|
}
|
|
91064
91123
|
return factory2.updateCallExpression(
|
|
91065
91124
|
node,
|
|
91066
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
91125
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
|
|
91067
91126
|
/*typeArguments*/
|
|
91068
91127
|
void 0,
|
|
91069
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91128
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91070
91129
|
);
|
|
91071
91130
|
}
|
|
91072
91131
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
91073
91132
|
const invocation = factory2.createFunctionCallCall(
|
|
91074
|
-
visitNode(node.expression, visitor, isExpression),
|
|
91133
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
91075
91134
|
currentClassLexicalEnvironment.classConstructor,
|
|
91076
91135
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
91077
91136
|
);
|
|
@@ -91087,19 +91146,19 @@ function transformClassFields(context) {
|
|
|
91087
91146
|
return factory2.updateTaggedTemplateExpression(
|
|
91088
91147
|
node,
|
|
91089
91148
|
factory2.createCallExpression(
|
|
91090
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
91149
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
|
|
91091
91150
|
/*typeArguments*/
|
|
91092
91151
|
void 0,
|
|
91093
|
-
[visitNode(thisArg, visitor, isExpression)]
|
|
91152
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
|
|
91094
91153
|
),
|
|
91095
91154
|
/*typeArguments*/
|
|
91096
91155
|
void 0,
|
|
91097
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
91156
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
91098
91157
|
);
|
|
91099
91158
|
}
|
|
91100
91159
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
91101
91160
|
const invocation = factory2.createFunctionBindCall(
|
|
91102
|
-
visitNode(node.tag, visitor, isExpression),
|
|
91161
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
91103
91162
|
currentClassLexicalEnvironment.classConstructor,
|
|
91104
91163
|
[]
|
|
91105
91164
|
);
|
|
@@ -91110,7 +91169,7 @@ function transformClassFields(context) {
|
|
|
91110
91169
|
invocation,
|
|
91111
91170
|
/*typeArguments*/
|
|
91112
91171
|
void 0,
|
|
91113
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
91172
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
91114
91173
|
);
|
|
91115
91174
|
}
|
|
91116
91175
|
return visitEachChild(node, visitor, context);
|
|
@@ -91140,9 +91199,9 @@ function transformClassFields(context) {
|
|
|
91140
91199
|
pendingExpressions = void 0;
|
|
91141
91200
|
node = factory2.updateBinaryExpression(
|
|
91142
91201
|
node,
|
|
91143
|
-
visitNode(node.left, assignmentTargetVisitor),
|
|
91202
|
+
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
|
|
91144
91203
|
node.operatorToken,
|
|
91145
|
-
visitNode(node.right, visitor)
|
|
91204
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
91146
91205
|
);
|
|
91147
91206
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
91148
91207
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -91167,7 +91226,7 @@ function transformClassFields(context) {
|
|
|
91167
91226
|
node,
|
|
91168
91227
|
visitInvalidSuperProperty(node.left),
|
|
91169
91228
|
node.operatorToken,
|
|
91170
|
-
visitNode(node.right, visitor, isExpression)
|
|
91229
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
91171
91230
|
);
|
|
91172
91231
|
}
|
|
91173
91232
|
if (classConstructor && superClassReference) {
|
|
@@ -91187,6 +91246,7 @@ function transformClassFields(context) {
|
|
|
91187
91246
|
);
|
|
91188
91247
|
setOriginalNode(superPropertyGet, node.left);
|
|
91189
91248
|
setTextRange(superPropertyGet, node.left);
|
|
91249
|
+
Debug.assert(expression);
|
|
91190
91250
|
expression = factory2.createBinaryExpression(
|
|
91191
91251
|
superPropertyGet,
|
|
91192
91252
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -91196,9 +91256,11 @@ function transformClassFields(context) {
|
|
|
91196
91256
|
}
|
|
91197
91257
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
91198
91258
|
if (temp) {
|
|
91259
|
+
Debug.assert(expression);
|
|
91199
91260
|
expression = factory2.createAssignment(temp, expression);
|
|
91200
91261
|
setTextRange(temp, node);
|
|
91201
91262
|
}
|
|
91263
|
+
Debug.assert(expression);
|
|
91202
91264
|
expression = factory2.createReflectSetCall(
|
|
91203
91265
|
superClassReference,
|
|
91204
91266
|
setterName,
|
|
@@ -91222,8 +91284,8 @@ function transformClassFields(context) {
|
|
|
91222
91284
|
return visitEachChild(node, visitor, context);
|
|
91223
91285
|
}
|
|
91224
91286
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
91225
|
-
receiver = visitNode(receiver, visitor, isExpression);
|
|
91226
|
-
right = visitNode(right, visitor, isExpression);
|
|
91287
|
+
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
|
|
91288
|
+
right = Debug.checkDefined(visitNode(right, visitor, isExpression));
|
|
91227
91289
|
if (isCompoundAssignment(operator)) {
|
|
91228
91290
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
91229
91291
|
receiver = initializeExpression || readExpression;
|
|
@@ -91326,7 +91388,7 @@ function transformClassFields(context) {
|
|
|
91326
91388
|
node,
|
|
91327
91389
|
factory2.createAssignment(
|
|
91328
91390
|
temp,
|
|
91329
|
-
visitNode(node.expression, visitor, isExpression)
|
|
91391
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
91330
91392
|
),
|
|
91331
91393
|
/*typeArguments*/
|
|
91332
91394
|
void 0
|
|
@@ -91888,7 +91950,7 @@ function transformClassFields(context) {
|
|
|
91888
91950
|
) : factory2.updateElementAccessExpression(
|
|
91889
91951
|
node,
|
|
91890
91952
|
factory2.createVoidZero(),
|
|
91891
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
91953
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
91892
91954
|
);
|
|
91893
91955
|
}
|
|
91894
91956
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -92005,6 +92067,7 @@ function transformClassFields(context) {
|
|
|
92005
92067
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
92006
92068
|
if (isComputedPropertyName(name)) {
|
|
92007
92069
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
92070
|
+
Debug.assert(expression);
|
|
92008
92071
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
92009
92072
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
92010
92073
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -92226,7 +92289,7 @@ function transformClassFields(context) {
|
|
|
92226
92289
|
/*reservedInNestedScopes*/
|
|
92227
92290
|
true
|
|
92228
92291
|
);
|
|
92229
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
92292
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
92230
92293
|
}
|
|
92231
92294
|
return factory2.createAssignmentTargetWrapper(
|
|
92232
92295
|
parameter,
|
|
@@ -92239,6 +92302,7 @@ function transformClassFields(context) {
|
|
|
92239
92302
|
);
|
|
92240
92303
|
}
|
|
92241
92304
|
function visitArrayAssignmentTarget(node) {
|
|
92305
|
+
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
92242
92306
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
92243
92307
|
if (target) {
|
|
92244
92308
|
let wrapped;
|
|
@@ -92273,7 +92337,7 @@ function transformClassFields(context) {
|
|
|
92273
92337
|
node,
|
|
92274
92338
|
wrapped,
|
|
92275
92339
|
node.operatorToken,
|
|
92276
|
-
visitNode(node.right, visitor, isExpression)
|
|
92340
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
92277
92341
|
);
|
|
92278
92342
|
} else if (isSpreadElement(node)) {
|
|
92279
92343
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -92319,14 +92383,14 @@ function transformClassFields(context) {
|
|
|
92319
92383
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
92320
92384
|
return factory2.updatePropertyAssignment(
|
|
92321
92385
|
node,
|
|
92322
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
92323
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
92386
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
92387
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
|
|
92324
92388
|
);
|
|
92325
92389
|
}
|
|
92326
92390
|
if (isSpreadAssignment(node)) {
|
|
92327
92391
|
return factory2.updateSpreadAssignment(
|
|
92328
92392
|
node,
|
|
92329
|
-
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
92393
|
+
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
|
|
92330
92394
|
);
|
|
92331
92395
|
}
|
|
92332
92396
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -92940,7 +93004,7 @@ function transformLegacyDecorators(context) {
|
|
|
92940
93004
|
return factory2.updateConstructorDeclaration(
|
|
92941
93005
|
node,
|
|
92942
93006
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92943
|
-
visitNodes2(node.parameters, visitor,
|
|
93007
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
92944
93008
|
visitNode(node.body, visitor, isBlock)
|
|
92945
93009
|
);
|
|
92946
93010
|
}
|
|
@@ -92956,12 +93020,12 @@ function transformLegacyDecorators(context) {
|
|
|
92956
93020
|
node,
|
|
92957
93021
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92958
93022
|
node.asteriskToken,
|
|
92959
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
93023
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
92960
93024
|
/*questionToken*/
|
|
92961
93025
|
void 0,
|
|
92962
93026
|
/*typeParameters*/
|
|
92963
93027
|
void 0,
|
|
92964
|
-
visitNodes2(node.parameters, visitor,
|
|
93028
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
92965
93029
|
/*type*/
|
|
92966
93030
|
void 0,
|
|
92967
93031
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -92971,8 +93035,8 @@ function transformLegacyDecorators(context) {
|
|
|
92971
93035
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
92972
93036
|
node,
|
|
92973
93037
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92974
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
92975
|
-
visitNodes2(node.parameters, visitor,
|
|
93038
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
93039
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
92976
93040
|
/*type*/
|
|
92977
93041
|
void 0,
|
|
92978
93042
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -92982,8 +93046,8 @@ function transformLegacyDecorators(context) {
|
|
|
92982
93046
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
92983
93047
|
node,
|
|
92984
93048
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92985
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
92986
|
-
visitNodes2(node.parameters, visitor,
|
|
93049
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
93050
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
92987
93051
|
visitNode(node.body, visitor, isBlock)
|
|
92988
93052
|
), node);
|
|
92989
93053
|
}
|
|
@@ -92994,7 +93058,7 @@ function transformLegacyDecorators(context) {
|
|
|
92994
93058
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
92995
93059
|
node,
|
|
92996
93060
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92997
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
93061
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
92998
93062
|
/*questionOrExclamationToken*/
|
|
92999
93063
|
void 0,
|
|
93000
93064
|
/*type*/
|
|
@@ -93007,7 +93071,7 @@ function transformLegacyDecorators(context) {
|
|
|
93007
93071
|
node,
|
|
93008
93072
|
elideNodes(factory2, node.modifiers),
|
|
93009
93073
|
node.dotDotDotToken,
|
|
93010
|
-
visitNode(node.name, visitor, isBindingName),
|
|
93074
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
93011
93075
|
/*questionToken*/
|
|
93012
93076
|
void 0,
|
|
93013
93077
|
/*type*/
|
|
@@ -93104,7 +93168,7 @@ function transformLegacyDecorators(context) {
|
|
|
93104
93168
|
return expression;
|
|
93105
93169
|
}
|
|
93106
93170
|
function transformDecorator(decorator) {
|
|
93107
|
-
return visitNode(decorator.expression, visitor, isExpression);
|
|
93171
|
+
return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
|
|
93108
93172
|
}
|
|
93109
93173
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
93110
93174
|
let expressions;
|
|
@@ -93370,21 +93434,21 @@ function transformES2017(context) {
|
|
|
93370
93434
|
node.initializer,
|
|
93371
93435
|
/*hasReceiver*/
|
|
93372
93436
|
true
|
|
93373
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
93374
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93437
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93438
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93375
93439
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
93376
93440
|
);
|
|
93377
93441
|
}
|
|
93378
93442
|
function visitForOfStatementInAsyncBody(node) {
|
|
93379
93443
|
return factory2.updateForOfStatement(
|
|
93380
93444
|
node,
|
|
93381
|
-
visitNode(node.awaitModifier, visitor,
|
|
93445
|
+
visitNode(node.awaitModifier, visitor, isAwaitKeyword),
|
|
93382
93446
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
93383
93447
|
node.initializer,
|
|
93384
93448
|
/*hasReceiver*/
|
|
93385
93449
|
true
|
|
93386
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
93387
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93450
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93451
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93388
93452
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
93389
93453
|
);
|
|
93390
93454
|
}
|
|
@@ -93421,7 +93485,7 @@ function transformES2017(context) {
|
|
|
93421
93485
|
function visitConstructorDeclaration(node) {
|
|
93422
93486
|
return factory2.updateConstructorDeclaration(
|
|
93423
93487
|
node,
|
|
93424
|
-
visitNodes2(node.modifiers, visitor,
|
|
93488
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
93425
93489
|
visitParameterList(node.parameters, visitor, context),
|
|
93426
93490
|
transformMethodBody(node)
|
|
93427
93491
|
);
|
|
@@ -93479,7 +93543,7 @@ function transformES2017(context) {
|
|
|
93479
93543
|
function visitFunctionExpression(node) {
|
|
93480
93544
|
return factory2.updateFunctionExpression(
|
|
93481
93545
|
node,
|
|
93482
|
-
visitNodes2(node.modifiers, visitor,
|
|
93546
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
93483
93547
|
node.asteriskToken,
|
|
93484
93548
|
node.name,
|
|
93485
93549
|
/*typeParameters*/
|
|
@@ -93493,7 +93557,7 @@ function transformES2017(context) {
|
|
|
93493
93557
|
function visitArrowFunction(node) {
|
|
93494
93558
|
return factory2.updateArrowFunction(
|
|
93495
93559
|
node,
|
|
93496
|
-
visitNodes2(node.modifiers, visitor,
|
|
93560
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
93497
93561
|
/*typeParameters*/
|
|
93498
93562
|
void 0,
|
|
93499
93563
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -93550,7 +93614,7 @@ function transformES2017(context) {
|
|
|
93550
93614
|
),
|
|
93551
93615
|
node
|
|
93552
93616
|
);
|
|
93553
|
-
return visitNode(converted, visitor, isExpression);
|
|
93617
|
+
return Debug.checkDefined(visitNode(converted, visitor, isExpression));
|
|
93554
93618
|
}
|
|
93555
93619
|
function collidesWithParameterName({ name }) {
|
|
93556
93620
|
if (isIdentifier(name)) {
|
|
@@ -93682,7 +93746,7 @@ function transformES2017(context) {
|
|
|
93682
93746
|
if (isBlock(body)) {
|
|
93683
93747
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start2));
|
|
93684
93748
|
} else {
|
|
93685
|
-
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
93749
|
+
return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
|
|
93686
93750
|
}
|
|
93687
93751
|
}
|
|
93688
93752
|
function getPromiseConstructor(type) {
|
|
@@ -94795,7 +94859,7 @@ function transformES2018(context) {
|
|
|
94795
94859
|
/*questionToken*/
|
|
94796
94860
|
void 0,
|
|
94797
94861
|
visitor,
|
|
94798
|
-
|
|
94862
|
+
isQuestionToken
|
|
94799
94863
|
),
|
|
94800
94864
|
/*typeParameters*/
|
|
94801
94865
|
void 0,
|
|
@@ -95918,7 +95982,7 @@ function transformJsx(context) {
|
|
|
95918
95982
|
return element;
|
|
95919
95983
|
}
|
|
95920
95984
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
95921
|
-
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
95985
|
+
return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95922
95986
|
}
|
|
95923
95987
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
95924
95988
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -95948,7 +96012,7 @@ function transformJsx(context) {
|
|
|
95948
96012
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
95949
96013
|
}
|
|
95950
96014
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
95951
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
96015
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
95952
96016
|
}
|
|
95953
96017
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
95954
96018
|
const name = getAttributeName(node);
|
|
@@ -95968,7 +96032,7 @@ function transformJsx(context) {
|
|
|
95968
96032
|
if (node.expression === void 0) {
|
|
95969
96033
|
return factory2.createTrue();
|
|
95970
96034
|
}
|
|
95971
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
96035
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
95972
96036
|
}
|
|
95973
96037
|
if (isJsxElement(node)) {
|
|
95974
96038
|
return visitJsxElement(
|
|
@@ -96713,7 +96777,7 @@ function transformES2015(context) {
|
|
|
96713
96777
|
[
|
|
96714
96778
|
factory2.createPropertyAssignment(
|
|
96715
96779
|
factory2.createIdentifier("value"),
|
|
96716
|
-
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
96780
|
+
node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
|
|
96717
96781
|
)
|
|
96718
96782
|
]
|
|
96719
96783
|
)
|
|
@@ -96884,7 +96948,7 @@ function transformES2015(context) {
|
|
|
96884
96948
|
outer,
|
|
96885
96949
|
/*typeArguments*/
|
|
96886
96950
|
void 0,
|
|
96887
|
-
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
96951
|
+
extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
|
|
96888
96952
|
)
|
|
96889
96953
|
);
|
|
96890
96954
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -97226,7 +97290,7 @@ function transformES2015(context) {
|
|
|
97226
97290
|
factory2.createExpressionStatement(
|
|
97227
97291
|
factory2.createAssignment(
|
|
97228
97292
|
factory2.getGeneratedNameForNode(parameter),
|
|
97229
|
-
visitNode(initializer, visitor, isExpression)
|
|
97293
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
97230
97294
|
)
|
|
97231
97295
|
),
|
|
97232
97296
|
2097152 /* CustomPrologue */
|
|
@@ -97237,7 +97301,7 @@ function transformES2015(context) {
|
|
|
97237
97301
|
return false;
|
|
97238
97302
|
}
|
|
97239
97303
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
97240
|
-
initializer = visitNode(initializer, visitor, isExpression);
|
|
97304
|
+
initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
97241
97305
|
const statement = factory2.createIfStatement(
|
|
97242
97306
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
97243
97307
|
setEmitFlags(
|
|
@@ -97513,6 +97577,7 @@ function transformES2015(context) {
|
|
|
97513
97577
|
container
|
|
97514
97578
|
);
|
|
97515
97579
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
97580
|
+
Debug.assert(propertyName);
|
|
97516
97581
|
let e;
|
|
97517
97582
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
97518
97583
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -97556,6 +97621,7 @@ function transformES2015(context) {
|
|
|
97556
97621
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
97557
97622
|
setSourceMapRange(target, firstAccessor.name);
|
|
97558
97623
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
97624
|
+
Debug.assert(visitedAccessorName);
|
|
97559
97625
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
97560
97626
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
97561
97627
|
}
|
|
@@ -97828,9 +97894,9 @@ function transformES2015(context) {
|
|
|
97828
97894
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
97829
97895
|
return factory2.updateBinaryExpression(
|
|
97830
97896
|
node,
|
|
97831
|
-
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
97897
|
+
Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
|
|
97832
97898
|
node.operatorToken,
|
|
97833
|
-
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
97899
|
+
Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
|
|
97834
97900
|
);
|
|
97835
97901
|
}
|
|
97836
97902
|
return visitEachChild(node, visitor, context);
|
|
@@ -97845,6 +97911,7 @@ function transformES2015(context) {
|
|
|
97845
97911
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
97846
97912
|
if (result || visited !== element) {
|
|
97847
97913
|
result || (result = node.elements.slice(0, i));
|
|
97914
|
+
Debug.assert(visited);
|
|
97848
97915
|
result.push(visited);
|
|
97849
97916
|
}
|
|
97850
97917
|
}
|
|
@@ -97871,7 +97938,7 @@ function transformES2015(context) {
|
|
|
97871
97938
|
0 /* All */
|
|
97872
97939
|
);
|
|
97873
97940
|
} else {
|
|
97874
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
97941
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
|
|
97875
97942
|
setTextRange(assignment, decl);
|
|
97876
97943
|
}
|
|
97877
97944
|
assignments = append(assignments, assignment);
|
|
@@ -97893,7 +97960,7 @@ function transformES2015(context) {
|
|
|
97893
97960
|
if (node.flags & 3 /* BlockScoped */) {
|
|
97894
97961
|
enableSubstitutionsForBlockScopedBindings();
|
|
97895
97962
|
}
|
|
97896
|
-
const declarations =
|
|
97963
|
+
const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
|
|
97897
97964
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
97898
97965
|
setOriginalNode(declarationList, node);
|
|
97899
97966
|
setTextRange(declarationList, node);
|
|
@@ -97977,7 +98044,7 @@ function transformES2015(context) {
|
|
|
97977
98044
|
statement,
|
|
97978
98045
|
/*outermostLabeledStatement*/
|
|
97979
98046
|
node
|
|
97980
|
-
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
98047
|
+
) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
|
|
97981
98048
|
}
|
|
97982
98049
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
97983
98050
|
switch (node.kind) {
|
|
@@ -98020,7 +98087,7 @@ function transformES2015(context) {
|
|
|
98020
98087
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
98021
98088
|
visitNode(node.condition, visitor, isExpression),
|
|
98022
98089
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
98023
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
98090
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
98024
98091
|
);
|
|
98025
98092
|
}
|
|
98026
98093
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -98106,13 +98173,14 @@ function transformES2015(context) {
|
|
|
98106
98173
|
)));
|
|
98107
98174
|
} else {
|
|
98108
98175
|
setTextRangeEnd(assignment, initializer.end);
|
|
98109
|
-
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
98176
|
+
statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
|
|
98110
98177
|
}
|
|
98111
98178
|
}
|
|
98112
98179
|
if (convertedLoopBodyStatements) {
|
|
98113
98180
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
98114
98181
|
} else {
|
|
98115
98182
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
98183
|
+
Debug.assert(statement);
|
|
98116
98184
|
if (isBlock(statement)) {
|
|
98117
98185
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
98118
98186
|
} else {
|
|
@@ -98133,6 +98201,7 @@ function transformES2015(context) {
|
|
|
98133
98201
|
}
|
|
98134
98202
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
98135
98203
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
98204
|
+
Debug.assert(expression);
|
|
98136
98205
|
const counter = factory2.createLoopVariable();
|
|
98137
98206
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
98138
98207
|
/*recordTempVariable*/
|
|
@@ -98192,6 +98261,7 @@ function transformES2015(context) {
|
|
|
98192
98261
|
}
|
|
98193
98262
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
98194
98263
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
98264
|
+
Debug.assert(expression);
|
|
98195
98265
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
98196
98266
|
/*recordTempVariable*/
|
|
98197
98267
|
void 0
|
|
@@ -98449,7 +98519,7 @@ function transformES2015(context) {
|
|
|
98449
98519
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
98450
98520
|
}
|
|
98451
98521
|
} else {
|
|
98452
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
98522
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
|
|
98453
98523
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
98454
98524
|
}
|
|
98455
98525
|
statements.push(loop);
|
|
@@ -98487,16 +98557,16 @@ function transformES2015(context) {
|
|
|
98487
98557
|
node,
|
|
98488
98558
|
/*awaitModifier*/
|
|
98489
98559
|
void 0,
|
|
98490
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
98491
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98560
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
98561
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98492
98562
|
convertedLoopBody
|
|
98493
98563
|
);
|
|
98494
98564
|
}
|
|
98495
98565
|
function convertForInStatement(node, convertedLoopBody) {
|
|
98496
98566
|
return factory2.updateForInStatement(
|
|
98497
98567
|
node,
|
|
98498
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
98499
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98568
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
98569
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98500
98570
|
convertedLoopBody
|
|
98501
98571
|
);
|
|
98502
98572
|
}
|
|
@@ -98504,13 +98574,13 @@ function transformES2015(context) {
|
|
|
98504
98574
|
return factory2.updateDoStatement(
|
|
98505
98575
|
node,
|
|
98506
98576
|
convertedLoopBody,
|
|
98507
|
-
visitNode(node.expression, visitor, isExpression)
|
|
98577
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
98508
98578
|
);
|
|
98509
98579
|
}
|
|
98510
98580
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
98511
98581
|
return factory2.updateWhileStatement(
|
|
98512
98582
|
node,
|
|
98513
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98583
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98514
98584
|
convertedLoopBody
|
|
98515
98585
|
);
|
|
98516
98586
|
}
|
|
@@ -98672,7 +98742,7 @@ function transformES2015(context) {
|
|
|
98672
98742
|
void 0,
|
|
98673
98743
|
/*type*/
|
|
98674
98744
|
void 0,
|
|
98675
|
-
visitNode(
|
|
98745
|
+
Debug.checkDefined(visitNode(
|
|
98676
98746
|
factory2.createBlock(
|
|
98677
98747
|
statements,
|
|
98678
98748
|
/*multiLine*/
|
|
@@ -98680,7 +98750,7 @@ function transformES2015(context) {
|
|
|
98680
98750
|
),
|
|
98681
98751
|
visitor,
|
|
98682
98752
|
isBlock
|
|
98683
|
-
)
|
|
98753
|
+
))
|
|
98684
98754
|
),
|
|
98685
98755
|
emitFlags
|
|
98686
98756
|
)
|
|
@@ -98703,7 +98773,7 @@ function transformES2015(context) {
|
|
|
98703
98773
|
if (node.incrementor) {
|
|
98704
98774
|
statements.push(factory2.createIfStatement(
|
|
98705
98775
|
currentState.conditionVariable,
|
|
98706
|
-
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
98776
|
+
factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
|
|
98707
98777
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
98708
98778
|
));
|
|
98709
98779
|
} else {
|
|
@@ -98714,11 +98784,12 @@ function transformES2015(context) {
|
|
|
98714
98784
|
}
|
|
98715
98785
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
98716
98786
|
statements.push(factory2.createIfStatement(
|
|
98717
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
98718
|
-
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
98787
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
|
|
98788
|
+
Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
|
|
98719
98789
|
));
|
|
98720
98790
|
}
|
|
98721
98791
|
}
|
|
98792
|
+
Debug.assert(statement);
|
|
98722
98793
|
if (isBlock(statement)) {
|
|
98723
98794
|
addRange(statements, statement.statements);
|
|
98724
98795
|
} else {
|
|
@@ -98986,9 +99057,9 @@ function transformES2015(context) {
|
|
|
98986
99057
|
createMemberAccessForPropertyName(
|
|
98987
99058
|
factory2,
|
|
98988
99059
|
receiver,
|
|
98989
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
99060
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
98990
99061
|
),
|
|
98991
|
-
visitNode(property.initializer, visitor, isExpression)
|
|
99062
|
+
Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
|
|
98992
99063
|
);
|
|
98993
99064
|
setTextRange(expression, property);
|
|
98994
99065
|
if (startsOnNewLine) {
|
|
@@ -99001,7 +99072,7 @@ function transformES2015(context) {
|
|
|
99001
99072
|
createMemberAccessForPropertyName(
|
|
99002
99073
|
factory2,
|
|
99003
99074
|
receiver,
|
|
99004
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
99075
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
99005
99076
|
),
|
|
99006
99077
|
factory2.cloneNode(property.name)
|
|
99007
99078
|
);
|
|
@@ -99016,7 +99087,7 @@ function transformES2015(context) {
|
|
|
99016
99087
|
createMemberAccessForPropertyName(
|
|
99017
99088
|
factory2,
|
|
99018
99089
|
receiver,
|
|
99019
|
-
visitNode(method.name, visitor, isPropertyName)
|
|
99090
|
+
Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
|
|
99020
99091
|
),
|
|
99021
99092
|
transformFunctionLikeToExpression(
|
|
99022
99093
|
method,
|
|
@@ -99150,7 +99221,7 @@ function transformES2015(context) {
|
|
|
99150
99221
|
}
|
|
99151
99222
|
return factory2.updateCallExpression(
|
|
99152
99223
|
node,
|
|
99153
|
-
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
99224
|
+
Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
|
|
99154
99225
|
/*typeArguments*/
|
|
99155
99226
|
void 0,
|
|
99156
99227
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -99262,8 +99333,8 @@ function transformES2015(context) {
|
|
|
99262
99333
|
let resultingCall;
|
|
99263
99334
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
99264
99335
|
resultingCall = factory2.createFunctionApplyCall(
|
|
99265
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
99266
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
99336
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
99337
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
99267
99338
|
transformAndSpreadElements(
|
|
99268
99339
|
node.arguments,
|
|
99269
99340
|
/*isArgumentList*/
|
|
@@ -99277,8 +99348,8 @@ function transformES2015(context) {
|
|
|
99277
99348
|
} else {
|
|
99278
99349
|
resultingCall = setTextRange(
|
|
99279
99350
|
factory2.createFunctionCallCall(
|
|
99280
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
99281
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
99351
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
99352
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
99282
99353
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
99283
99354
|
),
|
|
99284
99355
|
node
|
|
@@ -99300,7 +99371,7 @@ function transformES2015(context) {
|
|
|
99300
99371
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
99301
99372
|
return factory2.createNewExpression(
|
|
99302
99373
|
factory2.createFunctionApplyCall(
|
|
99303
|
-
visitNode(target, visitor, isExpression),
|
|
99374
|
+
Debug.checkDefined(visitNode(target, visitor, isExpression)),
|
|
99304
99375
|
thisArg,
|
|
99305
99376
|
transformAndSpreadElements(
|
|
99306
99377
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -99357,7 +99428,9 @@ function transformES2015(context) {
|
|
|
99357
99428
|
return map(chunk, visitExpressionOfSpread);
|
|
99358
99429
|
}
|
|
99359
99430
|
function visitExpressionOfSpread(node) {
|
|
99431
|
+
Debug.assertNode(node, isSpreadElement);
|
|
99360
99432
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
99433
|
+
Debug.assert(expression);
|
|
99361
99434
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
99362
99435
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
99363
99436
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -99408,7 +99481,7 @@ function transformES2015(context) {
|
|
|
99408
99481
|
function visitTemplateExpression(node) {
|
|
99409
99482
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
99410
99483
|
for (const span of node.templateSpans) {
|
|
99411
|
-
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
99484
|
+
const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
|
|
99412
99485
|
if (span.literal.text.length > 0) {
|
|
99413
99486
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
99414
99487
|
}
|
|
@@ -99974,19 +100047,19 @@ function transformGenerators(context) {
|
|
|
99974
100047
|
case 208 /* PropertyAccessExpression */:
|
|
99975
100048
|
target = factory2.updatePropertyAccessExpression(
|
|
99976
100049
|
left,
|
|
99977
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
100050
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
99978
100051
|
left.name
|
|
99979
100052
|
);
|
|
99980
100053
|
break;
|
|
99981
100054
|
case 209 /* ElementAccessExpression */:
|
|
99982
100055
|
target = factory2.updateElementAccessExpression(
|
|
99983
100056
|
left,
|
|
99984
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
99985
|
-
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
100057
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
100058
|
+
cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
|
|
99986
100059
|
);
|
|
99987
100060
|
break;
|
|
99988
100061
|
default:
|
|
99989
|
-
target = visitNode(left, visitor, isExpression);
|
|
100062
|
+
target = Debug.checkDefined(visitNode(left, visitor, isExpression));
|
|
99990
100063
|
break;
|
|
99991
100064
|
}
|
|
99992
100065
|
const operator = node.operatorToken.kind;
|
|
@@ -99998,7 +100071,7 @@ function transformGenerators(context) {
|
|
|
99998
100071
|
factory2.createBinaryExpression(
|
|
99999
100072
|
cacheExpression(target),
|
|
100000
100073
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
100001
|
-
visitNode(right, visitor, isExpression)
|
|
100074
|
+
Debug.checkDefined(visitNode(right, visitor, isExpression))
|
|
100002
100075
|
),
|
|
100003
100076
|
node
|
|
100004
100077
|
)
|
|
@@ -100006,7 +100079,7 @@ function transformGenerators(context) {
|
|
|
100006
100079
|
node
|
|
100007
100080
|
);
|
|
100008
100081
|
} else {
|
|
100009
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
100082
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
|
|
100010
100083
|
}
|
|
100011
100084
|
}
|
|
100012
100085
|
return visitEachChild(node, visitor, context);
|
|
@@ -100020,9 +100093,9 @@ function transformGenerators(context) {
|
|
|
100020
100093
|
}
|
|
100021
100094
|
return factory2.updateBinaryExpression(
|
|
100022
100095
|
node,
|
|
100023
|
-
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
100096
|
+
cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
|
|
100024
100097
|
node.operatorToken,
|
|
100025
|
-
visitNode(node.right, visitor, isExpression)
|
|
100098
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
100026
100099
|
);
|
|
100027
100100
|
}
|
|
100028
100101
|
return visitEachChild(node, visitor, context);
|
|
@@ -100041,7 +100114,7 @@ function transformGenerators(context) {
|
|
|
100041
100114
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
100042
100115
|
pendingExpressions = [];
|
|
100043
100116
|
}
|
|
100044
|
-
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
100117
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
|
|
100045
100118
|
}
|
|
100046
100119
|
}
|
|
100047
100120
|
}
|
|
@@ -100055,7 +100128,7 @@ function transformGenerators(context) {
|
|
|
100055
100128
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
100056
100129
|
pendingExpressions = [];
|
|
100057
100130
|
}
|
|
100058
|
-
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
100131
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
|
|
100059
100132
|
}
|
|
100060
100133
|
}
|
|
100061
100134
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -100065,7 +100138,7 @@ function transformGenerators(context) {
|
|
|
100065
100138
|
const resultLocal = declareLocal();
|
|
100066
100139
|
emitAssignment(
|
|
100067
100140
|
resultLocal,
|
|
100068
|
-
visitNode(node.left, visitor, isExpression),
|
|
100141
|
+
Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
|
|
100069
100142
|
/*location*/
|
|
100070
100143
|
node.left
|
|
100071
100144
|
);
|
|
@@ -100086,7 +100159,7 @@ function transformGenerators(context) {
|
|
|
100086
100159
|
}
|
|
100087
100160
|
emitAssignment(
|
|
100088
100161
|
resultLocal,
|
|
100089
|
-
visitNode(node.right, visitor, isExpression),
|
|
100162
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
|
|
100090
100163
|
/*location*/
|
|
100091
100164
|
node.right
|
|
100092
100165
|
);
|
|
@@ -100100,13 +100173,13 @@ function transformGenerators(context) {
|
|
|
100100
100173
|
const resultLocal = declareLocal();
|
|
100101
100174
|
emitBreakWhenFalse(
|
|
100102
100175
|
whenFalseLabel,
|
|
100103
|
-
visitNode(node.condition, visitor, isExpression),
|
|
100176
|
+
Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
|
|
100104
100177
|
/*location*/
|
|
100105
100178
|
node.condition
|
|
100106
100179
|
);
|
|
100107
100180
|
emitAssignment(
|
|
100108
100181
|
resultLocal,
|
|
100109
|
-
visitNode(node.whenTrue, visitor, isExpression),
|
|
100182
|
+
Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
|
|
100110
100183
|
/*location*/
|
|
100111
100184
|
node.whenTrue
|
|
100112
100185
|
);
|
|
@@ -100114,7 +100187,7 @@ function transformGenerators(context) {
|
|
|
100114
100187
|
markLabel(whenFalseLabel);
|
|
100115
100188
|
emitAssignment(
|
|
100116
100189
|
resultLocal,
|
|
100117
|
-
visitNode(node.whenFalse, visitor, isExpression),
|
|
100190
|
+
Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
|
|
100118
100191
|
/*location*/
|
|
100119
100192
|
node.whenFalse
|
|
100120
100193
|
);
|
|
@@ -100194,7 +100267,7 @@ function transformGenerators(context) {
|
|
|
100194
100267
|
leadingElement = void 0;
|
|
100195
100268
|
expressions2 = [];
|
|
100196
100269
|
}
|
|
100197
|
-
expressions2.push(visitNode(element, visitor, isExpression));
|
|
100270
|
+
expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
|
|
100198
100271
|
return expressions2;
|
|
100199
100272
|
}
|
|
100200
100273
|
}
|
|
@@ -100233,8 +100306,8 @@ function transformGenerators(context) {
|
|
|
100233
100306
|
if (containsYield(node.argumentExpression)) {
|
|
100234
100307
|
return factory2.updateElementAccessExpression(
|
|
100235
100308
|
node,
|
|
100236
|
-
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
100237
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
100309
|
+
cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
|
|
100310
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
100238
100311
|
);
|
|
100239
100312
|
}
|
|
100240
100313
|
return visitEachChild(node, visitor, context);
|
|
@@ -100251,7 +100324,7 @@ function transformGenerators(context) {
|
|
|
100251
100324
|
return setOriginalNode(
|
|
100252
100325
|
setTextRange(
|
|
100253
100326
|
factory2.createFunctionApplyCall(
|
|
100254
|
-
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
100327
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
|
|
100255
100328
|
thisArg,
|
|
100256
100329
|
visitElements(node.arguments)
|
|
100257
100330
|
),
|
|
@@ -100269,7 +100342,7 @@ function transformGenerators(context) {
|
|
|
100269
100342
|
setTextRange(
|
|
100270
100343
|
factory2.createNewExpression(
|
|
100271
100344
|
factory2.createFunctionApplyCall(
|
|
100272
|
-
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
100345
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
|
|
100273
100346
|
thisArg,
|
|
100274
100347
|
visitElements(
|
|
100275
100348
|
node.arguments,
|
|
@@ -100385,7 +100458,7 @@ function transformGenerators(context) {
|
|
|
100385
100458
|
return setSourceMapRange(
|
|
100386
100459
|
factory2.createAssignment(
|
|
100387
100460
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
100388
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
100461
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
100389
100462
|
),
|
|
100390
100463
|
node
|
|
100391
100464
|
);
|
|
@@ -100397,7 +100470,7 @@ function transformGenerators(context) {
|
|
|
100397
100470
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
100398
100471
|
emitBreakWhenFalse(
|
|
100399
100472
|
node.elseStatement ? elseLabel : endLabel,
|
|
100400
|
-
visitNode(node.expression, visitor, isExpression),
|
|
100473
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
100401
100474
|
/*location*/
|
|
100402
100475
|
node.expression
|
|
100403
100476
|
);
|
|
@@ -100426,7 +100499,7 @@ function transformGenerators(context) {
|
|
|
100426
100499
|
markLabel(loopLabel);
|
|
100427
100500
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100428
100501
|
markLabel(conditionLabel);
|
|
100429
|
-
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
100502
|
+
emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
100430
100503
|
endLoopBlock();
|
|
100431
100504
|
} else {
|
|
100432
100505
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -100447,7 +100520,7 @@ function transformGenerators(context) {
|
|
|
100447
100520
|
const loopLabel = defineLabel();
|
|
100448
100521
|
const endLabel = beginLoopBlock(loopLabel);
|
|
100449
100522
|
markLabel(loopLabel);
|
|
100450
|
-
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
100523
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
100451
100524
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100452
100525
|
emitBreak(loopLabel);
|
|
100453
100526
|
endLoopBlock();
|
|
@@ -100478,7 +100551,7 @@ function transformGenerators(context) {
|
|
|
100478
100551
|
emitStatement(
|
|
100479
100552
|
setTextRange(
|
|
100480
100553
|
factory2.createExpressionStatement(
|
|
100481
|
-
visitNode(initializer, visitor, isExpression)
|
|
100554
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
100482
100555
|
),
|
|
100483
100556
|
initializer
|
|
100484
100557
|
)
|
|
@@ -100487,7 +100560,7 @@ function transformGenerators(context) {
|
|
|
100487
100560
|
}
|
|
100488
100561
|
markLabel(conditionLabel);
|
|
100489
100562
|
if (node.condition) {
|
|
100490
|
-
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
100563
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
|
|
100491
100564
|
}
|
|
100492
100565
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100493
100566
|
markLabel(incrementLabel);
|
|
@@ -100495,7 +100568,7 @@ function transformGenerators(context) {
|
|
|
100495
100568
|
emitStatement(
|
|
100496
100569
|
setTextRange(
|
|
100497
100570
|
factory2.createExpressionStatement(
|
|
100498
|
-
visitNode(node.incrementor, visitor, isExpression)
|
|
100571
|
+
Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
|
|
100499
100572
|
),
|
|
100500
100573
|
node.incrementor
|
|
100501
100574
|
)
|
|
@@ -100540,7 +100613,7 @@ function transformGenerators(context) {
|
|
|
100540
100613
|
const keysIndex = factory2.createLoopVariable();
|
|
100541
100614
|
const initializer = node.initializer;
|
|
100542
100615
|
hoistVariableDeclaration(keysIndex);
|
|
100543
|
-
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
100616
|
+
emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
100544
100617
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
100545
100618
|
emitStatement(
|
|
100546
100619
|
factory2.createForInStatement(
|
|
@@ -100571,7 +100644,7 @@ function transformGenerators(context) {
|
|
|
100571
100644
|
}
|
|
100572
100645
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
100573
100646
|
} else {
|
|
100574
|
-
variable = visitNode(initializer, visitor, isExpression);
|
|
100647
|
+
variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
100575
100648
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
100576
100649
|
}
|
|
100577
100650
|
emitAssignment(variable, key);
|
|
@@ -100596,8 +100669,8 @@ function transformGenerators(context) {
|
|
|
100596
100669
|
node = factory2.updateForInStatement(
|
|
100597
100670
|
node,
|
|
100598
100671
|
initializer.declarations[0].name,
|
|
100599
|
-
visitNode(node.expression, visitor, isExpression),
|
|
100600
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
100672
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
100673
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
100601
100674
|
);
|
|
100602
100675
|
} else {
|
|
100603
100676
|
node = visitEachChild(node, visitor, context);
|
|
@@ -100673,7 +100746,7 @@ function transformGenerators(context) {
|
|
|
100673
100746
|
}
|
|
100674
100747
|
function transformAndEmitWithStatement(node) {
|
|
100675
100748
|
if (containsYield(node)) {
|
|
100676
|
-
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
100749
|
+
beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
100677
100750
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100678
100751
|
endWithBlock();
|
|
100679
100752
|
} else {
|
|
@@ -100685,7 +100758,7 @@ function transformGenerators(context) {
|
|
|
100685
100758
|
const caseBlock = node.caseBlock;
|
|
100686
100759
|
const numClauses = caseBlock.clauses.length;
|
|
100687
100760
|
const endLabel = beginSwitchBlock();
|
|
100688
|
-
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
100761
|
+
const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
100689
100762
|
const clauseLabels = [];
|
|
100690
100763
|
let defaultClauseIndex = -1;
|
|
100691
100764
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -100707,7 +100780,7 @@ function transformGenerators(context) {
|
|
|
100707
100780
|
}
|
|
100708
100781
|
pendingClauses.push(
|
|
100709
100782
|
factory2.createCaseClause(
|
|
100710
|
-
visitNode(clause.expression, visitor, isExpression),
|
|
100783
|
+
Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
|
|
100711
100784
|
[
|
|
100712
100785
|
createInlineBreak(
|
|
100713
100786
|
clauseLabels[i],
|
|
@@ -100777,7 +100850,7 @@ function transformGenerators(context) {
|
|
|
100777
100850
|
function transformAndEmitThrowStatement(node) {
|
|
100778
100851
|
var _a2;
|
|
100779
100852
|
emitThrow(
|
|
100780
|
-
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
100853
|
+
Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
|
|
100781
100854
|
/*location*/
|
|
100782
100855
|
node
|
|
100783
100856
|
);
|
|
@@ -102061,7 +102134,7 @@ function transformModule(context) {
|
|
|
102061
102134
|
}
|
|
102062
102135
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
102063
102136
|
if (currentModuleInfo.exportEquals) {
|
|
102064
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
102137
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
|
|
102065
102138
|
if (expressionResult) {
|
|
102066
102139
|
if (emitAsReturn) {
|
|
102067
102140
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -102256,7 +102329,7 @@ function transformModule(context) {
|
|
|
102256
102329
|
}
|
|
102257
102330
|
function visitImportCallExpression(node) {
|
|
102258
102331
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
102259
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
102332
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
102260
102333
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
102261
102334
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
102262
102335
|
switch (compilerOptions.module) {
|
|
@@ -102785,7 +102858,7 @@ function transformModule(context) {
|
|
|
102785
102858
|
deferredExports[id] = appendExportStatement(
|
|
102786
102859
|
deferredExports[id],
|
|
102787
102860
|
factory2.createIdentifier("default"),
|
|
102788
|
-
visitNode(node.expression, visitor),
|
|
102861
|
+
visitNode(node.expression, visitor, isExpression),
|
|
102789
102862
|
/*location*/
|
|
102790
102863
|
node,
|
|
102791
102864
|
/*allowComments*/
|
|
@@ -102795,7 +102868,7 @@ function transformModule(context) {
|
|
|
102795
102868
|
statements = appendExportStatement(
|
|
102796
102869
|
statements,
|
|
102797
102870
|
factory2.createIdentifier("default"),
|
|
102798
|
-
visitNode(node.expression, visitor),
|
|
102871
|
+
visitNode(node.expression, visitor, isExpression),
|
|
102799
102872
|
/*location*/
|
|
102800
102873
|
node,
|
|
102801
102874
|
/*allowComments*/
|
|
@@ -102823,7 +102896,7 @@ function transformModule(context) {
|
|
|
102823
102896
|
),
|
|
102824
102897
|
/*typeParameters*/
|
|
102825
102898
|
void 0,
|
|
102826
|
-
visitNodes2(node.parameters, visitor),
|
|
102899
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
102827
102900
|
/*type*/
|
|
102828
102901
|
void 0,
|
|
102829
102902
|
visitEachChild(node.body, visitor, context)
|
|
@@ -102864,8 +102937,8 @@ function transformModule(context) {
|
|
|
102864
102937
|
),
|
|
102865
102938
|
/*typeParameters*/
|
|
102866
102939
|
void 0,
|
|
102867
|
-
visitNodes2(node.heritageClauses, visitor),
|
|
102868
|
-
visitNodes2(node.members, visitor)
|
|
102940
|
+
visitNodes2(node.heritageClauses, visitor, isHeritageClause),
|
|
102941
|
+
visitNodes2(node.members, visitor, isClassElement)
|
|
102869
102942
|
),
|
|
102870
102943
|
node
|
|
102871
102944
|
),
|
|
@@ -102913,7 +102986,7 @@ function transformModule(context) {
|
|
|
102913
102986
|
variable.name,
|
|
102914
102987
|
variable.exclamationToken,
|
|
102915
102988
|
variable.type,
|
|
102916
|
-
visitNode(variable.initializer, visitor)
|
|
102989
|
+
visitNode(variable.initializer, visitor, isExpression)
|
|
102917
102990
|
);
|
|
102918
102991
|
variables = append(variables, updatedVariable);
|
|
102919
102992
|
expressions = append(expressions, expression);
|
|
@@ -102964,9 +103037,8 @@ function transformModule(context) {
|
|
|
102964
103037
|
function transformInitializedVariable(node) {
|
|
102965
103038
|
if (isBindingPattern(node.name)) {
|
|
102966
103039
|
return flattenDestructuringAssignment(
|
|
102967
|
-
visitNode(node, visitor),
|
|
102968
|
-
|
|
102969
|
-
void 0,
|
|
103040
|
+
visitNode(node, visitor, isInitializedVariable),
|
|
103041
|
+
visitor,
|
|
102970
103042
|
context,
|
|
102971
103043
|
0 /* All */,
|
|
102972
103044
|
/*needsValue*/
|
|
@@ -102983,7 +103055,7 @@ function transformModule(context) {
|
|
|
102983
103055
|
/*location*/
|
|
102984
103056
|
node.name
|
|
102985
103057
|
),
|
|
102986
|
-
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
103058
|
+
node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
|
|
102987
103059
|
);
|
|
102988
103060
|
}
|
|
102989
103061
|
}
|
|
@@ -103926,7 +103998,7 @@ function transformSystemModule(context) {
|
|
|
103926
103998
|
),
|
|
103927
103999
|
/*typeParameters*/
|
|
103928
104000
|
void 0,
|
|
103929
|
-
visitNodes2(node.parameters, visitor,
|
|
104001
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
103930
104002
|
/*type*/
|
|
103931
104003
|
void 0,
|
|
103932
104004
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -104300,7 +104372,7 @@ function transformSystemModule(context) {
|
|
|
104300
104372
|
}
|
|
104301
104373
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
104302
104374
|
} else {
|
|
104303
|
-
return visitNode(node, discardedValueVisitor,
|
|
104375
|
+
return visitNode(node, discardedValueVisitor, isForInitializer);
|
|
104304
104376
|
}
|
|
104305
104377
|
}
|
|
104306
104378
|
function visitDoStatement(node) {
|
|
@@ -104321,21 +104393,21 @@ function transformSystemModule(context) {
|
|
|
104321
104393
|
return factory2.updateLabeledStatement(
|
|
104322
104394
|
node,
|
|
104323
104395
|
node.label,
|
|
104324
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
104396
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
104325
104397
|
);
|
|
104326
104398
|
}
|
|
104327
104399
|
function visitWithStatement(node) {
|
|
104328
104400
|
return factory2.updateWithStatement(
|
|
104329
104401
|
node,
|
|
104330
104402
|
visitNode(node.expression, visitor, isExpression),
|
|
104331
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
104403
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
104332
104404
|
);
|
|
104333
104405
|
}
|
|
104334
104406
|
function visitSwitchStatement(node) {
|
|
104335
104407
|
return factory2.updateSwitchStatement(
|
|
104336
104408
|
node,
|
|
104337
104409
|
visitNode(node.expression, visitor, isExpression),
|
|
104338
|
-
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
104410
|
+
Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
|
|
104339
104411
|
);
|
|
104340
104412
|
}
|
|
104341
104413
|
function visitCaseBlock(node) {
|
|
@@ -104367,7 +104439,7 @@ function transformSystemModule(context) {
|
|
|
104367
104439
|
node = factory2.updateCatchClause(
|
|
104368
104440
|
node,
|
|
104369
104441
|
node.variableDeclaration,
|
|
104370
|
-
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
104442
|
+
Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
|
|
104371
104443
|
);
|
|
104372
104444
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
104373
104445
|
return node;
|
|
@@ -104437,7 +104509,7 @@ function transformSystemModule(context) {
|
|
|
104437
104509
|
}
|
|
104438
104510
|
function visitImportCallExpression(node) {
|
|
104439
104511
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
104440
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
104512
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
104441
104513
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
104442
104514
|
return factory2.createCallExpression(
|
|
104443
104515
|
factory2.createPropertyAccessExpression(
|
|
@@ -105558,7 +105630,7 @@ function transformDeclarations(context) {
|
|
|
105558
105630
|
sourceFile,
|
|
105559
105631
|
/*bundled*/
|
|
105560
105632
|
true
|
|
105561
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
105633
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
105562
105634
|
const newFile = factory2.updateSourceFile(
|
|
105563
105635
|
sourceFile,
|
|
105564
105636
|
[factory2.createModuleDeclaration(
|
|
@@ -105580,7 +105652,7 @@ function transformDeclarations(context) {
|
|
|
105580
105652
|
return newFile;
|
|
105581
105653
|
}
|
|
105582
105654
|
needsDeclare = true;
|
|
105583
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
105655
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
105584
105656
|
return factory2.updateSourceFile(
|
|
105585
105657
|
sourceFile,
|
|
105586
105658
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -105649,7 +105721,7 @@ function transformDeclarations(context) {
|
|
|
105649
105721
|
refs.forEach(referenceVisitor);
|
|
105650
105722
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
105651
105723
|
} else {
|
|
105652
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
105724
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
|
|
105653
105725
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
105654
105726
|
refs.forEach(referenceVisitor);
|
|
105655
105727
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -105766,9 +105838,9 @@ function transformDeclarations(context) {
|
|
|
105766
105838
|
return name;
|
|
105767
105839
|
} else {
|
|
105768
105840
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
105769
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
105841
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
105770
105842
|
} else {
|
|
105771
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
105843
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
105772
105844
|
}
|
|
105773
105845
|
}
|
|
105774
105846
|
function visitBindingElement(elem) {
|
|
@@ -105838,10 +105910,10 @@ function transformDeclarations(context) {
|
|
|
105838
105910
|
}
|
|
105839
105911
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
105840
105912
|
if (type && !shouldUseResolverType) {
|
|
105841
|
-
return visitNode(type, visitDeclarationSubtree);
|
|
105913
|
+
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
105842
105914
|
}
|
|
105843
105915
|
if (!getParseTreeNode(node)) {
|
|
105844
|
-
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
105916
|
+
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
105845
105917
|
}
|
|
105846
105918
|
if (node.kind === 175 /* SetAccessor */) {
|
|
105847
105919
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -105955,7 +106027,7 @@ function transformDeclarations(context) {
|
|
|
105955
106027
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
105956
106028
|
}
|
|
105957
106029
|
function ensureTypeParams(node, params) {
|
|
105958
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
106030
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
|
|
105959
106031
|
}
|
|
105960
106032
|
function isEnclosingDeclaration(node) {
|
|
105961
106033
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -106090,7 +106162,7 @@ function transformDeclarations(context) {
|
|
|
106090
106162
|
needsDeclare = priorNeedsDeclare;
|
|
106091
106163
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
106092
106164
|
}
|
|
106093
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
106165
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
106094
106166
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
106095
106167
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
106096
106168
|
const key = getOriginalNodeId(statement);
|
|
@@ -106304,7 +106376,7 @@ function transformDeclarations(context) {
|
|
|
106304
106376
|
input,
|
|
106305
106377
|
ensureModifiers(input),
|
|
106306
106378
|
updateParamsList(input, input.parameters),
|
|
106307
|
-
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
106379
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
106308
106380
|
));
|
|
106309
106381
|
}
|
|
106310
106382
|
case 257 /* VariableDeclaration */: {
|
|
@@ -106337,20 +106409,24 @@ function transformDeclarations(context) {
|
|
|
106337
106409
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
106338
106410
|
}
|
|
106339
106411
|
case 191 /* ConditionalType */: {
|
|
106340
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
106341
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
106412
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
|
|
106413
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
|
|
106342
106414
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
106343
106415
|
enclosingDeclaration = input.trueType;
|
|
106344
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
106416
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
|
|
106345
106417
|
enclosingDeclaration = oldEnclosingDecl;
|
|
106346
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
106418
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
|
|
106419
|
+
Debug.assert(checkType);
|
|
106420
|
+
Debug.assert(extendsType);
|
|
106421
|
+
Debug.assert(trueType);
|
|
106422
|
+
Debug.assert(falseType);
|
|
106347
106423
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
106348
106424
|
}
|
|
106349
106425
|
case 181 /* FunctionType */: {
|
|
106350
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
106426
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
106351
106427
|
}
|
|
106352
106428
|
case 182 /* ConstructorType */: {
|
|
106353
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
106429
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
106354
106430
|
}
|
|
106355
106431
|
case 202 /* ImportType */: {
|
|
106356
106432
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -106494,7 +106570,7 @@ function transformDeclarations(context) {
|
|
|
106494
106570
|
ensureModifiers(input),
|
|
106495
106571
|
input.name,
|
|
106496
106572
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
106497
|
-
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
106573
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
106498
106574
|
));
|
|
106499
106575
|
needsDeclare = previousNeedsDeclare;
|
|
106500
106576
|
return clean2;
|
|
@@ -106506,7 +106582,7 @@ function transformDeclarations(context) {
|
|
|
106506
106582
|
input.name,
|
|
106507
106583
|
ensureTypeParams(input, input.typeParameters),
|
|
106508
106584
|
transformHeritageClauses(input.heritageClauses),
|
|
106509
|
-
visitNodes2(input.members, visitDeclarationSubtree)
|
|
106585
|
+
visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
|
|
106510
106586
|
));
|
|
106511
106587
|
}
|
|
106512
106588
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -106623,7 +106699,7 @@ function transformDeclarations(context) {
|
|
|
106623
106699
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
106624
106700
|
resultHasScopeMarker = false;
|
|
106625
106701
|
needsScopeFixMarker = false;
|
|
106626
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
106702
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
|
|
106627
106703
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
106628
106704
|
if (input.flags & 16777216 /* Ambient */) {
|
|
106629
106705
|
needsScopeFixMarker = false;
|
|
@@ -106632,7 +106708,7 @@ function transformDeclarations(context) {
|
|
|
106632
106708
|
if (needsScopeFixMarker) {
|
|
106633
106709
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
106634
106710
|
} else {
|
|
106635
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
106711
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
|
|
106636
106712
|
}
|
|
106637
106713
|
}
|
|
106638
106714
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -106728,7 +106804,7 @@ function transformDeclarations(context) {
|
|
|
106728
106804
|
void 0
|
|
106729
106805
|
)
|
|
106730
106806
|
] : void 0;
|
|
106731
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
106807
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
106732
106808
|
const members = factory2.createNodeArray(memberNodes);
|
|
106733
106809
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
106734
106810
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -106752,11 +106828,11 @@ function transformDeclarations(context) {
|
|
|
106752
106828
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
106753
106829
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
106754
106830
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
106755
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
106831
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
106756
106832
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
106757
106833
|
return newClause;
|
|
106758
106834
|
}
|
|
106759
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
106835
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
|
|
106760
106836
|
}));
|
|
106761
106837
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
106762
106838
|
input,
|
|
@@ -106812,7 +106888,7 @@ function transformDeclarations(context) {
|
|
|
106812
106888
|
function transformVariableStatement(input) {
|
|
106813
106889
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
106814
106890
|
return;
|
|
106815
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
106891
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
|
|
106816
106892
|
if (!length(nodes))
|
|
106817
106893
|
return;
|
|
106818
106894
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -106903,7 +106979,7 @@ function transformDeclarations(context) {
|
|
|
106903
106979
|
function transformHeritageClauses(nodes) {
|
|
106904
106980
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
106905
106981
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
106906
|
-
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
106982
|
+
})), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
|
|
106907
106983
|
}
|
|
106908
106984
|
}
|
|
106909
106985
|
function isAlwaysType(node) {
|
|
@@ -116386,7 +116462,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
116386
116462
|
createOptionValueDiagnostic("importsNotUsedAsValues", Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
|
|
116387
116463
|
}
|
|
116388
116464
|
if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) {
|
|
116389
|
-
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.
|
|
116465
|
+
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
|
|
116390
116466
|
}
|
|
116391
116467
|
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
116392
116468
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
@@ -119647,6 +119723,9 @@ function getFilesInErrorForSummary(diagnostics) {
|
|
|
119647
119723
|
}
|
|
119648
119724
|
);
|
|
119649
119725
|
return filesInError.map((fileName) => {
|
|
119726
|
+
if (fileName === void 0) {
|
|
119727
|
+
return void 0;
|
|
119728
|
+
}
|
|
119650
119729
|
const diagnosticForFileName = find(
|
|
119651
119730
|
diagnostics,
|
|
119652
119731
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -120320,6 +120399,8 @@ function createWatchProgram(host) {
|
|
|
120320
120399
|
parseConfigFile2();
|
|
120321
120400
|
newLine = updateNewLine();
|
|
120322
120401
|
}
|
|
120402
|
+
Debug.assert(compilerOptions);
|
|
120403
|
+
Debug.assert(rootFileNames);
|
|
120323
120404
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
120324
120405
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
120325
120406
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -120422,6 +120503,8 @@ function createWatchProgram(host) {
|
|
|
120422
120503
|
}
|
|
120423
120504
|
function synchronizeProgram() {
|
|
120424
120505
|
writeLog(`Synchronizing program`);
|
|
120506
|
+
Debug.assert(compilerOptions);
|
|
120507
|
+
Debug.assert(rootFileNames);
|
|
120425
120508
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
120426
120509
|
const program = getCurrentBuilderProgram();
|
|
120427
120510
|
if (hasChangedCompilerOptions) {
|
|
@@ -120661,6 +120744,8 @@ function createWatchProgram(host) {
|
|
|
120661
120744
|
}
|
|
120662
120745
|
function reloadFileNamesFromConfigFile() {
|
|
120663
120746
|
writeLog("Reloading new file names and options");
|
|
120747
|
+
Debug.assert(compilerOptions);
|
|
120748
|
+
Debug.assert(configFileName);
|
|
120664
120749
|
reloadLevel = 0 /* None */;
|
|
120665
120750
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
120666
120751
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -120669,6 +120754,7 @@ function createWatchProgram(host) {
|
|
|
120669
120754
|
synchronizeProgram();
|
|
120670
120755
|
}
|
|
120671
120756
|
function reloadConfigFile() {
|
|
120757
|
+
Debug.assert(configFileName);
|
|
120672
120758
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
120673
120759
|
reloadLevel = 0 /* None */;
|
|
120674
120760
|
if (cachedDirectoryStructureHost) {
|
|
@@ -120681,6 +120767,7 @@ function createWatchProgram(host) {
|
|
|
120681
120767
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
120682
120768
|
}
|
|
120683
120769
|
function parseConfigFile2() {
|
|
120770
|
+
Debug.assert(configFileName);
|
|
120684
120771
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
120685
120772
|
configFileName,
|
|
120686
120773
|
optionsToExtendForConfigFile,
|
|
@@ -120708,6 +120795,7 @@ function createWatchProgram(host) {
|
|
|
120708
120795
|
return config.parsedCommandLine;
|
|
120709
120796
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
120710
120797
|
writeLog("Reloading new file names and options");
|
|
120798
|
+
Debug.assert(compilerOptions);
|
|
120711
120799
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
120712
120800
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
120713
120801
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -120799,7 +120887,8 @@ function createWatchProgram(host) {
|
|
|
120799
120887
|
return watchDirectory(
|
|
120800
120888
|
directory,
|
|
120801
120889
|
(fileOrDirectory) => {
|
|
120802
|
-
Debug.assert(
|
|
120890
|
+
Debug.assert(configFileName);
|
|
120891
|
+
Debug.assert(compilerOptions);
|
|
120803
120892
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
120804
120893
|
if (cachedDirectoryStructureHost) {
|
|
120805
120894
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -120830,6 +120919,7 @@ function createWatchProgram(host) {
|
|
|
120830
120919
|
);
|
|
120831
120920
|
}
|
|
120832
120921
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
120922
|
+
Debug.assert(configFileName);
|
|
120833
120923
|
updateSharedExtendedConfigFileWatcher(
|
|
120834
120924
|
forProjectPath,
|
|
120835
120925
|
options,
|
|
@@ -124672,6 +124762,7 @@ __export(ts_exports3, {
|
|
|
124672
124762
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
124673
124763
|
isArray: () => isArray,
|
|
124674
124764
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
124765
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
124675
124766
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
124676
124767
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
124677
124768
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -124704,6 +124795,7 @@ __export(ts_exports3, {
|
|
|
124704
124795
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
124705
124796
|
isBindingElement: () => isBindingElement,
|
|
124706
124797
|
isBindingName: () => isBindingName,
|
|
124798
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
124707
124799
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
124708
124800
|
isBindingPattern: () => isBindingPattern,
|
|
124709
124801
|
isBlock: () => isBlock,
|
|
@@ -124910,6 +125002,7 @@ __export(ts_exports3, {
|
|
|
124910
125002
|
isInferTypeNode: () => isInferTypeNode,
|
|
124911
125003
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
124912
125004
|
isInitializedProperty: () => isInitializedProperty,
|
|
125005
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
124913
125006
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
124914
125007
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
124915
125008
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -125016,6 +125109,7 @@ __export(ts_exports3, {
|
|
|
125016
125109
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
125017
125110
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
125018
125111
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
125112
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
125019
125113
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
125020
125114
|
isLocalName: () => isLocalName,
|
|
125021
125115
|
isLogicalOperator: () => isLogicalOperator,
|
|
@@ -128834,7 +128928,7 @@ function isNonGlobalDeclaration(declaration) {
|
|
|
128834
128928
|
if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) {
|
|
128835
128929
|
return false;
|
|
128836
128930
|
}
|
|
128837
|
-
return isInJSFile(declaration) || !findAncestor(declaration, isGlobalScopeAugmentation);
|
|
128931
|
+
return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d));
|
|
128838
128932
|
}
|
|
128839
128933
|
function isDeprecatedDeclaration(decl) {
|
|
128840
128934
|
return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */);
|
|
@@ -138033,7 +138127,7 @@ function doChange(changes, sourceFile, decl) {
|
|
|
138033
138127
|
if (!param.type) {
|
|
138034
138128
|
const paramType = getJSDocType(param);
|
|
138035
138129
|
if (paramType)
|
|
138036
|
-
changes.tryInsertTypeAnnotation(sourceFile, param,
|
|
138130
|
+
changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode));
|
|
138037
138131
|
}
|
|
138038
138132
|
}
|
|
138039
138133
|
if (needParens)
|
|
@@ -138041,12 +138135,12 @@ function doChange(changes, sourceFile, decl) {
|
|
|
138041
138135
|
if (!decl.type) {
|
|
138042
138136
|
const returnType = getJSDocReturnType(decl);
|
|
138043
138137
|
if (returnType)
|
|
138044
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
138138
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode));
|
|
138045
138139
|
}
|
|
138046
138140
|
} else {
|
|
138047
138141
|
const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist");
|
|
138048
138142
|
Debug.assert(!decl.type, "The JSDocType decl should have a type");
|
|
138049
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
138143
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode));
|
|
138050
138144
|
}
|
|
138051
138145
|
}
|
|
138052
138146
|
function isDeclarationWithType(node) {
|
|
@@ -138083,19 +138177,19 @@ function transformJSDocTypeLiteral(node) {
|
|
|
138083
138177
|
void 0,
|
|
138084
138178
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
138085
138179
|
isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
138086
|
-
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
138180
|
+
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
138087
138181
|
)));
|
|
138088
138182
|
setEmitFlags(typeNode, 1 /* SingleLine */);
|
|
138089
138183
|
return typeNode;
|
|
138090
138184
|
}
|
|
138091
138185
|
function transformJSDocOptionalType(node) {
|
|
138092
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
138186
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
138093
138187
|
}
|
|
138094
138188
|
function transformJSDocNullableType(node) {
|
|
138095
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
138189
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
138096
138190
|
}
|
|
138097
138191
|
function transformJSDocVariadicType(node) {
|
|
138098
|
-
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType));
|
|
138192
|
+
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode));
|
|
138099
138193
|
}
|
|
138100
138194
|
function transformJSDocFunctionType(node) {
|
|
138101
138195
|
var _a2;
|
|
@@ -138106,7 +138200,7 @@ function transformJSDocParameter(node) {
|
|
|
138106
138200
|
const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;
|
|
138107
138201
|
const name = node.name || (isRest ? "rest" : "arg" + index);
|
|
138108
138202
|
const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken;
|
|
138109
|
-
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType), node.initializer);
|
|
138203
|
+
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer);
|
|
138110
138204
|
}
|
|
138111
138205
|
function transformJSDocTypeReference(node) {
|
|
138112
138206
|
let name = node.typeName;
|
|
@@ -138133,7 +138227,7 @@ function transformJSDocTypeReference(node) {
|
|
|
138133
138227
|
if ((text === "Array" || text === "Promise") && !node.typeArguments) {
|
|
138134
138228
|
args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]);
|
|
138135
138229
|
} else {
|
|
138136
|
-
args = visitNodes2(node.typeArguments, transformJSDocType);
|
|
138230
|
+
args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode);
|
|
138137
138231
|
}
|
|
138138
138232
|
}
|
|
138139
138233
|
return factory.createTypeReferenceNode(name, args);
|
|
@@ -140691,13 +140785,19 @@ function getUmdSymbol(token, checker) {
|
|
|
140691
140785
|
if (isUMDExportSymbol(umdSymbol))
|
|
140692
140786
|
return umdSymbol;
|
|
140693
140787
|
const { parent: parent2 } = token;
|
|
140694
|
-
|
|
140695
|
-
checker.
|
|
140696
|
-
|
|
140697
|
-
|
|
140698
|
-
|
|
140699
|
-
|
|
140700
|
-
|
|
140788
|
+
if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) {
|
|
140789
|
+
const parentSymbol = checker.resolveName(
|
|
140790
|
+
checker.getJsxNamespace(parent2),
|
|
140791
|
+
isJsxOpeningLikeElement(parent2) ? token : parent2,
|
|
140792
|
+
111551 /* Value */,
|
|
140793
|
+
/*excludeGlobals*/
|
|
140794
|
+
false
|
|
140795
|
+
);
|
|
140796
|
+
if (isUMDExportSymbol(parentSymbol)) {
|
|
140797
|
+
return parentSymbol;
|
|
140798
|
+
}
|
|
140799
|
+
}
|
|
140800
|
+
return void 0;
|
|
140701
140801
|
}
|
|
140702
140802
|
function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) {
|
|
140703
140803
|
switch (exportKind) {
|
|
@@ -145809,18 +145909,17 @@ function findJsonProperty(obj, name) {
|
|
|
145809
145909
|
}
|
|
145810
145910
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
|
145811
145911
|
let symbols;
|
|
145812
|
-
const typeNode = visitNode(importTypeNode, visit);
|
|
145912
|
+
const typeNode = visitNode(importTypeNode, visit, isTypeNode);
|
|
145813
145913
|
if (symbols && typeNode) {
|
|
145814
145914
|
return { typeNode, symbols };
|
|
145815
145915
|
}
|
|
145816
145916
|
function visit(node) {
|
|
145817
|
-
var _a2;
|
|
145818
145917
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
|
145819
145918
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
|
145820
145919
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
|
145821
145920
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
|
145822
145921
|
symbols = append(symbols, firstIdentifier.symbol);
|
|
145823
|
-
const typeArguments = (
|
|
145922
|
+
const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode);
|
|
145824
145923
|
return factory.createTypeReferenceNode(qualifier, typeArguments);
|
|
145825
145924
|
}
|
|
145826
145925
|
return visitEachChild(node, visit, nullTransformationContext);
|
|
@@ -160045,7 +160144,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
|
|
|
160045
160144
|
let ignoreReturns = false;
|
|
160046
160145
|
const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);
|
|
160047
160146
|
if (hasWritesOrVariableDeclarations || substitutions.size) {
|
|
160048
|
-
const rewrittenStatements = visitNodes2(statements, visitor).slice();
|
|
160147
|
+
const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice();
|
|
160049
160148
|
if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {
|
|
160050
160149
|
const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);
|
|
160051
160150
|
if (assignments.length === 1) {
|
|
@@ -160073,7 +160172,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
|
|
|
160073
160172
|
if (!returnValueProperty) {
|
|
160074
160173
|
returnValueProperty = "__return";
|
|
160075
160174
|
}
|
|
160076
|
-
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor)));
|
|
160175
|
+
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression)));
|
|
160077
160176
|
}
|
|
160078
160177
|
if (assignments.length === 1) {
|
|
160079
160178
|
return factory.createReturnStatement(assignments[0].name);
|
|
@@ -163091,6 +163190,7 @@ function assignPositionsToNodeArray(nodes, visitor, test, start2, count) {
|
|
|
163091
163190
|
if (!visited) {
|
|
163092
163191
|
return visited;
|
|
163093
163192
|
}
|
|
163193
|
+
Debug.assert(nodes);
|
|
163094
163194
|
const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;
|
|
163095
163195
|
setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));
|
|
163096
163196
|
return nodeArray;
|
|
@@ -174758,6 +174858,7 @@ var Session3 = class {
|
|
|
174758
174858
|
constructor(opts) {
|
|
174759
174859
|
this.changeSeq = 0;
|
|
174760
174860
|
this.handlers = new Map(Object.entries({
|
|
174861
|
+
// TODO(jakebailey): correctly type the handlers
|
|
174761
174862
|
[CommandNames.Status]: () => {
|
|
174762
174863
|
const response = { version };
|
|
174763
174864
|
return this.requiredResponse(response);
|
|
@@ -180323,6 +180424,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180323
180424
|
isArgumentExpressionOfElementAccess,
|
|
180324
180425
|
isArray,
|
|
180325
180426
|
isArrayBindingElement,
|
|
180427
|
+
isArrayBindingOrAssignmentElement,
|
|
180326
180428
|
isArrayBindingOrAssignmentPattern,
|
|
180327
180429
|
isArrayBindingPattern,
|
|
180328
180430
|
isArrayLiteralExpression,
|
|
@@ -180355,6 +180457,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180355
180457
|
isBindableStaticNameExpression,
|
|
180356
180458
|
isBindingElement,
|
|
180357
180459
|
isBindingName,
|
|
180460
|
+
isBindingOrAssignmentElement,
|
|
180358
180461
|
isBindingOrAssignmentPattern,
|
|
180359
180462
|
isBindingPattern,
|
|
180360
180463
|
isBlock,
|
|
@@ -180561,6 +180664,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180561
180664
|
isInferTypeNode,
|
|
180562
180665
|
isInfinityOrNaNString,
|
|
180563
180666
|
isInitializedProperty,
|
|
180667
|
+
isInitializedVariable,
|
|
180564
180668
|
isInsideJsxElement,
|
|
180565
180669
|
isInsideJsxElementOrAttribute,
|
|
180566
180670
|
isInsideNodeModules,
|
|
@@ -180667,6 +180771,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180667
180771
|
isLiteralLikeElementAccess,
|
|
180668
180772
|
isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
180669
180773
|
isLiteralTypeLikeExpression,
|
|
180774
|
+
isLiteralTypeLiteral,
|
|
180670
180775
|
isLiteralTypeNode,
|
|
180671
180776
|
isLocalName,
|
|
180672
180777
|
isLogicalOperator,
|