@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/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
45
|
+
version = `${versionMajorMinor}.0-insiders.20230118`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -8117,7 +8117,7 @@ ${lanes.join("\n")}
|
|
|
8117
8117
|
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'."),
|
|
8118
8118
|
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'."),
|
|
8119
8119
|
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."),
|
|
8120
|
-
|
|
8120
|
+
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."),
|
|
8121
8121
|
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."),
|
|
8122
8122
|
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'."),
|
|
8123
8123
|
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.`),
|
|
@@ -9493,10 +9493,7 @@ ${lanes.join("\n")}
|
|
|
9493
9493
|
initial
|
|
9494
9494
|
);
|
|
9495
9495
|
}
|
|
9496
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
9497
|
-
if (!comments) {
|
|
9498
|
-
comments = [];
|
|
9499
|
-
}
|
|
9496
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
|
|
9500
9497
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
9501
9498
|
return comments;
|
|
9502
9499
|
}
|
|
@@ -11444,7 +11441,10 @@ ${lanes.join("\n")}
|
|
|
11444
11441
|
node = node.original;
|
|
11445
11442
|
}
|
|
11446
11443
|
}
|
|
11447
|
-
|
|
11444
|
+
if (!node || !nodeTest) {
|
|
11445
|
+
return node;
|
|
11446
|
+
}
|
|
11447
|
+
return nodeTest(node) ? node : void 0;
|
|
11448
11448
|
}
|
|
11449
11449
|
function findAncestor(node, callback) {
|
|
11450
11450
|
while (node) {
|
|
@@ -12188,6 +12188,9 @@ ${lanes.join("\n")}
|
|
|
12188
12188
|
}
|
|
12189
12189
|
return false;
|
|
12190
12190
|
}
|
|
12191
|
+
function isBindingOrAssignmentElement(node) {
|
|
12192
|
+
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
12193
|
+
}
|
|
12191
12194
|
function isBindingOrAssignmentPattern(node) {
|
|
12192
12195
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
12193
12196
|
}
|
|
@@ -12217,6 +12220,24 @@ ${lanes.join("\n")}
|
|
|
12217
12220
|
}
|
|
12218
12221
|
return false;
|
|
12219
12222
|
}
|
|
12223
|
+
function isArrayBindingOrAssignmentElement(node) {
|
|
12224
|
+
switch (node.kind) {
|
|
12225
|
+
case 205 /* BindingElement */:
|
|
12226
|
+
case 229 /* OmittedExpression */:
|
|
12227
|
+
case 227 /* SpreadElement */:
|
|
12228
|
+
case 206 /* ArrayLiteralExpression */:
|
|
12229
|
+
case 207 /* ObjectLiteralExpression */:
|
|
12230
|
+
case 79 /* Identifier */:
|
|
12231
|
+
case 208 /* PropertyAccessExpression */:
|
|
12232
|
+
case 209 /* ElementAccessExpression */:
|
|
12233
|
+
return true;
|
|
12234
|
+
}
|
|
12235
|
+
return isAssignmentExpression(
|
|
12236
|
+
node,
|
|
12237
|
+
/*excludeCompoundAssignment*/
|
|
12238
|
+
true
|
|
12239
|
+
);
|
|
12240
|
+
}
|
|
12220
12241
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
12221
12242
|
const kind = node.kind;
|
|
12222
12243
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -12312,6 +12333,18 @@ ${lanes.join("\n")}
|
|
|
12312
12333
|
return false;
|
|
12313
12334
|
}
|
|
12314
12335
|
}
|
|
12336
|
+
function isLiteralTypeLiteral(node) {
|
|
12337
|
+
node = skipPartiallyEmittedExpressions(node);
|
|
12338
|
+
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
12339
|
+
case 104 /* NullKeyword */:
|
|
12340
|
+
case 110 /* TrueKeyword */:
|
|
12341
|
+
case 95 /* FalseKeyword */:
|
|
12342
|
+
case 221 /* PrefixUnaryExpression */:
|
|
12343
|
+
return true;
|
|
12344
|
+
default:
|
|
12345
|
+
return isLiteralExpression(node);
|
|
12346
|
+
}
|
|
12347
|
+
}
|
|
12315
12348
|
function isExpression(node) {
|
|
12316
12349
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
12317
12350
|
}
|
|
@@ -13298,6 +13331,7 @@ ${lanes.join("\n")}
|
|
|
13298
13331
|
return false;
|
|
13299
13332
|
}
|
|
13300
13333
|
function isDeclarationWithTypeParameters(node) {
|
|
13334
|
+
Debug.type(node);
|
|
13301
13335
|
switch (node.kind) {
|
|
13302
13336
|
case 341 /* JSDocCallbackTag */:
|
|
13303
13337
|
case 349 /* JSDocTypedefTag */:
|
|
@@ -13309,6 +13343,7 @@ ${lanes.join("\n")}
|
|
|
13309
13343
|
}
|
|
13310
13344
|
}
|
|
13311
13345
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
13346
|
+
Debug.type(node);
|
|
13312
13347
|
switch (node.kind) {
|
|
13313
13348
|
case 176 /* CallSignature */:
|
|
13314
13349
|
case 177 /* ConstructSignature */:
|
|
@@ -16759,7 +16794,7 @@ ${lanes.join("\n")}
|
|
|
16759
16794
|
return filter(node.declarations, isInitializedVariable);
|
|
16760
16795
|
}
|
|
16761
16796
|
function isInitializedVariable(node) {
|
|
16762
|
-
return node.initializer !== void 0;
|
|
16797
|
+
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
16763
16798
|
}
|
|
16764
16799
|
function isWatchSet(options) {
|
|
16765
16800
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -16940,7 +16975,7 @@ ${lanes.join("\n")}
|
|
|
16940
16975
|
return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);
|
|
16941
16976
|
}
|
|
16942
16977
|
function isTypeNodeKind(kind) {
|
|
16943
|
-
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 */;
|
|
16978
|
+
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 */;
|
|
16944
16979
|
}
|
|
16945
16980
|
function isAccessExpression(node) {
|
|
16946
16981
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -36118,6 +36153,7 @@ ${lanes.join("\n")}
|
|
|
36118
36153
|
}
|
|
36119
36154
|
}
|
|
36120
36155
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
36156
|
+
Debug.assert(typeof spec === "string");
|
|
36121
36157
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
36122
36158
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
36123
36159
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -37206,7 +37242,7 @@ ${lanes.join("\n")}
|
|
|
37206
37242
|
{
|
|
37207
37243
|
name: "allowImportingTsExtensions",
|
|
37208
37244
|
type: "boolean",
|
|
37209
|
-
|
|
37245
|
+
affectsSemanticDiagnostics: true,
|
|
37210
37246
|
category: Diagnostics.Modules,
|
|
37211
37247
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
37212
37248
|
defaultValueDescription: false
|
|
@@ -40193,7 +40229,7 @@ ${lanes.join("\n")}
|
|
|
40193
40229
|
}
|
|
40194
40230
|
}
|
|
40195
40231
|
function shouldAllowImportingTsExtension(compilerOptions, fromFileName) {
|
|
40196
|
-
return
|
|
40232
|
+
return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName);
|
|
40197
40233
|
}
|
|
40198
40234
|
function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
|
|
40199
40235
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -44895,7 +44931,7 @@ ${lanes.join("\n")}
|
|
|
44895
44931
|
if (jsxFragmentPragma) {
|
|
44896
44932
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
44897
44933
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
44898
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
44934
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
|
|
44899
44935
|
if (file.localJsxFragmentFactory) {
|
|
44900
44936
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
44901
44937
|
}
|
|
@@ -44938,7 +44974,7 @@ ${lanes.join("\n")}
|
|
|
44938
44974
|
if (jsxPragma) {
|
|
44939
44975
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
44940
44976
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
44941
|
-
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
44977
|
+
visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
|
|
44942
44978
|
if (file.localJsxFactory) {
|
|
44943
44979
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
44944
44980
|
}
|
|
@@ -46449,6 +46485,7 @@ ${lanes.join("\n")}
|
|
|
46449
46485
|
return valueSymbol;
|
|
46450
46486
|
}
|
|
46451
46487
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
46488
|
+
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
46452
46489
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
46453
46490
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
46454
46491
|
if (valueSymbol.valueDeclaration)
|
|
@@ -50088,7 +50125,7 @@ ${lanes.join("\n")}
|
|
|
50088
50125
|
}
|
|
50089
50126
|
let hadError = false;
|
|
50090
50127
|
const file = getSourceFileOfNode(existing);
|
|
50091
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
50128
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
50092
50129
|
if (hadError) {
|
|
50093
50130
|
return void 0;
|
|
50094
50131
|
}
|
|
@@ -50101,16 +50138,16 @@ ${lanes.join("\n")}
|
|
|
50101
50138
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
50102
50139
|
}
|
|
50103
50140
|
if (isJSDocNullableType(node)) {
|
|
50104
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
50141
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
|
|
50105
50142
|
}
|
|
50106
50143
|
if (isJSDocOptionalType(node)) {
|
|
50107
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
50144
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
50108
50145
|
}
|
|
50109
50146
|
if (isJSDocNonNullableType(node)) {
|
|
50110
50147
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
50111
50148
|
}
|
|
50112
50149
|
if (isJSDocVariadicType(node)) {
|
|
50113
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
50150
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
50114
50151
|
}
|
|
50115
50152
|
if (isJSDocTypeLiteral(node)) {
|
|
50116
50153
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -50122,7 +50159,7 @@ ${lanes.join("\n")}
|
|
|
50122
50159
|
void 0,
|
|
50123
50160
|
name,
|
|
50124
50161
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
50125
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50162
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50126
50163
|
);
|
|
50127
50164
|
}));
|
|
50128
50165
|
}
|
|
@@ -50141,9 +50178,9 @@ ${lanes.join("\n")}
|
|
|
50141
50178
|
"x",
|
|
50142
50179
|
/*questionToken*/
|
|
50143
50180
|
void 0,
|
|
50144
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
50181
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
|
|
50145
50182
|
)],
|
|
50146
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
50183
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
|
|
50147
50184
|
)]);
|
|
50148
50185
|
}
|
|
50149
50186
|
if (isJSDocFunctionType(node)) {
|
|
@@ -50152,33 +50189,33 @@ ${lanes.join("\n")}
|
|
|
50152
50189
|
return factory.createConstructorTypeNode(
|
|
50153
50190
|
/*modifiers*/
|
|
50154
50191
|
void 0,
|
|
50155
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
50192
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
50156
50193
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
50157
50194
|
/*modifiers*/
|
|
50158
50195
|
void 0,
|
|
50159
50196
|
getEffectiveDotDotDotForParameter(p),
|
|
50160
50197
|
getNameForJSDocFunctionParameter(p, i),
|
|
50161
50198
|
p.questionToken,
|
|
50162
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
50199
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
50163
50200
|
/*initializer*/
|
|
50164
50201
|
void 0
|
|
50165
50202
|
)),
|
|
50166
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50203
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50167
50204
|
);
|
|
50168
50205
|
} else {
|
|
50169
50206
|
return factory.createFunctionTypeNode(
|
|
50170
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
50207
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
50171
50208
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
50172
50209
|
/*modifiers*/
|
|
50173
50210
|
void 0,
|
|
50174
50211
|
getEffectiveDotDotDotForParameter(p),
|
|
50175
50212
|
getNameForJSDocFunctionParameter(p, i),
|
|
50176
50213
|
p.questionToken,
|
|
50177
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
50214
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
50178
50215
|
/*initializer*/
|
|
50179
50216
|
void 0
|
|
50180
50217
|
)),
|
|
50181
|
-
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50218
|
+
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50182
50219
|
);
|
|
50183
50220
|
}
|
|
50184
50221
|
}
|
|
@@ -51100,7 +51137,7 @@ ${lanes.join("\n")}
|
|
|
51100
51137
|
break;
|
|
51101
51138
|
}
|
|
51102
51139
|
case 268 /* ImportEqualsDeclaration */:
|
|
51103
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
51140
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
|
|
51104
51141
|
serializeMaybeAliasAssignment(symbol);
|
|
51105
51142
|
break;
|
|
51106
51143
|
}
|
|
@@ -66575,7 +66612,7 @@ ${lanes.join("\n")}
|
|
|
66575
66612
|
return getNonMissingTypeOfSymbol(symbol);
|
|
66576
66613
|
}
|
|
66577
66614
|
function getControlFlowContainer(node) {
|
|
66578
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
66615
|
+
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 */);
|
|
66579
66616
|
}
|
|
66580
66617
|
function isSymbolAssigned(symbol) {
|
|
66581
66618
|
if (!symbol.valueDeclaration) {
|
|
@@ -66833,13 +66870,14 @@ ${lanes.join("\n")}
|
|
|
66833
66870
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
66834
66871
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
66835
66872
|
let flowContainer = getControlFlowContainer(node);
|
|
66873
|
+
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
66836
66874
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
66837
66875
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
66838
66876
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
66839
66877
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
66840
66878
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
66841
66879
|
}
|
|
66842
|
-
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 */;
|
|
66880
|
+
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 */;
|
|
66843
66881
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
66844
66882
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
66845
66883
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -83577,13 +83615,10 @@ ${lanes.join("\n")}
|
|
|
83577
83615
|
|
|
83578
83616
|
// src/compiler/visitorPublic.ts
|
|
83579
83617
|
function visitNode(node, visitor, test, lift) {
|
|
83580
|
-
if (node === void 0
|
|
83618
|
+
if (node === void 0) {
|
|
83581
83619
|
return node;
|
|
83582
83620
|
}
|
|
83583
83621
|
const visited = visitor(node);
|
|
83584
|
-
if (visited === node) {
|
|
83585
|
-
return node;
|
|
83586
|
-
}
|
|
83587
83622
|
let visitedNode;
|
|
83588
83623
|
if (visited === void 0) {
|
|
83589
83624
|
return void 0;
|
|
@@ -83596,7 +83631,7 @@ ${lanes.join("\n")}
|
|
|
83596
83631
|
return visitedNode;
|
|
83597
83632
|
}
|
|
83598
83633
|
function visitNodes2(nodes, visitor, test, start, count) {
|
|
83599
|
-
if (nodes === void 0
|
|
83634
|
+
if (nodes === void 0) {
|
|
83600
83635
|
return nodes;
|
|
83601
83636
|
}
|
|
83602
83637
|
const length2 = nodes.length;
|
|
@@ -83645,25 +83680,30 @@ ${lanes.join("\n")}
|
|
|
83645
83680
|
}
|
|
83646
83681
|
for (let i = 0; i < count; i++) {
|
|
83647
83682
|
const node = nodes[i + start];
|
|
83648
|
-
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
83683
|
+
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
83649
83684
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
83650
83685
|
if (updated === void 0) {
|
|
83651
83686
|
updated = nodes.slice(0, i);
|
|
83687
|
+
Debug.assertEachNode(updated, test);
|
|
83652
83688
|
}
|
|
83653
83689
|
if (visited) {
|
|
83654
83690
|
if (isArray(visited)) {
|
|
83655
83691
|
for (const visitedNode of visited) {
|
|
83656
|
-
|
|
83692
|
+
Debug.assertNode(visitedNode, test);
|
|
83657
83693
|
updated.push(visitedNode);
|
|
83658
83694
|
}
|
|
83659
83695
|
} else {
|
|
83660
|
-
|
|
83696
|
+
Debug.assertNode(visited, test);
|
|
83661
83697
|
updated.push(visited);
|
|
83662
83698
|
}
|
|
83663
83699
|
}
|
|
83664
83700
|
}
|
|
83665
83701
|
}
|
|
83666
|
-
|
|
83702
|
+
if (updated) {
|
|
83703
|
+
return updated;
|
|
83704
|
+
}
|
|
83705
|
+
Debug.assertEachNode(nodes, test);
|
|
83706
|
+
return nodes;
|
|
83667
83707
|
}
|
|
83668
83708
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
83669
83709
|
context.startLexicalEnvironment();
|
|
@@ -83677,7 +83717,7 @@ ${lanes.join("\n")}
|
|
|
83677
83717
|
context.startLexicalEnvironment();
|
|
83678
83718
|
if (nodes) {
|
|
83679
83719
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
83680
|
-
updated = nodesVisitor(nodes, visitor,
|
|
83720
|
+
updated = nodesVisitor(nodes, visitor, isParameter);
|
|
83681
83721
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
83682
83722
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
83683
83723
|
}
|
|
@@ -83799,6 +83839,7 @@ ${lanes.join("\n")}
|
|
|
83799
83839
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
83800
83840
|
context.startBlockScope();
|
|
83801
83841
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
83842
|
+
Debug.assert(updated);
|
|
83802
83843
|
const declarations = context.endBlockScope();
|
|
83803
83844
|
if (some(declarations)) {
|
|
83804
83845
|
if (isBlock(updated)) {
|
|
@@ -83830,14 +83871,14 @@ ${lanes.join("\n")}
|
|
|
83830
83871
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83831
83872
|
return context.factory.updateQualifiedName(
|
|
83832
83873
|
node,
|
|
83833
|
-
nodeVisitor(node.left, visitor, isEntityName),
|
|
83834
|
-
nodeVisitor(node.right, visitor, isIdentifier)
|
|
83874
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
|
|
83875
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
|
|
83835
83876
|
);
|
|
83836
83877
|
},
|
|
83837
83878
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83838
83879
|
return context.factory.updateComputedPropertyName(
|
|
83839
83880
|
node,
|
|
83840
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
83881
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
83841
83882
|
);
|
|
83842
83883
|
},
|
|
83843
83884
|
// Signature elements
|
|
@@ -83845,7 +83886,7 @@ ${lanes.join("\n")}
|
|
|
83845
83886
|
return context.factory.updateTypeParameterDeclaration(
|
|
83846
83887
|
node,
|
|
83847
83888
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83848
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
83889
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
83849
83890
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
83850
83891
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
83851
83892
|
);
|
|
@@ -83854,9 +83895,9 @@ ${lanes.join("\n")}
|
|
|
83854
83895
|
return context.factory.updateParameterDeclaration(
|
|
83855
83896
|
node,
|
|
83856
83897
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83857
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
83858
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
83859
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83898
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
83899
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
83900
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83860
83901
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83861
83902
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
83862
83903
|
);
|
|
@@ -83864,7 +83905,7 @@ ${lanes.join("\n")}
|
|
|
83864
83905
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83865
83906
|
return context.factory.updateDecorator(
|
|
83866
83907
|
node,
|
|
83867
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
83908
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
83868
83909
|
);
|
|
83869
83910
|
},
|
|
83870
83911
|
// Type elements
|
|
@@ -83872,19 +83913,19 @@ ${lanes.join("\n")}
|
|
|
83872
83913
|
return context.factory.updatePropertySignature(
|
|
83873
83914
|
node,
|
|
83874
83915
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83875
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83876
|
-
nodeVisitor(node.questionToken, tokenVisitor,
|
|
83916
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83917
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83877
83918
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83878
83919
|
);
|
|
83879
83920
|
},
|
|
83880
83921
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
83881
|
-
var _a2;
|
|
83922
|
+
var _a2, _b;
|
|
83882
83923
|
return context.factory.updatePropertyDeclaration(
|
|
83883
83924
|
node,
|
|
83884
83925
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83885
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83926
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83886
83927
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
83887
|
-
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
83928
|
+
tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
|
|
83888
83929
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83889
83930
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
83890
83931
|
);
|
|
@@ -83893,10 +83934,10 @@ ${lanes.join("\n")}
|
|
|
83893
83934
|
return context.factory.updateMethodSignature(
|
|
83894
83935
|
node,
|
|
83895
83936
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83896
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83897
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83937
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83938
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83898
83939
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83899
|
-
nodesVisitor(node.parameters, visitor,
|
|
83940
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83900
83941
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83901
83942
|
);
|
|
83902
83943
|
},
|
|
@@ -83904,9 +83945,9 @@ ${lanes.join("\n")}
|
|
|
83904
83945
|
return context.factory.updateMethodDeclaration(
|
|
83905
83946
|
node,
|
|
83906
83947
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83907
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
83908
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83909
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83948
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
83949
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83950
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83910
83951
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83911
83952
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83912
83953
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -83925,7 +83966,7 @@ ${lanes.join("\n")}
|
|
|
83925
83966
|
return context.factory.updateGetAccessorDeclaration(
|
|
83926
83967
|
node,
|
|
83927
83968
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83928
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83969
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83929
83970
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83930
83971
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83931
83972
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -83935,7 +83976,7 @@ ${lanes.join("\n")}
|
|
|
83935
83976
|
return context.factory.updateSetAccessorDeclaration(
|
|
83936
83977
|
node,
|
|
83937
83978
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83938
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83979
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83939
83980
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83940
83981
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
83941
83982
|
);
|
|
@@ -83952,7 +83993,7 @@ ${lanes.join("\n")}
|
|
|
83952
83993
|
return context.factory.updateCallSignature(
|
|
83953
83994
|
node,
|
|
83954
83995
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83955
|
-
nodesVisitor(node.parameters, visitor,
|
|
83996
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83956
83997
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83957
83998
|
);
|
|
83958
83999
|
},
|
|
@@ -83960,7 +84001,7 @@ ${lanes.join("\n")}
|
|
|
83960
84001
|
return context.factory.updateConstructSignature(
|
|
83961
84002
|
node,
|
|
83962
84003
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83963
|
-
nodesVisitor(node.parameters, visitor,
|
|
84004
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83964
84005
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83965
84006
|
);
|
|
83966
84007
|
},
|
|
@@ -83968,8 +84009,8 @@ ${lanes.join("\n")}
|
|
|
83968
84009
|
return context.factory.updateIndexSignature(
|
|
83969
84010
|
node,
|
|
83970
84011
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83971
|
-
nodesVisitor(node.parameters, visitor,
|
|
83972
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84012
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84013
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83973
84014
|
);
|
|
83974
84015
|
},
|
|
83975
84016
|
// Types
|
|
@@ -83977,14 +84018,14 @@ ${lanes.join("\n")}
|
|
|
83977
84018
|
return context.factory.updateTypePredicateNode(
|
|
83978
84019
|
node,
|
|
83979
84020
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
83980
|
-
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
84021
|
+
Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
|
|
83981
84022
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83982
84023
|
);
|
|
83983
84024
|
},
|
|
83984
84025
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83985
84026
|
return context.factory.updateTypeReferenceNode(
|
|
83986
84027
|
node,
|
|
83987
|
-
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
84028
|
+
Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
|
|
83988
84029
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
83989
84030
|
);
|
|
83990
84031
|
},
|
|
@@ -83992,8 +84033,8 @@ ${lanes.join("\n")}
|
|
|
83992
84033
|
return context.factory.updateFunctionTypeNode(
|
|
83993
84034
|
node,
|
|
83994
84035
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83995
|
-
nodesVisitor(node.parameters, visitor,
|
|
83996
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84036
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84037
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83997
84038
|
);
|
|
83998
84039
|
},
|
|
83999
84040
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84001,14 +84042,14 @@ ${lanes.join("\n")}
|
|
|
84001
84042
|
node,
|
|
84002
84043
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84003
84044
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84004
|
-
nodesVisitor(node.parameters, visitor,
|
|
84005
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84045
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84046
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84006
84047
|
);
|
|
84007
84048
|
},
|
|
84008
84049
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84009
84050
|
return context.factory.updateTypeQueryNode(
|
|
84010
84051
|
node,
|
|
84011
|
-
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
84052
|
+
Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
|
|
84012
84053
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
84013
84054
|
);
|
|
84014
84055
|
},
|
|
@@ -84021,7 +84062,7 @@ ${lanes.join("\n")}
|
|
|
84021
84062
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84022
84063
|
return context.factory.updateArrayTypeNode(
|
|
84023
84064
|
node,
|
|
84024
|
-
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
84065
|
+
Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
|
|
84025
84066
|
);
|
|
84026
84067
|
},
|
|
84027
84068
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -84033,13 +84074,13 @@ ${lanes.join("\n")}
|
|
|
84033
84074
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84034
84075
|
return context.factory.updateOptionalTypeNode(
|
|
84035
84076
|
node,
|
|
84036
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84077
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84037
84078
|
);
|
|
84038
84079
|
},
|
|
84039
84080
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84040
84081
|
return context.factory.updateRestTypeNode(
|
|
84041
84082
|
node,
|
|
84042
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84083
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84043
84084
|
);
|
|
84044
84085
|
},
|
|
84045
84086
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -84057,22 +84098,22 @@ ${lanes.join("\n")}
|
|
|
84057
84098
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84058
84099
|
return context.factory.updateConditionalTypeNode(
|
|
84059
84100
|
node,
|
|
84060
|
-
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
84061
|
-
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
84062
|
-
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
84063
|
-
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
84101
|
+
Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
|
|
84102
|
+
Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
|
|
84103
|
+
Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
|
|
84104
|
+
Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
|
|
84064
84105
|
);
|
|
84065
84106
|
},
|
|
84066
84107
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84067
84108
|
return context.factory.updateInferTypeNode(
|
|
84068
84109
|
node,
|
|
84069
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
84110
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
|
|
84070
84111
|
);
|
|
84071
84112
|
},
|
|
84072
84113
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84073
84114
|
return context.factory.updateImportTypeNode(
|
|
84074
84115
|
node,
|
|
84075
|
-
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
84116
|
+
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
84076
84117
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
84077
84118
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
84078
84119
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -84082,45 +84123,45 @@ ${lanes.join("\n")}
|
|
|
84082
84123
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84083
84124
|
return context.factory.updateImportTypeAssertionContainer(
|
|
84084
84125
|
node,
|
|
84085
|
-
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
84126
|
+
Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
|
|
84086
84127
|
node.multiLine
|
|
84087
84128
|
);
|
|
84088
84129
|
},
|
|
84089
84130
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84090
84131
|
return context.factory.updateNamedTupleMember(
|
|
84091
84132
|
node,
|
|
84092
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
84093
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84094
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
84095
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84133
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
84134
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84135
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
84136
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84096
84137
|
);
|
|
84097
84138
|
},
|
|
84098
84139
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84099
84140
|
return context.factory.updateParenthesizedType(
|
|
84100
84141
|
node,
|
|
84101
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84142
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84102
84143
|
);
|
|
84103
84144
|
},
|
|
84104
84145
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84105
84146
|
return context.factory.updateTypeOperatorNode(
|
|
84106
84147
|
node,
|
|
84107
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84148
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84108
84149
|
);
|
|
84109
84150
|
},
|
|
84110
84151
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84111
84152
|
return context.factory.updateIndexedAccessTypeNode(
|
|
84112
84153
|
node,
|
|
84113
|
-
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
84114
|
-
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
84154
|
+
Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
|
|
84155
|
+
Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
|
|
84115
84156
|
);
|
|
84116
84157
|
},
|
|
84117
84158
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84118
84159
|
return context.factory.updateMappedTypeNode(
|
|
84119
84160
|
node,
|
|
84120
|
-
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
84121
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
84161
|
+
tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
|
|
84162
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
|
|
84122
84163
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
84123
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
84164
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
|
|
84124
84165
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84125
84166
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
84126
84167
|
);
|
|
@@ -84128,21 +84169,21 @@ ${lanes.join("\n")}
|
|
|
84128
84169
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84129
84170
|
return context.factory.updateLiteralTypeNode(
|
|
84130
84171
|
node,
|
|
84131
|
-
nodeVisitor(node.literal, visitor,
|
|
84172
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
|
|
84132
84173
|
);
|
|
84133
84174
|
},
|
|
84134
84175
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84135
84176
|
return context.factory.updateTemplateLiteralType(
|
|
84136
84177
|
node,
|
|
84137
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
84178
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
84138
84179
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
84139
84180
|
);
|
|
84140
84181
|
},
|
|
84141
84182
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84142
84183
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
84143
84184
|
node,
|
|
84144
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84145
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
84185
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
84186
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
84146
84187
|
);
|
|
84147
84188
|
},
|
|
84148
84189
|
// Binding patterns
|
|
@@ -84161,9 +84202,9 @@ ${lanes.join("\n")}
|
|
|
84161
84202
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84162
84203
|
return context.factory.updateBindingElement(
|
|
84163
84204
|
node,
|
|
84164
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
84205
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
84165
84206
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
84166
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
84207
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
84167
84208
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84168
84209
|
);
|
|
84169
84210
|
},
|
|
@@ -84183,37 +84224,37 @@ ${lanes.join("\n")}
|
|
|
84183
84224
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84184
84225
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
84185
84226
|
node,
|
|
84186
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84187
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84188
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
84227
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84228
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84229
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
84189
84230
|
) : context.factory.updatePropertyAccessExpression(
|
|
84190
84231
|
node,
|
|
84191
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84192
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
84232
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84233
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
84193
84234
|
);
|
|
84194
84235
|
},
|
|
84195
84236
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84196
84237
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
84197
84238
|
node,
|
|
84198
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84199
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84200
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
84239
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84240
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84241
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
84201
84242
|
) : context.factory.updateElementAccessExpression(
|
|
84202
84243
|
node,
|
|
84203
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84204
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
84244
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84245
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
84205
84246
|
);
|
|
84206
84247
|
},
|
|
84207
84248
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84208
84249
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
84209
84250
|
node,
|
|
84210
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84211
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84251
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84252
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84212
84253
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84213
84254
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84214
84255
|
) : context.factory.updateCallExpression(
|
|
84215
84256
|
node,
|
|
84216
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84257
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84217
84258
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84218
84259
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84219
84260
|
);
|
|
@@ -84221,7 +84262,7 @@ ${lanes.join("\n")}
|
|
|
84221
84262
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84222
84263
|
return context.factory.updateNewExpression(
|
|
84223
84264
|
node,
|
|
84224
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84265
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84225
84266
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84226
84267
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84227
84268
|
);
|
|
@@ -84229,29 +84270,29 @@ ${lanes.join("\n")}
|
|
|
84229
84270
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84230
84271
|
return context.factory.updateTaggedTemplateExpression(
|
|
84231
84272
|
node,
|
|
84232
|
-
nodeVisitor(node.tag, visitor, isExpression),
|
|
84273
|
+
Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
|
|
84233
84274
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84234
|
-
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
84275
|
+
Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
|
|
84235
84276
|
);
|
|
84236
84277
|
},
|
|
84237
84278
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84238
84279
|
return context.factory.updateTypeAssertion(
|
|
84239
84280
|
node,
|
|
84240
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84241
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84281
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
84282
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84242
84283
|
);
|
|
84243
84284
|
},
|
|
84244
84285
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84245
84286
|
return context.factory.updateParenthesizedExpression(
|
|
84246
84287
|
node,
|
|
84247
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84288
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84248
84289
|
);
|
|
84249
84290
|
},
|
|
84250
84291
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84251
84292
|
return context.factory.updateFunctionExpression(
|
|
84252
84293
|
node,
|
|
84253
84294
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84254
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84295
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84255
84296
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84256
84297
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84257
84298
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -84266,82 +84307,82 @@ ${lanes.join("\n")}
|
|
|
84266
84307
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84267
84308
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
84268
84309
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84269
|
-
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
84310
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
|
|
84270
84311
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
84271
84312
|
);
|
|
84272
84313
|
},
|
|
84273
84314
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84274
84315
|
return context.factory.updateDeleteExpression(
|
|
84275
84316
|
node,
|
|
84276
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84317
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84277
84318
|
);
|
|
84278
84319
|
},
|
|
84279
84320
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84280
84321
|
return context.factory.updateTypeOfExpression(
|
|
84281
84322
|
node,
|
|
84282
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84323
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84283
84324
|
);
|
|
84284
84325
|
},
|
|
84285
84326
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84286
84327
|
return context.factory.updateVoidExpression(
|
|
84287
84328
|
node,
|
|
84288
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84329
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84289
84330
|
);
|
|
84290
84331
|
},
|
|
84291
84332
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84292
84333
|
return context.factory.updateAwaitExpression(
|
|
84293
84334
|
node,
|
|
84294
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84335
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84295
84336
|
);
|
|
84296
84337
|
},
|
|
84297
84338
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84298
84339
|
return context.factory.updatePrefixUnaryExpression(
|
|
84299
84340
|
node,
|
|
84300
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
84341
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
84301
84342
|
);
|
|
84302
84343
|
},
|
|
84303
84344
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84304
84345
|
return context.factory.updatePostfixUnaryExpression(
|
|
84305
84346
|
node,
|
|
84306
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
84347
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
84307
84348
|
);
|
|
84308
84349
|
},
|
|
84309
84350
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84310
84351
|
return context.factory.updateBinaryExpression(
|
|
84311
84352
|
node,
|
|
84312
|
-
nodeVisitor(node.left, visitor, isExpression),
|
|
84313
|
-
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
84314
|
-
nodeVisitor(node.right, visitor, isExpression)
|
|
84353
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
|
|
84354
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
|
|
84355
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
|
|
84315
84356
|
);
|
|
84316
84357
|
},
|
|
84317
84358
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84318
84359
|
return context.factory.updateConditionalExpression(
|
|
84319
84360
|
node,
|
|
84320
|
-
nodeVisitor(node.condition, visitor, isExpression),
|
|
84321
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
84322
|
-
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
84323
|
-
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
84324
|
-
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
84361
|
+
Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
|
|
84362
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
|
|
84363
|
+
Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
|
|
84364
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
|
|
84365
|
+
Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
|
|
84325
84366
|
);
|
|
84326
84367
|
},
|
|
84327
84368
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84328
84369
|
return context.factory.updateTemplateExpression(
|
|
84329
84370
|
node,
|
|
84330
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
84371
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
84331
84372
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
84332
84373
|
);
|
|
84333
84374
|
},
|
|
84334
84375
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84335
84376
|
return context.factory.updateYieldExpression(
|
|
84336
84377
|
node,
|
|
84337
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84378
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84338
84379
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
84339
84380
|
);
|
|
84340
84381
|
},
|
|
84341
84382
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84342
84383
|
return context.factory.updateSpreadElement(
|
|
84343
84384
|
node,
|
|
84344
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84385
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84345
84386
|
);
|
|
84346
84387
|
},
|
|
84347
84388
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84357,45 +84398,45 @@ ${lanes.join("\n")}
|
|
|
84357
84398
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84358
84399
|
return context.factory.updateExpressionWithTypeArguments(
|
|
84359
84400
|
node,
|
|
84360
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84401
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84361
84402
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
84362
84403
|
);
|
|
84363
84404
|
},
|
|
84364
84405
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84365
84406
|
return context.factory.updateAsExpression(
|
|
84366
84407
|
node,
|
|
84367
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84368
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84408
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84409
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84369
84410
|
);
|
|
84370
84411
|
},
|
|
84371
84412
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84372
84413
|
return context.factory.updateSatisfiesExpression(
|
|
84373
84414
|
node,
|
|
84374
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84375
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84415
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84416
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84376
84417
|
);
|
|
84377
84418
|
},
|
|
84378
84419
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84379
84420
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
84380
84421
|
node,
|
|
84381
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84422
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84382
84423
|
) : context.factory.updateNonNullExpression(
|
|
84383
84424
|
node,
|
|
84384
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84425
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84385
84426
|
);
|
|
84386
84427
|
},
|
|
84387
84428
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84388
84429
|
return context.factory.updateMetaProperty(
|
|
84389
84430
|
node,
|
|
84390
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84431
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84391
84432
|
);
|
|
84392
84433
|
},
|
|
84393
84434
|
// Misc
|
|
84394
84435
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84395
84436
|
return context.factory.updateTemplateSpan(
|
|
84396
84437
|
node,
|
|
84397
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84398
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
84438
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84439
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
84399
84440
|
);
|
|
84400
84441
|
},
|
|
84401
84442
|
// Element
|
|
@@ -84409,20 +84450,20 @@ ${lanes.join("\n")}
|
|
|
84409
84450
|
return context.factory.updateVariableStatement(
|
|
84410
84451
|
node,
|
|
84411
84452
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84412
|
-
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
84453
|
+
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
84413
84454
|
);
|
|
84414
84455
|
},
|
|
84415
84456
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84416
84457
|
return context.factory.updateExpressionStatement(
|
|
84417
84458
|
node,
|
|
84418
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84459
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84419
84460
|
);
|
|
84420
84461
|
},
|
|
84421
84462
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84422
84463
|
return context.factory.updateIfStatement(
|
|
84423
84464
|
node,
|
|
84424
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84425
|
-
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
84465
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84466
|
+
Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
|
|
84426
84467
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
84427
84468
|
);
|
|
84428
84469
|
},
|
|
@@ -84430,13 +84471,13 @@ ${lanes.join("\n")}
|
|
|
84430
84471
|
return context.factory.updateDoStatement(
|
|
84431
84472
|
node,
|
|
84432
84473
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
84433
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84474
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84434
84475
|
);
|
|
84435
84476
|
},
|
|
84436
84477
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84437
84478
|
return context.factory.updateWhileStatement(
|
|
84438
84479
|
node,
|
|
84439
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84480
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84440
84481
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84441
84482
|
);
|
|
84442
84483
|
},
|
|
@@ -84452,17 +84493,17 @@ ${lanes.join("\n")}
|
|
|
84452
84493
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84453
84494
|
return context.factory.updateForInStatement(
|
|
84454
84495
|
node,
|
|
84455
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
84456
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84496
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
84497
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84457
84498
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84458
84499
|
);
|
|
84459
84500
|
},
|
|
84460
84501
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84461
84502
|
return context.factory.updateForOfStatement(
|
|
84462
84503
|
node,
|
|
84463
|
-
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
84464
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
84465
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84504
|
+
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
|
84505
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
84506
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84466
84507
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84467
84508
|
);
|
|
84468
84509
|
},
|
|
@@ -84487,34 +84528,34 @@ ${lanes.join("\n")}
|
|
|
84487
84528
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84488
84529
|
return context.factory.updateWithStatement(
|
|
84489
84530
|
node,
|
|
84490
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84491
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
84531
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84532
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
84492
84533
|
);
|
|
84493
84534
|
},
|
|
84494
84535
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84495
84536
|
return context.factory.updateSwitchStatement(
|
|
84496
84537
|
node,
|
|
84497
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84498
|
-
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
84538
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84539
|
+
Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
|
|
84499
84540
|
);
|
|
84500
84541
|
},
|
|
84501
84542
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84502
84543
|
return context.factory.updateLabeledStatement(
|
|
84503
84544
|
node,
|
|
84504
|
-
nodeVisitor(node.label, visitor, isIdentifier),
|
|
84505
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
84545
|
+
Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
|
|
84546
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
84506
84547
|
);
|
|
84507
84548
|
},
|
|
84508
84549
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84509
84550
|
return context.factory.updateThrowStatement(
|
|
84510
84551
|
node,
|
|
84511
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84552
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84512
84553
|
);
|
|
84513
84554
|
},
|
|
84514
84555
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84515
84556
|
return context.factory.updateTryStatement(
|
|
84516
84557
|
node,
|
|
84517
|
-
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
84558
|
+
Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
|
|
84518
84559
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
84519
84560
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
84520
84561
|
);
|
|
@@ -84522,8 +84563,8 @@ ${lanes.join("\n")}
|
|
|
84522
84563
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84523
84564
|
return context.factory.updateVariableDeclaration(
|
|
84524
84565
|
node,
|
|
84525
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
84526
|
-
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
84566
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
84567
|
+
tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
|
|
84527
84568
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84528
84569
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84529
84570
|
);
|
|
@@ -84538,7 +84579,7 @@ ${lanes.join("\n")}
|
|
|
84538
84579
|
return context.factory.updateFunctionDeclaration(
|
|
84539
84580
|
node,
|
|
84540
84581
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84541
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84582
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84542
84583
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84543
84584
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84544
84585
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -84560,7 +84601,7 @@ ${lanes.join("\n")}
|
|
|
84560
84601
|
return context.factory.updateInterfaceDeclaration(
|
|
84561
84602
|
node,
|
|
84562
84603
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84563
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84604
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84564
84605
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84565
84606
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
84566
84607
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -84570,16 +84611,16 @@ ${lanes.join("\n")}
|
|
|
84570
84611
|
return context.factory.updateTypeAliasDeclaration(
|
|
84571
84612
|
node,
|
|
84572
84613
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84573
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84614
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84574
84615
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84575
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84616
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84576
84617
|
);
|
|
84577
84618
|
},
|
|
84578
84619
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84579
84620
|
return context.factory.updateEnumDeclaration(
|
|
84580
84621
|
node,
|
|
84581
84622
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84582
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84623
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84583
84624
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
84584
84625
|
);
|
|
84585
84626
|
},
|
|
@@ -84587,7 +84628,7 @@ ${lanes.join("\n")}
|
|
|
84587
84628
|
return context.factory.updateModuleDeclaration(
|
|
84588
84629
|
node,
|
|
84589
84630
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84590
|
-
nodeVisitor(node.name, visitor, isModuleName),
|
|
84631
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
84591
84632
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
84592
84633
|
);
|
|
84593
84634
|
},
|
|
@@ -84606,7 +84647,7 @@ ${lanes.join("\n")}
|
|
|
84606
84647
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84607
84648
|
return context.factory.updateNamespaceExportDeclaration(
|
|
84608
84649
|
node,
|
|
84609
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84650
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84610
84651
|
);
|
|
84611
84652
|
},
|
|
84612
84653
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84614,8 +84655,8 @@ ${lanes.join("\n")}
|
|
|
84614
84655
|
node,
|
|
84615
84656
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84616
84657
|
node.isTypeOnly,
|
|
84617
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84618
|
-
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
84658
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84659
|
+
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
84619
84660
|
);
|
|
84620
84661
|
},
|
|
84621
84662
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84623,7 +84664,7 @@ ${lanes.join("\n")}
|
|
|
84623
84664
|
node,
|
|
84624
84665
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84625
84666
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
84626
|
-
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
84667
|
+
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
84627
84668
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
84628
84669
|
);
|
|
84629
84670
|
},
|
|
@@ -84637,8 +84678,8 @@ ${lanes.join("\n")}
|
|
|
84637
84678
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84638
84679
|
return context.factory.updateAssertEntry(
|
|
84639
84680
|
node,
|
|
84640
|
-
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
84641
|
-
nodeVisitor(node.value, visitor, isExpression)
|
|
84681
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
|
|
84682
|
+
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
84642
84683
|
);
|
|
84643
84684
|
},
|
|
84644
84685
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84652,13 +84693,13 @@ ${lanes.join("\n")}
|
|
|
84652
84693
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84653
84694
|
return context.factory.updateNamespaceImport(
|
|
84654
84695
|
node,
|
|
84655
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84696
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84656
84697
|
);
|
|
84657
84698
|
},
|
|
84658
84699
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84659
84700
|
return context.factory.updateNamespaceExport(
|
|
84660
84701
|
node,
|
|
84661
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84702
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84662
84703
|
);
|
|
84663
84704
|
},
|
|
84664
84705
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -84672,14 +84713,14 @@ ${lanes.join("\n")}
|
|
|
84672
84713
|
node,
|
|
84673
84714
|
node.isTypeOnly,
|
|
84674
84715
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
84675
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84716
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84676
84717
|
);
|
|
84677
84718
|
},
|
|
84678
84719
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84679
84720
|
return context.factory.updateExportAssignment(
|
|
84680
84721
|
node,
|
|
84681
84722
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84682
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84723
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84683
84724
|
);
|
|
84684
84725
|
},
|
|
84685
84726
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84703,59 +84744,59 @@ ${lanes.join("\n")}
|
|
|
84703
84744
|
node,
|
|
84704
84745
|
node.isTypeOnly,
|
|
84705
84746
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
84706
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84747
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84707
84748
|
);
|
|
84708
84749
|
},
|
|
84709
84750
|
// Module references
|
|
84710
84751
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84711
84752
|
return context.factory.updateExternalModuleReference(
|
|
84712
84753
|
node,
|
|
84713
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84754
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84714
84755
|
);
|
|
84715
84756
|
},
|
|
84716
84757
|
// JSX
|
|
84717
84758
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84718
84759
|
return context.factory.updateJsxElement(
|
|
84719
84760
|
node,
|
|
84720
|
-
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
84761
|
+
Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
|
|
84721
84762
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
84722
|
-
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
84763
|
+
Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
|
|
84723
84764
|
);
|
|
84724
84765
|
},
|
|
84725
84766
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84726
84767
|
return context.factory.updateJsxSelfClosingElement(
|
|
84727
84768
|
node,
|
|
84728
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
84769
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84729
84770
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84730
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
84771
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
84731
84772
|
);
|
|
84732
84773
|
},
|
|
84733
84774
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84734
84775
|
return context.factory.updateJsxOpeningElement(
|
|
84735
84776
|
node,
|
|
84736
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
84777
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84737
84778
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84738
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
84779
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
84739
84780
|
);
|
|
84740
84781
|
},
|
|
84741
84782
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84742
84783
|
return context.factory.updateJsxClosingElement(
|
|
84743
84784
|
node,
|
|
84744
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
84785
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
|
|
84745
84786
|
);
|
|
84746
84787
|
},
|
|
84747
84788
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84748
84789
|
return context.factory.updateJsxFragment(
|
|
84749
84790
|
node,
|
|
84750
|
-
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
84791
|
+
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
|
84751
84792
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
84752
|
-
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
84793
|
+
Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
|
|
84753
84794
|
);
|
|
84754
84795
|
},
|
|
84755
84796
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84756
84797
|
return context.factory.updateJsxAttribute(
|
|
84757
84798
|
node,
|
|
84758
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84799
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84759
84800
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
84760
84801
|
);
|
|
84761
84802
|
},
|
|
@@ -84768,20 +84809,20 @@ ${lanes.join("\n")}
|
|
|
84768
84809
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84769
84810
|
return context.factory.updateJsxSpreadAttribute(
|
|
84770
84811
|
node,
|
|
84771
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84812
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84772
84813
|
);
|
|
84773
84814
|
},
|
|
84774
84815
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84775
84816
|
return context.factory.updateJsxExpression(
|
|
84776
84817
|
node,
|
|
84777
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84818
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84778
84819
|
);
|
|
84779
84820
|
},
|
|
84780
84821
|
// Clauses
|
|
84781
84822
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84782
84823
|
return context.factory.updateCaseClause(
|
|
84783
84824
|
node,
|
|
84784
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84825
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84785
84826
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
84786
84827
|
);
|
|
84787
84828
|
},
|
|
@@ -84801,35 +84842,35 @@ ${lanes.join("\n")}
|
|
|
84801
84842
|
return context.factory.updateCatchClause(
|
|
84802
84843
|
node,
|
|
84803
84844
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
84804
|
-
nodeVisitor(node.block, visitor, isBlock)
|
|
84845
|
+
Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
|
|
84805
84846
|
);
|
|
84806
84847
|
},
|
|
84807
84848
|
// Property assignments
|
|
84808
84849
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84809
84850
|
return context.factory.updatePropertyAssignment(
|
|
84810
84851
|
node,
|
|
84811
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
84812
|
-
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84852
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
84853
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
|
|
84813
84854
|
);
|
|
84814
84855
|
},
|
|
84815
84856
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84816
84857
|
return context.factory.updateShorthandPropertyAssignment(
|
|
84817
84858
|
node,
|
|
84818
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84859
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84819
84860
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
84820
84861
|
);
|
|
84821
84862
|
},
|
|
84822
84863
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84823
84864
|
return context.factory.updateSpreadAssignment(
|
|
84824
84865
|
node,
|
|
84825
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84866
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84826
84867
|
);
|
|
84827
84868
|
},
|
|
84828
84869
|
// Enum
|
|
84829
84870
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84830
84871
|
return context.factory.updateEnumMember(
|
|
84831
84872
|
node,
|
|
84832
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
84873
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
84833
84874
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84834
84875
|
);
|
|
84835
84876
|
},
|
|
@@ -84844,7 +84885,7 @@ ${lanes.join("\n")}
|
|
|
84844
84885
|
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84845
84886
|
return context.factory.updatePartiallyEmittedExpression(
|
|
84846
84887
|
node,
|
|
84847
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84888
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84848
84889
|
);
|
|
84849
84890
|
},
|
|
84850
84891
|
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -85803,7 +85844,7 @@ ${lanes.join("\n")}
|
|
|
85803
85844
|
location = node = value;
|
|
85804
85845
|
value = node.right;
|
|
85805
85846
|
} else {
|
|
85806
|
-
return visitNode(value, visitor, isExpression);
|
|
85847
|
+
return Debug.checkDefined(visitNode(value, visitor, isExpression));
|
|
85807
85848
|
}
|
|
85808
85849
|
}
|
|
85809
85850
|
}
|
|
@@ -85822,6 +85863,7 @@ ${lanes.join("\n")}
|
|
|
85822
85863
|
};
|
|
85823
85864
|
if (value) {
|
|
85824
85865
|
value = visitNode(value, visitor, isExpression);
|
|
85866
|
+
Debug.assert(value);
|
|
85825
85867
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
85826
85868
|
value = ensureIdentifier(
|
|
85827
85869
|
flattenContext,
|
|
@@ -85863,7 +85905,7 @@ ${lanes.join("\n")}
|
|
|
85863
85905
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
85864
85906
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
85865
85907
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
85866
|
-
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
85908
|
+
context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
|
|
85867
85909
|
location2
|
|
85868
85910
|
);
|
|
85869
85911
|
expression.original = original;
|
|
@@ -85920,7 +85962,7 @@ ${lanes.join("\n")}
|
|
|
85920
85962
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
85921
85963
|
initializer = ensureIdentifier(
|
|
85922
85964
|
flattenContext,
|
|
85923
|
-
visitNode(initializer, flattenContext.visitor),
|
|
85965
|
+
Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
|
|
85924
85966
|
/*reuseIdentifierExpressions*/
|
|
85925
85967
|
false,
|
|
85926
85968
|
initializer
|
|
@@ -86041,7 +86083,7 @@ ${lanes.join("\n")}
|
|
|
86041
86083
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
86042
86084
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
86043
86085
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
86044
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
86086
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
|
|
86045
86087
|
} else {
|
|
86046
86088
|
if (bindingElements) {
|
|
86047
86089
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -86179,7 +86221,7 @@ ${lanes.join("\n")}
|
|
|
86179
86221
|
if (isComputedPropertyName(propertyName)) {
|
|
86180
86222
|
const argumentExpression = ensureIdentifier(
|
|
86181
86223
|
flattenContext,
|
|
86182
|
-
visitNode(propertyName.expression, flattenContext.visitor),
|
|
86224
|
+
Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
|
|
86183
86225
|
/*reuseIdentifierExpressions*/
|
|
86184
86226
|
false,
|
|
86185
86227
|
/*location*/
|
|
@@ -86222,6 +86264,7 @@ ${lanes.join("\n")}
|
|
|
86222
86264
|
return factory2.createArrayBindingPattern(elements);
|
|
86223
86265
|
}
|
|
86224
86266
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
86267
|
+
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
86225
86268
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
86226
86269
|
}
|
|
86227
86270
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -86229,6 +86272,7 @@ ${lanes.join("\n")}
|
|
|
86229
86272
|
return factory2.createObjectBindingPattern(elements);
|
|
86230
86273
|
}
|
|
86231
86274
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
86275
|
+
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
86232
86276
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
86233
86277
|
}
|
|
86234
86278
|
function makeBindingElement(factory2, name) {
|
|
@@ -86259,6 +86303,7 @@ ${lanes.join("\n")}
|
|
|
86259
86303
|
// src/compiler/transformers/taggedTemplate.ts
|
|
86260
86304
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
86261
86305
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
86306
|
+
Debug.assert(tag);
|
|
86262
86307
|
const templateArguments = [void 0];
|
|
86263
86308
|
const cookedStrings = [];
|
|
86264
86309
|
const rawStrings = [];
|
|
@@ -86275,7 +86320,7 @@ ${lanes.join("\n")}
|
|
|
86275
86320
|
for (const templateSpan of template.templateSpans) {
|
|
86276
86321
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
86277
86322
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
86278
|
-
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
86323
|
+
templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
|
|
86279
86324
|
}
|
|
86280
86325
|
}
|
|
86281
86326
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -86659,7 +86704,7 @@ ${lanes.join("\n")}
|
|
|
86659
86704
|
function visitObjectLiteralExpression(node) {
|
|
86660
86705
|
return factory2.updateObjectLiteralExpression(
|
|
86661
86706
|
node,
|
|
86662
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
86707
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
|
|
86663
86708
|
);
|
|
86664
86709
|
}
|
|
86665
86710
|
function getClassFacts(node, staticProperties) {
|
|
@@ -86857,6 +86902,7 @@ ${lanes.join("\n")}
|
|
|
86857
86902
|
const decorators = [];
|
|
86858
86903
|
for (const parameterDecorator of parameterDecorators) {
|
|
86859
86904
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
86905
|
+
Debug.assert(expression);
|
|
86860
86906
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
86861
86907
|
setTextRange(helper, parameterDecorator.expression);
|
|
86862
86908
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -86980,6 +87026,7 @@ ${lanes.join("\n")}
|
|
|
86980
87026
|
const name = member.name;
|
|
86981
87027
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
86982
87028
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
87029
|
+
Debug.assert(expression);
|
|
86983
87030
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
86984
87031
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
86985
87032
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -86987,7 +87034,7 @@ ${lanes.join("\n")}
|
|
|
86987
87034
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
86988
87035
|
}
|
|
86989
87036
|
}
|
|
86990
|
-
return visitNode(name, visitor, isPropertyName);
|
|
87037
|
+
return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
|
|
86991
87038
|
}
|
|
86992
87039
|
function visitHeritageClause(node) {
|
|
86993
87040
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -86998,7 +87045,7 @@ ${lanes.join("\n")}
|
|
|
86998
87045
|
function visitExpressionWithTypeArguments(node) {
|
|
86999
87046
|
return factory2.updateExpressionWithTypeArguments(
|
|
87000
87047
|
node,
|
|
87001
|
-
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
87048
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
87002
87049
|
/*typeArguments*/
|
|
87003
87050
|
void 0
|
|
87004
87051
|
);
|
|
@@ -87017,7 +87064,7 @@ ${lanes.join("\n")}
|
|
|
87017
87064
|
return factory2.updatePropertyDeclaration(
|
|
87018
87065
|
node,
|
|
87019
87066
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
87020
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87067
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87021
87068
|
/*questionOrExclamationToken*/
|
|
87022
87069
|
void 0,
|
|
87023
87070
|
/*type*/
|
|
@@ -87034,7 +87081,7 @@ ${lanes.join("\n")}
|
|
|
87034
87081
|
void 0,
|
|
87035
87082
|
/*type*/
|
|
87036
87083
|
void 0,
|
|
87037
|
-
visitNode(node.initializer, visitor)
|
|
87084
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
87038
87085
|
);
|
|
87039
87086
|
}
|
|
87040
87087
|
function visitConstructor(node) {
|
|
@@ -87253,7 +87300,7 @@ ${lanes.join("\n")}
|
|
|
87253
87300
|
elideNodes(factory2, node.modifiers),
|
|
87254
87301
|
// preserve positions, if available
|
|
87255
87302
|
node.dotDotDotToken,
|
|
87256
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87303
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87257
87304
|
/*questionToken*/
|
|
87258
87305
|
void 0,
|
|
87259
87306
|
/*type*/
|
|
@@ -87302,7 +87349,7 @@ ${lanes.join("\n")}
|
|
|
87302
87349
|
return setTextRange(
|
|
87303
87350
|
factory2.createAssignment(
|
|
87304
87351
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
87305
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
87352
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
87306
87353
|
),
|
|
87307
87354
|
/*location*/
|
|
87308
87355
|
node
|
|
@@ -87312,7 +87359,7 @@ ${lanes.join("\n")}
|
|
|
87312
87359
|
function visitVariableDeclaration(node) {
|
|
87313
87360
|
const updated = factory2.updateVariableDeclaration(
|
|
87314
87361
|
node,
|
|
87315
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87362
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87316
87363
|
/*exclamationToken*/
|
|
87317
87364
|
void 0,
|
|
87318
87365
|
/*type*/
|
|
@@ -87328,26 +87375,30 @@ ${lanes.join("\n")}
|
|
|
87328
87375
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
87329
87376
|
if (isAssertionExpression(innerExpression)) {
|
|
87330
87377
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87378
|
+
Debug.assert(expression);
|
|
87331
87379
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87332
87380
|
}
|
|
87333
87381
|
return visitEachChild(node, visitor, context);
|
|
87334
87382
|
}
|
|
87335
87383
|
function visitAssertionExpression(node) {
|
|
87336
87384
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87385
|
+
Debug.assert(expression);
|
|
87337
87386
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87338
87387
|
}
|
|
87339
87388
|
function visitNonNullExpression(node) {
|
|
87340
87389
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
87390
|
+
Debug.assert(expression);
|
|
87341
87391
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87342
87392
|
}
|
|
87343
87393
|
function visitSatisfiesExpression(node) {
|
|
87344
87394
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87395
|
+
Debug.assert(expression);
|
|
87345
87396
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87346
87397
|
}
|
|
87347
87398
|
function visitCallExpression(node) {
|
|
87348
87399
|
return factory2.updateCallExpression(
|
|
87349
87400
|
node,
|
|
87350
|
-
visitNode(node.expression, visitor, isExpression),
|
|
87401
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
87351
87402
|
/*typeArguments*/
|
|
87352
87403
|
void 0,
|
|
87353
87404
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -87356,7 +87407,7 @@ ${lanes.join("\n")}
|
|
|
87356
87407
|
function visitNewExpression(node) {
|
|
87357
87408
|
return factory2.updateNewExpression(
|
|
87358
87409
|
node,
|
|
87359
|
-
visitNode(node.expression, visitor, isExpression),
|
|
87410
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
87360
87411
|
/*typeArguments*/
|
|
87361
87412
|
void 0,
|
|
87362
87413
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -87365,28 +87416,28 @@ ${lanes.join("\n")}
|
|
|
87365
87416
|
function visitTaggedTemplateExpression(node) {
|
|
87366
87417
|
return factory2.updateTaggedTemplateExpression(
|
|
87367
87418
|
node,
|
|
87368
|
-
visitNode(node.tag, visitor, isExpression),
|
|
87419
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
87369
87420
|
/*typeArguments*/
|
|
87370
87421
|
void 0,
|
|
87371
|
-
visitNode(node.template, visitor,
|
|
87422
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
87372
87423
|
);
|
|
87373
87424
|
}
|
|
87374
87425
|
function visitJsxSelfClosingElement(node) {
|
|
87375
87426
|
return factory2.updateJsxSelfClosingElement(
|
|
87376
87427
|
node,
|
|
87377
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
87428
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87378
87429
|
/*typeArguments*/
|
|
87379
87430
|
void 0,
|
|
87380
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
87431
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
87381
87432
|
);
|
|
87382
87433
|
}
|
|
87383
87434
|
function visitJsxJsxOpeningElement(node) {
|
|
87384
87435
|
return factory2.updateJsxOpeningElement(
|
|
87385
87436
|
node,
|
|
87386
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
87437
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87387
87438
|
/*typeArguments*/
|
|
87388
87439
|
void 0,
|
|
87389
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
87440
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
87390
87441
|
);
|
|
87391
87442
|
}
|
|
87392
87443
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -87532,7 +87583,7 @@ ${lanes.join("\n")}
|
|
|
87532
87583
|
} else {
|
|
87533
87584
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
87534
87585
|
if (member.initializer) {
|
|
87535
|
-
return visitNode(member.initializer, visitor, isExpression);
|
|
87586
|
+
return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
|
|
87536
87587
|
} else {
|
|
87537
87588
|
return factory2.createVoidZero();
|
|
87538
87589
|
}
|
|
@@ -87813,7 +87864,7 @@ ${lanes.join("\n")}
|
|
|
87813
87864
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
87814
87865
|
}
|
|
87815
87866
|
function visitNamespaceExports(node) {
|
|
87816
|
-
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
87867
|
+
return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
|
|
87817
87868
|
}
|
|
87818
87869
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
87819
87870
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -88293,6 +88344,7 @@ ${lanes.join("\n")}
|
|
|
88293
88344
|
const info = accessPrivateIdentifier(node.left);
|
|
88294
88345
|
if (info) {
|
|
88295
88346
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
88347
|
+
Debug.assert(receiver);
|
|
88296
88348
|
return setOriginalNode(
|
|
88297
88349
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
88298
88350
|
node
|
|
@@ -88310,6 +88362,7 @@ ${lanes.join("\n")}
|
|
|
88310
88362
|
}
|
|
88311
88363
|
function visitComputedPropertyName(node) {
|
|
88312
88364
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
88365
|
+
Debug.assert(expression);
|
|
88313
88366
|
if (some(pendingExpressions)) {
|
|
88314
88367
|
if (isParenthesizedExpression(expression)) {
|
|
88315
88368
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -88391,6 +88444,7 @@ ${lanes.join("\n")}
|
|
|
88391
88444
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
88392
88445
|
setSourceMapRange(temp, name.expression);
|
|
88393
88446
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
88447
|
+
Debug.assert(expression);
|
|
88394
88448
|
const assignment = factory2.createAssignment(temp, expression);
|
|
88395
88449
|
setSourceMapRange(assignment, name.expression);
|
|
88396
88450
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -88473,7 +88527,7 @@ ${lanes.join("\n")}
|
|
|
88473
88527
|
return transformFieldInitializer(node);
|
|
88474
88528
|
}
|
|
88475
88529
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
88476
|
-
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
88530
|
+
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
|
|
88477
88531
|
}
|
|
88478
88532
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
88479
88533
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -88543,7 +88597,7 @@ ${lanes.join("\n")}
|
|
|
88543
88597
|
if (classConstructor && superClassReference) {
|
|
88544
88598
|
const superProperty = factory2.createReflectGetCall(
|
|
88545
88599
|
superClassReference,
|
|
88546
|
-
visitNode(node.argumentExpression, visitor, isExpression),
|
|
88600
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
|
|
88547
88601
|
classConstructor
|
|
88548
88602
|
);
|
|
88549
88603
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -88560,6 +88614,7 @@ ${lanes.join("\n")}
|
|
|
88560
88614
|
let info;
|
|
88561
88615
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
88562
88616
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
88617
|
+
Debug.assert(receiver);
|
|
88563
88618
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
88564
88619
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
88565
88620
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -88596,7 +88651,7 @@ ${lanes.join("\n")}
|
|
|
88596
88651
|
getterName = setterName = operand.argumentExpression;
|
|
88597
88652
|
} else {
|
|
88598
88653
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
88599
|
-
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
88654
|
+
setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
|
|
88600
88655
|
}
|
|
88601
88656
|
}
|
|
88602
88657
|
if (setterName && getterName) {
|
|
@@ -88630,7 +88685,7 @@ ${lanes.join("\n")}
|
|
|
88630
88685
|
function visitExpressionStatement(node) {
|
|
88631
88686
|
return factory2.updateExpressionStatement(
|
|
88632
88687
|
node,
|
|
88633
|
-
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
88688
|
+
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
|
|
88634
88689
|
);
|
|
88635
88690
|
}
|
|
88636
88691
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -88648,25 +88703,25 @@ ${lanes.join("\n")}
|
|
|
88648
88703
|
if (isCallChain(node)) {
|
|
88649
88704
|
return factory2.updateCallChain(
|
|
88650
88705
|
node,
|
|
88651
|
-
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
88706
|
+
factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
|
|
88652
88707
|
/*questionDotToken*/
|
|
88653
88708
|
void 0,
|
|
88654
88709
|
/*typeArguments*/
|
|
88655
88710
|
void 0,
|
|
88656
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88711
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88657
88712
|
);
|
|
88658
88713
|
}
|
|
88659
88714
|
return factory2.updateCallExpression(
|
|
88660
88715
|
node,
|
|
88661
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
88716
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
|
|
88662
88717
|
/*typeArguments*/
|
|
88663
88718
|
void 0,
|
|
88664
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88719
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88665
88720
|
);
|
|
88666
88721
|
}
|
|
88667
88722
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
88668
88723
|
const invocation = factory2.createFunctionCallCall(
|
|
88669
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88724
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88670
88725
|
currentClassLexicalEnvironment.classConstructor,
|
|
88671
88726
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
88672
88727
|
);
|
|
@@ -88682,19 +88737,19 @@ ${lanes.join("\n")}
|
|
|
88682
88737
|
return factory2.updateTaggedTemplateExpression(
|
|
88683
88738
|
node,
|
|
88684
88739
|
factory2.createCallExpression(
|
|
88685
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
88740
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
|
|
88686
88741
|
/*typeArguments*/
|
|
88687
88742
|
void 0,
|
|
88688
|
-
[visitNode(thisArg, visitor, isExpression)]
|
|
88743
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
|
|
88689
88744
|
),
|
|
88690
88745
|
/*typeArguments*/
|
|
88691
88746
|
void 0,
|
|
88692
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
88747
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
88693
88748
|
);
|
|
88694
88749
|
}
|
|
88695
88750
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
88696
88751
|
const invocation = factory2.createFunctionBindCall(
|
|
88697
|
-
visitNode(node.tag, visitor, isExpression),
|
|
88752
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
88698
88753
|
currentClassLexicalEnvironment.classConstructor,
|
|
88699
88754
|
[]
|
|
88700
88755
|
);
|
|
@@ -88705,7 +88760,7 @@ ${lanes.join("\n")}
|
|
|
88705
88760
|
invocation,
|
|
88706
88761
|
/*typeArguments*/
|
|
88707
88762
|
void 0,
|
|
88708
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
88763
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
88709
88764
|
);
|
|
88710
88765
|
}
|
|
88711
88766
|
return visitEachChild(node, visitor, context);
|
|
@@ -88735,9 +88790,9 @@ ${lanes.join("\n")}
|
|
|
88735
88790
|
pendingExpressions = void 0;
|
|
88736
88791
|
node = factory2.updateBinaryExpression(
|
|
88737
88792
|
node,
|
|
88738
|
-
visitNode(node.left, assignmentTargetVisitor),
|
|
88793
|
+
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
|
|
88739
88794
|
node.operatorToken,
|
|
88740
|
-
visitNode(node.right, visitor)
|
|
88795
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
88741
88796
|
);
|
|
88742
88797
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
88743
88798
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -88762,7 +88817,7 @@ ${lanes.join("\n")}
|
|
|
88762
88817
|
node,
|
|
88763
88818
|
visitInvalidSuperProperty(node.left),
|
|
88764
88819
|
node.operatorToken,
|
|
88765
|
-
visitNode(node.right, visitor, isExpression)
|
|
88820
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
88766
88821
|
);
|
|
88767
88822
|
}
|
|
88768
88823
|
if (classConstructor && superClassReference) {
|
|
@@ -88782,6 +88837,7 @@ ${lanes.join("\n")}
|
|
|
88782
88837
|
);
|
|
88783
88838
|
setOriginalNode(superPropertyGet, node.left);
|
|
88784
88839
|
setTextRange(superPropertyGet, node.left);
|
|
88840
|
+
Debug.assert(expression);
|
|
88785
88841
|
expression = factory2.createBinaryExpression(
|
|
88786
88842
|
superPropertyGet,
|
|
88787
88843
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -88791,9 +88847,11 @@ ${lanes.join("\n")}
|
|
|
88791
88847
|
}
|
|
88792
88848
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
88793
88849
|
if (temp) {
|
|
88850
|
+
Debug.assert(expression);
|
|
88794
88851
|
expression = factory2.createAssignment(temp, expression);
|
|
88795
88852
|
setTextRange(temp, node);
|
|
88796
88853
|
}
|
|
88854
|
+
Debug.assert(expression);
|
|
88797
88855
|
expression = factory2.createReflectSetCall(
|
|
88798
88856
|
superClassReference,
|
|
88799
88857
|
setterName,
|
|
@@ -88817,8 +88875,8 @@ ${lanes.join("\n")}
|
|
|
88817
88875
|
return visitEachChild(node, visitor, context);
|
|
88818
88876
|
}
|
|
88819
88877
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
88820
|
-
receiver = visitNode(receiver, visitor, isExpression);
|
|
88821
|
-
right = visitNode(right, visitor, isExpression);
|
|
88878
|
+
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
|
|
88879
|
+
right = Debug.checkDefined(visitNode(right, visitor, isExpression));
|
|
88822
88880
|
if (isCompoundAssignment(operator)) {
|
|
88823
88881
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
88824
88882
|
receiver = initializeExpression || readExpression;
|
|
@@ -88921,7 +88979,7 @@ ${lanes.join("\n")}
|
|
|
88921
88979
|
node,
|
|
88922
88980
|
factory2.createAssignment(
|
|
88923
88981
|
temp,
|
|
88924
|
-
visitNode(node.expression, visitor, isExpression)
|
|
88982
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
88925
88983
|
),
|
|
88926
88984
|
/*typeArguments*/
|
|
88927
88985
|
void 0
|
|
@@ -89483,7 +89541,7 @@ ${lanes.join("\n")}
|
|
|
89483
89541
|
) : factory2.updateElementAccessExpression(
|
|
89484
89542
|
node,
|
|
89485
89543
|
factory2.createVoidZero(),
|
|
89486
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
89544
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
89487
89545
|
);
|
|
89488
89546
|
}
|
|
89489
89547
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -89600,6 +89658,7 @@ ${lanes.join("\n")}
|
|
|
89600
89658
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
89601
89659
|
if (isComputedPropertyName(name)) {
|
|
89602
89660
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
89661
|
+
Debug.assert(expression);
|
|
89603
89662
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
89604
89663
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
89605
89664
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -89821,7 +89880,7 @@ ${lanes.join("\n")}
|
|
|
89821
89880
|
/*reservedInNestedScopes*/
|
|
89822
89881
|
true
|
|
89823
89882
|
);
|
|
89824
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
89883
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
89825
89884
|
}
|
|
89826
89885
|
return factory2.createAssignmentTargetWrapper(
|
|
89827
89886
|
parameter,
|
|
@@ -89834,6 +89893,7 @@ ${lanes.join("\n")}
|
|
|
89834
89893
|
);
|
|
89835
89894
|
}
|
|
89836
89895
|
function visitArrayAssignmentTarget(node) {
|
|
89896
|
+
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
89837
89897
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
89838
89898
|
if (target) {
|
|
89839
89899
|
let wrapped;
|
|
@@ -89868,7 +89928,7 @@ ${lanes.join("\n")}
|
|
|
89868
89928
|
node,
|
|
89869
89929
|
wrapped,
|
|
89870
89930
|
node.operatorToken,
|
|
89871
|
-
visitNode(node.right, visitor, isExpression)
|
|
89931
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
89872
89932
|
);
|
|
89873
89933
|
} else if (isSpreadElement(node)) {
|
|
89874
89934
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -89914,14 +89974,14 @@ ${lanes.join("\n")}
|
|
|
89914
89974
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
89915
89975
|
return factory2.updatePropertyAssignment(
|
|
89916
89976
|
node,
|
|
89917
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
89918
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
89977
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
89978
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
|
|
89919
89979
|
);
|
|
89920
89980
|
}
|
|
89921
89981
|
if (isSpreadAssignment(node)) {
|
|
89922
89982
|
return factory2.updateSpreadAssignment(
|
|
89923
89983
|
node,
|
|
89924
|
-
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
89984
|
+
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
|
|
89925
89985
|
);
|
|
89926
89986
|
}
|
|
89927
89987
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -90554,7 +90614,7 @@ ${lanes.join("\n")}
|
|
|
90554
90614
|
return factory2.updateConstructorDeclaration(
|
|
90555
90615
|
node,
|
|
90556
90616
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90557
|
-
visitNodes2(node.parameters, visitor,
|
|
90617
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90558
90618
|
visitNode(node.body, visitor, isBlock)
|
|
90559
90619
|
);
|
|
90560
90620
|
}
|
|
@@ -90570,12 +90630,12 @@ ${lanes.join("\n")}
|
|
|
90570
90630
|
node,
|
|
90571
90631
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90572
90632
|
node.asteriskToken,
|
|
90573
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90633
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90574
90634
|
/*questionToken*/
|
|
90575
90635
|
void 0,
|
|
90576
90636
|
/*typeParameters*/
|
|
90577
90637
|
void 0,
|
|
90578
|
-
visitNodes2(node.parameters, visitor,
|
|
90638
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90579
90639
|
/*type*/
|
|
90580
90640
|
void 0,
|
|
90581
90641
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -90585,8 +90645,8 @@ ${lanes.join("\n")}
|
|
|
90585
90645
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
90586
90646
|
node,
|
|
90587
90647
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90588
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90589
|
-
visitNodes2(node.parameters, visitor,
|
|
90648
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90649
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90590
90650
|
/*type*/
|
|
90591
90651
|
void 0,
|
|
90592
90652
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -90596,8 +90656,8 @@ ${lanes.join("\n")}
|
|
|
90596
90656
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
90597
90657
|
node,
|
|
90598
90658
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90599
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90600
|
-
visitNodes2(node.parameters, visitor,
|
|
90659
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90660
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90601
90661
|
visitNode(node.body, visitor, isBlock)
|
|
90602
90662
|
), node);
|
|
90603
90663
|
}
|
|
@@ -90608,7 +90668,7 @@ ${lanes.join("\n")}
|
|
|
90608
90668
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
90609
90669
|
node,
|
|
90610
90670
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90611
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90671
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90612
90672
|
/*questionOrExclamationToken*/
|
|
90613
90673
|
void 0,
|
|
90614
90674
|
/*type*/
|
|
@@ -90621,7 +90681,7 @@ ${lanes.join("\n")}
|
|
|
90621
90681
|
node,
|
|
90622
90682
|
elideNodes(factory2, node.modifiers),
|
|
90623
90683
|
node.dotDotDotToken,
|
|
90624
|
-
visitNode(node.name, visitor, isBindingName),
|
|
90684
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
90625
90685
|
/*questionToken*/
|
|
90626
90686
|
void 0,
|
|
90627
90687
|
/*type*/
|
|
@@ -90718,7 +90778,7 @@ ${lanes.join("\n")}
|
|
|
90718
90778
|
return expression;
|
|
90719
90779
|
}
|
|
90720
90780
|
function transformDecorator(decorator) {
|
|
90721
|
-
return visitNode(decorator.expression, visitor, isExpression);
|
|
90781
|
+
return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
|
|
90722
90782
|
}
|
|
90723
90783
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
90724
90784
|
let expressions;
|
|
@@ -90990,21 +91050,21 @@ ${lanes.join("\n")}
|
|
|
90990
91050
|
node.initializer,
|
|
90991
91051
|
/*hasReceiver*/
|
|
90992
91052
|
true
|
|
90993
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
90994
|
-
visitNode(node.expression, visitor, isExpression),
|
|
91053
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
91054
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
90995
91055
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
90996
91056
|
);
|
|
90997
91057
|
}
|
|
90998
91058
|
function visitForOfStatementInAsyncBody(node) {
|
|
90999
91059
|
return factory2.updateForOfStatement(
|
|
91000
91060
|
node,
|
|
91001
|
-
visitNode(node.awaitModifier, visitor,
|
|
91061
|
+
visitNode(node.awaitModifier, visitor, isAwaitKeyword),
|
|
91002
91062
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
91003
91063
|
node.initializer,
|
|
91004
91064
|
/*hasReceiver*/
|
|
91005
91065
|
true
|
|
91006
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
91007
|
-
visitNode(node.expression, visitor, isExpression),
|
|
91066
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
91067
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
91008
91068
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
91009
91069
|
);
|
|
91010
91070
|
}
|
|
@@ -91041,7 +91101,7 @@ ${lanes.join("\n")}
|
|
|
91041
91101
|
function visitConstructorDeclaration(node) {
|
|
91042
91102
|
return factory2.updateConstructorDeclaration(
|
|
91043
91103
|
node,
|
|
91044
|
-
visitNodes2(node.modifiers, visitor,
|
|
91104
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
91045
91105
|
visitParameterList(node.parameters, visitor, context),
|
|
91046
91106
|
transformMethodBody(node)
|
|
91047
91107
|
);
|
|
@@ -91099,7 +91159,7 @@ ${lanes.join("\n")}
|
|
|
91099
91159
|
function visitFunctionExpression(node) {
|
|
91100
91160
|
return factory2.updateFunctionExpression(
|
|
91101
91161
|
node,
|
|
91102
|
-
visitNodes2(node.modifiers, visitor,
|
|
91162
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
91103
91163
|
node.asteriskToken,
|
|
91104
91164
|
node.name,
|
|
91105
91165
|
/*typeParameters*/
|
|
@@ -91113,7 +91173,7 @@ ${lanes.join("\n")}
|
|
|
91113
91173
|
function visitArrowFunction(node) {
|
|
91114
91174
|
return factory2.updateArrowFunction(
|
|
91115
91175
|
node,
|
|
91116
|
-
visitNodes2(node.modifiers, visitor,
|
|
91176
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
91117
91177
|
/*typeParameters*/
|
|
91118
91178
|
void 0,
|
|
91119
91179
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -91170,7 +91230,7 @@ ${lanes.join("\n")}
|
|
|
91170
91230
|
),
|
|
91171
91231
|
node
|
|
91172
91232
|
);
|
|
91173
|
-
return visitNode(converted, visitor, isExpression);
|
|
91233
|
+
return Debug.checkDefined(visitNode(converted, visitor, isExpression));
|
|
91174
91234
|
}
|
|
91175
91235
|
function collidesWithParameterName({ name }) {
|
|
91176
91236
|
if (isIdentifier(name)) {
|
|
@@ -91302,7 +91362,7 @@ ${lanes.join("\n")}
|
|
|
91302
91362
|
if (isBlock(body)) {
|
|
91303
91363
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));
|
|
91304
91364
|
} else {
|
|
91305
|
-
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
91365
|
+
return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
|
|
91306
91366
|
}
|
|
91307
91367
|
}
|
|
91308
91368
|
function getPromiseConstructor(type) {
|
|
@@ -92421,7 +92481,7 @@ ${lanes.join("\n")}
|
|
|
92421
92481
|
/*questionToken*/
|
|
92422
92482
|
void 0,
|
|
92423
92483
|
visitor,
|
|
92424
|
-
|
|
92484
|
+
isQuestionToken
|
|
92425
92485
|
),
|
|
92426
92486
|
/*typeParameters*/
|
|
92427
92487
|
void 0,
|
|
@@ -93574,7 +93634,7 @@ ${lanes.join("\n")}
|
|
|
93574
93634
|
return element;
|
|
93575
93635
|
}
|
|
93576
93636
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
93577
|
-
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
93637
|
+
return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
93578
93638
|
}
|
|
93579
93639
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
93580
93640
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -93604,7 +93664,7 @@ ${lanes.join("\n")}
|
|
|
93604
93664
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
93605
93665
|
}
|
|
93606
93666
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
93607
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
93667
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
93608
93668
|
}
|
|
93609
93669
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
93610
93670
|
const name = getAttributeName(node);
|
|
@@ -93624,7 +93684,7 @@ ${lanes.join("\n")}
|
|
|
93624
93684
|
if (node.expression === void 0) {
|
|
93625
93685
|
return factory2.createTrue();
|
|
93626
93686
|
}
|
|
93627
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
93687
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
93628
93688
|
}
|
|
93629
93689
|
if (isJsxElement(node)) {
|
|
93630
93690
|
return visitJsxElement(
|
|
@@ -94382,7 +94442,7 @@ ${lanes.join("\n")}
|
|
|
94382
94442
|
[
|
|
94383
94443
|
factory2.createPropertyAssignment(
|
|
94384
94444
|
factory2.createIdentifier("value"),
|
|
94385
|
-
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
94445
|
+
node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
|
|
94386
94446
|
)
|
|
94387
94447
|
]
|
|
94388
94448
|
)
|
|
@@ -94553,7 +94613,7 @@ ${lanes.join("\n")}
|
|
|
94553
94613
|
outer,
|
|
94554
94614
|
/*typeArguments*/
|
|
94555
94615
|
void 0,
|
|
94556
|
-
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
94616
|
+
extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
|
|
94557
94617
|
)
|
|
94558
94618
|
);
|
|
94559
94619
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -94895,7 +94955,7 @@ ${lanes.join("\n")}
|
|
|
94895
94955
|
factory2.createExpressionStatement(
|
|
94896
94956
|
factory2.createAssignment(
|
|
94897
94957
|
factory2.getGeneratedNameForNode(parameter),
|
|
94898
|
-
visitNode(initializer, visitor, isExpression)
|
|
94958
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
94899
94959
|
)
|
|
94900
94960
|
),
|
|
94901
94961
|
2097152 /* CustomPrologue */
|
|
@@ -94906,7 +94966,7 @@ ${lanes.join("\n")}
|
|
|
94906
94966
|
return false;
|
|
94907
94967
|
}
|
|
94908
94968
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
94909
|
-
initializer = visitNode(initializer, visitor, isExpression);
|
|
94969
|
+
initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
94910
94970
|
const statement = factory2.createIfStatement(
|
|
94911
94971
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
94912
94972
|
setEmitFlags(
|
|
@@ -95182,6 +95242,7 @@ ${lanes.join("\n")}
|
|
|
95182
95242
|
container
|
|
95183
95243
|
);
|
|
95184
95244
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
95245
|
+
Debug.assert(propertyName);
|
|
95185
95246
|
let e;
|
|
95186
95247
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
95187
95248
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -95225,6 +95286,7 @@ ${lanes.join("\n")}
|
|
|
95225
95286
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
95226
95287
|
setSourceMapRange(target, firstAccessor.name);
|
|
95227
95288
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
95289
|
+
Debug.assert(visitedAccessorName);
|
|
95228
95290
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
95229
95291
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
95230
95292
|
}
|
|
@@ -95497,9 +95559,9 @@ ${lanes.join("\n")}
|
|
|
95497
95559
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
95498
95560
|
return factory2.updateBinaryExpression(
|
|
95499
95561
|
node,
|
|
95500
|
-
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
95562
|
+
Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
|
|
95501
95563
|
node.operatorToken,
|
|
95502
|
-
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
95564
|
+
Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
|
|
95503
95565
|
);
|
|
95504
95566
|
}
|
|
95505
95567
|
return visitEachChild(node, visitor, context);
|
|
@@ -95514,6 +95576,7 @@ ${lanes.join("\n")}
|
|
|
95514
95576
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
95515
95577
|
if (result || visited !== element) {
|
|
95516
95578
|
result || (result = node.elements.slice(0, i));
|
|
95579
|
+
Debug.assert(visited);
|
|
95517
95580
|
result.push(visited);
|
|
95518
95581
|
}
|
|
95519
95582
|
}
|
|
@@ -95540,7 +95603,7 @@ ${lanes.join("\n")}
|
|
|
95540
95603
|
0 /* All */
|
|
95541
95604
|
);
|
|
95542
95605
|
} else {
|
|
95543
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
95606
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
|
|
95544
95607
|
setTextRange(assignment, decl);
|
|
95545
95608
|
}
|
|
95546
95609
|
assignments = append(assignments, assignment);
|
|
@@ -95562,7 +95625,7 @@ ${lanes.join("\n")}
|
|
|
95562
95625
|
if (node.flags & 3 /* BlockScoped */) {
|
|
95563
95626
|
enableSubstitutionsForBlockScopedBindings();
|
|
95564
95627
|
}
|
|
95565
|
-
const declarations =
|
|
95628
|
+
const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
|
|
95566
95629
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
95567
95630
|
setOriginalNode(declarationList, node);
|
|
95568
95631
|
setTextRange(declarationList, node);
|
|
@@ -95646,7 +95709,7 @@ ${lanes.join("\n")}
|
|
|
95646
95709
|
statement,
|
|
95647
95710
|
/*outermostLabeledStatement*/
|
|
95648
95711
|
node
|
|
95649
|
-
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
95712
|
+
) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
|
|
95650
95713
|
}
|
|
95651
95714
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
95652
95715
|
switch (node.kind) {
|
|
@@ -95689,7 +95752,7 @@ ${lanes.join("\n")}
|
|
|
95689
95752
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
95690
95753
|
visitNode(node.condition, visitor, isExpression),
|
|
95691
95754
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
95692
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
95755
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
95693
95756
|
);
|
|
95694
95757
|
}
|
|
95695
95758
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -95775,13 +95838,14 @@ ${lanes.join("\n")}
|
|
|
95775
95838
|
)));
|
|
95776
95839
|
} else {
|
|
95777
95840
|
setTextRangeEnd(assignment, initializer.end);
|
|
95778
|
-
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
95841
|
+
statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
|
|
95779
95842
|
}
|
|
95780
95843
|
}
|
|
95781
95844
|
if (convertedLoopBodyStatements) {
|
|
95782
95845
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
95783
95846
|
} else {
|
|
95784
95847
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
95848
|
+
Debug.assert(statement);
|
|
95785
95849
|
if (isBlock(statement)) {
|
|
95786
95850
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
95787
95851
|
} else {
|
|
@@ -95802,6 +95866,7 @@ ${lanes.join("\n")}
|
|
|
95802
95866
|
}
|
|
95803
95867
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
95804
95868
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
95869
|
+
Debug.assert(expression);
|
|
95805
95870
|
const counter = factory2.createLoopVariable();
|
|
95806
95871
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
95807
95872
|
/*recordTempVariable*/
|
|
@@ -95861,6 +95926,7 @@ ${lanes.join("\n")}
|
|
|
95861
95926
|
}
|
|
95862
95927
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
95863
95928
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
95929
|
+
Debug.assert(expression);
|
|
95864
95930
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
95865
95931
|
/*recordTempVariable*/
|
|
95866
95932
|
void 0
|
|
@@ -96118,7 +96184,7 @@ ${lanes.join("\n")}
|
|
|
96118
96184
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
96119
96185
|
}
|
|
96120
96186
|
} else {
|
|
96121
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
96187
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
|
|
96122
96188
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
96123
96189
|
}
|
|
96124
96190
|
statements.push(loop);
|
|
@@ -96156,16 +96222,16 @@ ${lanes.join("\n")}
|
|
|
96156
96222
|
node,
|
|
96157
96223
|
/*awaitModifier*/
|
|
96158
96224
|
void 0,
|
|
96159
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
96160
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96225
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
96226
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96161
96227
|
convertedLoopBody
|
|
96162
96228
|
);
|
|
96163
96229
|
}
|
|
96164
96230
|
function convertForInStatement(node, convertedLoopBody) {
|
|
96165
96231
|
return factory2.updateForInStatement(
|
|
96166
96232
|
node,
|
|
96167
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
96168
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96233
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
96234
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96169
96235
|
convertedLoopBody
|
|
96170
96236
|
);
|
|
96171
96237
|
}
|
|
@@ -96173,13 +96239,13 @@ ${lanes.join("\n")}
|
|
|
96173
96239
|
return factory2.updateDoStatement(
|
|
96174
96240
|
node,
|
|
96175
96241
|
convertedLoopBody,
|
|
96176
|
-
visitNode(node.expression, visitor, isExpression)
|
|
96242
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
96177
96243
|
);
|
|
96178
96244
|
}
|
|
96179
96245
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
96180
96246
|
return factory2.updateWhileStatement(
|
|
96181
96247
|
node,
|
|
96182
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96248
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96183
96249
|
convertedLoopBody
|
|
96184
96250
|
);
|
|
96185
96251
|
}
|
|
@@ -96341,7 +96407,7 @@ ${lanes.join("\n")}
|
|
|
96341
96407
|
void 0,
|
|
96342
96408
|
/*type*/
|
|
96343
96409
|
void 0,
|
|
96344
|
-
visitNode(
|
|
96410
|
+
Debug.checkDefined(visitNode(
|
|
96345
96411
|
factory2.createBlock(
|
|
96346
96412
|
statements,
|
|
96347
96413
|
/*multiLine*/
|
|
@@ -96349,7 +96415,7 @@ ${lanes.join("\n")}
|
|
|
96349
96415
|
),
|
|
96350
96416
|
visitor,
|
|
96351
96417
|
isBlock
|
|
96352
|
-
)
|
|
96418
|
+
))
|
|
96353
96419
|
),
|
|
96354
96420
|
emitFlags
|
|
96355
96421
|
)
|
|
@@ -96372,7 +96438,7 @@ ${lanes.join("\n")}
|
|
|
96372
96438
|
if (node.incrementor) {
|
|
96373
96439
|
statements.push(factory2.createIfStatement(
|
|
96374
96440
|
currentState.conditionVariable,
|
|
96375
|
-
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
96441
|
+
factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
|
|
96376
96442
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
96377
96443
|
));
|
|
96378
96444
|
} else {
|
|
@@ -96383,11 +96449,12 @@ ${lanes.join("\n")}
|
|
|
96383
96449
|
}
|
|
96384
96450
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
96385
96451
|
statements.push(factory2.createIfStatement(
|
|
96386
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
96387
|
-
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
96452
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
|
|
96453
|
+
Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
|
|
96388
96454
|
));
|
|
96389
96455
|
}
|
|
96390
96456
|
}
|
|
96457
|
+
Debug.assert(statement);
|
|
96391
96458
|
if (isBlock(statement)) {
|
|
96392
96459
|
addRange(statements, statement.statements);
|
|
96393
96460
|
} else {
|
|
@@ -96655,9 +96722,9 @@ ${lanes.join("\n")}
|
|
|
96655
96722
|
createMemberAccessForPropertyName(
|
|
96656
96723
|
factory2,
|
|
96657
96724
|
receiver,
|
|
96658
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
96725
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
96659
96726
|
),
|
|
96660
|
-
visitNode(property.initializer, visitor, isExpression)
|
|
96727
|
+
Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
|
|
96661
96728
|
);
|
|
96662
96729
|
setTextRange(expression, property);
|
|
96663
96730
|
if (startsOnNewLine) {
|
|
@@ -96670,7 +96737,7 @@ ${lanes.join("\n")}
|
|
|
96670
96737
|
createMemberAccessForPropertyName(
|
|
96671
96738
|
factory2,
|
|
96672
96739
|
receiver,
|
|
96673
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
96740
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
96674
96741
|
),
|
|
96675
96742
|
factory2.cloneNode(property.name)
|
|
96676
96743
|
);
|
|
@@ -96685,7 +96752,7 @@ ${lanes.join("\n")}
|
|
|
96685
96752
|
createMemberAccessForPropertyName(
|
|
96686
96753
|
factory2,
|
|
96687
96754
|
receiver,
|
|
96688
|
-
visitNode(method.name, visitor, isPropertyName)
|
|
96755
|
+
Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
|
|
96689
96756
|
),
|
|
96690
96757
|
transformFunctionLikeToExpression(
|
|
96691
96758
|
method,
|
|
@@ -96819,7 +96886,7 @@ ${lanes.join("\n")}
|
|
|
96819
96886
|
}
|
|
96820
96887
|
return factory2.updateCallExpression(
|
|
96821
96888
|
node,
|
|
96822
|
-
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
96889
|
+
Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
|
|
96823
96890
|
/*typeArguments*/
|
|
96824
96891
|
void 0,
|
|
96825
96892
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -96931,8 +96998,8 @@ ${lanes.join("\n")}
|
|
|
96931
96998
|
let resultingCall;
|
|
96932
96999
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
96933
97000
|
resultingCall = factory2.createFunctionApplyCall(
|
|
96934
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
96935
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
97001
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
97002
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
96936
97003
|
transformAndSpreadElements(
|
|
96937
97004
|
node.arguments,
|
|
96938
97005
|
/*isArgumentList*/
|
|
@@ -96946,8 +97013,8 @@ ${lanes.join("\n")}
|
|
|
96946
97013
|
} else {
|
|
96947
97014
|
resultingCall = setTextRange(
|
|
96948
97015
|
factory2.createFunctionCallCall(
|
|
96949
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
96950
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
97016
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
97017
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
96951
97018
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
96952
97019
|
),
|
|
96953
97020
|
node
|
|
@@ -96969,7 +97036,7 @@ ${lanes.join("\n")}
|
|
|
96969
97036
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
96970
97037
|
return factory2.createNewExpression(
|
|
96971
97038
|
factory2.createFunctionApplyCall(
|
|
96972
|
-
visitNode(target, visitor, isExpression),
|
|
97039
|
+
Debug.checkDefined(visitNode(target, visitor, isExpression)),
|
|
96973
97040
|
thisArg,
|
|
96974
97041
|
transformAndSpreadElements(
|
|
96975
97042
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -97026,7 +97093,9 @@ ${lanes.join("\n")}
|
|
|
97026
97093
|
return map(chunk, visitExpressionOfSpread);
|
|
97027
97094
|
}
|
|
97028
97095
|
function visitExpressionOfSpread(node) {
|
|
97096
|
+
Debug.assertNode(node, isSpreadElement);
|
|
97029
97097
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
97098
|
+
Debug.assert(expression);
|
|
97030
97099
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
97031
97100
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
97032
97101
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -97077,7 +97146,7 @@ ${lanes.join("\n")}
|
|
|
97077
97146
|
function visitTemplateExpression(node) {
|
|
97078
97147
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
97079
97148
|
for (const span of node.templateSpans) {
|
|
97080
|
-
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
97149
|
+
const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
|
|
97081
97150
|
if (span.literal.text.length > 0) {
|
|
97082
97151
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
97083
97152
|
}
|
|
@@ -97655,19 +97724,19 @@ ${lanes.join("\n")}
|
|
|
97655
97724
|
case 208 /* PropertyAccessExpression */:
|
|
97656
97725
|
target = factory2.updatePropertyAccessExpression(
|
|
97657
97726
|
left,
|
|
97658
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
97727
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
97659
97728
|
left.name
|
|
97660
97729
|
);
|
|
97661
97730
|
break;
|
|
97662
97731
|
case 209 /* ElementAccessExpression */:
|
|
97663
97732
|
target = factory2.updateElementAccessExpression(
|
|
97664
97733
|
left,
|
|
97665
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
97666
|
-
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
97734
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
97735
|
+
cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
|
|
97667
97736
|
);
|
|
97668
97737
|
break;
|
|
97669
97738
|
default:
|
|
97670
|
-
target = visitNode(left, visitor, isExpression);
|
|
97739
|
+
target = Debug.checkDefined(visitNode(left, visitor, isExpression));
|
|
97671
97740
|
break;
|
|
97672
97741
|
}
|
|
97673
97742
|
const operator = node.operatorToken.kind;
|
|
@@ -97679,7 +97748,7 @@ ${lanes.join("\n")}
|
|
|
97679
97748
|
factory2.createBinaryExpression(
|
|
97680
97749
|
cacheExpression(target),
|
|
97681
97750
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
97682
|
-
visitNode(right, visitor, isExpression)
|
|
97751
|
+
Debug.checkDefined(visitNode(right, visitor, isExpression))
|
|
97683
97752
|
),
|
|
97684
97753
|
node
|
|
97685
97754
|
)
|
|
@@ -97687,7 +97756,7 @@ ${lanes.join("\n")}
|
|
|
97687
97756
|
node
|
|
97688
97757
|
);
|
|
97689
97758
|
} else {
|
|
97690
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
97759
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
|
|
97691
97760
|
}
|
|
97692
97761
|
}
|
|
97693
97762
|
return visitEachChild(node, visitor, context);
|
|
@@ -97701,9 +97770,9 @@ ${lanes.join("\n")}
|
|
|
97701
97770
|
}
|
|
97702
97771
|
return factory2.updateBinaryExpression(
|
|
97703
97772
|
node,
|
|
97704
|
-
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
97773
|
+
cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
|
|
97705
97774
|
node.operatorToken,
|
|
97706
|
-
visitNode(node.right, visitor, isExpression)
|
|
97775
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
97707
97776
|
);
|
|
97708
97777
|
}
|
|
97709
97778
|
return visitEachChild(node, visitor, context);
|
|
@@ -97722,7 +97791,7 @@ ${lanes.join("\n")}
|
|
|
97722
97791
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
97723
97792
|
pendingExpressions = [];
|
|
97724
97793
|
}
|
|
97725
|
-
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
97794
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
|
|
97726
97795
|
}
|
|
97727
97796
|
}
|
|
97728
97797
|
}
|
|
@@ -97736,7 +97805,7 @@ ${lanes.join("\n")}
|
|
|
97736
97805
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
97737
97806
|
pendingExpressions = [];
|
|
97738
97807
|
}
|
|
97739
|
-
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
97808
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
|
|
97740
97809
|
}
|
|
97741
97810
|
}
|
|
97742
97811
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -97746,7 +97815,7 @@ ${lanes.join("\n")}
|
|
|
97746
97815
|
const resultLocal = declareLocal();
|
|
97747
97816
|
emitAssignment(
|
|
97748
97817
|
resultLocal,
|
|
97749
|
-
visitNode(node.left, visitor, isExpression),
|
|
97818
|
+
Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
|
|
97750
97819
|
/*location*/
|
|
97751
97820
|
node.left
|
|
97752
97821
|
);
|
|
@@ -97767,7 +97836,7 @@ ${lanes.join("\n")}
|
|
|
97767
97836
|
}
|
|
97768
97837
|
emitAssignment(
|
|
97769
97838
|
resultLocal,
|
|
97770
|
-
visitNode(node.right, visitor, isExpression),
|
|
97839
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
|
|
97771
97840
|
/*location*/
|
|
97772
97841
|
node.right
|
|
97773
97842
|
);
|
|
@@ -97781,13 +97850,13 @@ ${lanes.join("\n")}
|
|
|
97781
97850
|
const resultLocal = declareLocal();
|
|
97782
97851
|
emitBreakWhenFalse(
|
|
97783
97852
|
whenFalseLabel,
|
|
97784
|
-
visitNode(node.condition, visitor, isExpression),
|
|
97853
|
+
Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
|
|
97785
97854
|
/*location*/
|
|
97786
97855
|
node.condition
|
|
97787
97856
|
);
|
|
97788
97857
|
emitAssignment(
|
|
97789
97858
|
resultLocal,
|
|
97790
|
-
visitNode(node.whenTrue, visitor, isExpression),
|
|
97859
|
+
Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
|
|
97791
97860
|
/*location*/
|
|
97792
97861
|
node.whenTrue
|
|
97793
97862
|
);
|
|
@@ -97795,7 +97864,7 @@ ${lanes.join("\n")}
|
|
|
97795
97864
|
markLabel(whenFalseLabel);
|
|
97796
97865
|
emitAssignment(
|
|
97797
97866
|
resultLocal,
|
|
97798
|
-
visitNode(node.whenFalse, visitor, isExpression),
|
|
97867
|
+
Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
|
|
97799
97868
|
/*location*/
|
|
97800
97869
|
node.whenFalse
|
|
97801
97870
|
);
|
|
@@ -97875,7 +97944,7 @@ ${lanes.join("\n")}
|
|
|
97875
97944
|
leadingElement = void 0;
|
|
97876
97945
|
expressions2 = [];
|
|
97877
97946
|
}
|
|
97878
|
-
expressions2.push(visitNode(element, visitor, isExpression));
|
|
97947
|
+
expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
|
|
97879
97948
|
return expressions2;
|
|
97880
97949
|
}
|
|
97881
97950
|
}
|
|
@@ -97914,8 +97983,8 @@ ${lanes.join("\n")}
|
|
|
97914
97983
|
if (containsYield(node.argumentExpression)) {
|
|
97915
97984
|
return factory2.updateElementAccessExpression(
|
|
97916
97985
|
node,
|
|
97917
|
-
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
97918
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
97986
|
+
cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
|
|
97987
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
97919
97988
|
);
|
|
97920
97989
|
}
|
|
97921
97990
|
return visitEachChild(node, visitor, context);
|
|
@@ -97932,7 +98001,7 @@ ${lanes.join("\n")}
|
|
|
97932
98001
|
return setOriginalNode(
|
|
97933
98002
|
setTextRange(
|
|
97934
98003
|
factory2.createFunctionApplyCall(
|
|
97935
|
-
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
98004
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
|
|
97936
98005
|
thisArg,
|
|
97937
98006
|
visitElements(node.arguments)
|
|
97938
98007
|
),
|
|
@@ -97950,7 +98019,7 @@ ${lanes.join("\n")}
|
|
|
97950
98019
|
setTextRange(
|
|
97951
98020
|
factory2.createNewExpression(
|
|
97952
98021
|
factory2.createFunctionApplyCall(
|
|
97953
|
-
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
98022
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
|
|
97954
98023
|
thisArg,
|
|
97955
98024
|
visitElements(
|
|
97956
98025
|
node.arguments,
|
|
@@ -98066,7 +98135,7 @@ ${lanes.join("\n")}
|
|
|
98066
98135
|
return setSourceMapRange(
|
|
98067
98136
|
factory2.createAssignment(
|
|
98068
98137
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
98069
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
98138
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
98070
98139
|
),
|
|
98071
98140
|
node
|
|
98072
98141
|
);
|
|
@@ -98078,7 +98147,7 @@ ${lanes.join("\n")}
|
|
|
98078
98147
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
98079
98148
|
emitBreakWhenFalse(
|
|
98080
98149
|
node.elseStatement ? elseLabel : endLabel,
|
|
98081
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98150
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98082
98151
|
/*location*/
|
|
98083
98152
|
node.expression
|
|
98084
98153
|
);
|
|
@@ -98107,7 +98176,7 @@ ${lanes.join("\n")}
|
|
|
98107
98176
|
markLabel(loopLabel);
|
|
98108
98177
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98109
98178
|
markLabel(conditionLabel);
|
|
98110
|
-
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
98179
|
+
emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98111
98180
|
endLoopBlock();
|
|
98112
98181
|
} else {
|
|
98113
98182
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -98128,7 +98197,7 @@ ${lanes.join("\n")}
|
|
|
98128
98197
|
const loopLabel = defineLabel();
|
|
98129
98198
|
const endLabel = beginLoopBlock(loopLabel);
|
|
98130
98199
|
markLabel(loopLabel);
|
|
98131
|
-
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
98200
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98132
98201
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98133
98202
|
emitBreak(loopLabel);
|
|
98134
98203
|
endLoopBlock();
|
|
@@ -98159,7 +98228,7 @@ ${lanes.join("\n")}
|
|
|
98159
98228
|
emitStatement(
|
|
98160
98229
|
setTextRange(
|
|
98161
98230
|
factory2.createExpressionStatement(
|
|
98162
|
-
visitNode(initializer, visitor, isExpression)
|
|
98231
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
98163
98232
|
),
|
|
98164
98233
|
initializer
|
|
98165
98234
|
)
|
|
@@ -98168,7 +98237,7 @@ ${lanes.join("\n")}
|
|
|
98168
98237
|
}
|
|
98169
98238
|
markLabel(conditionLabel);
|
|
98170
98239
|
if (node.condition) {
|
|
98171
|
-
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
98240
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
|
|
98172
98241
|
}
|
|
98173
98242
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98174
98243
|
markLabel(incrementLabel);
|
|
@@ -98176,7 +98245,7 @@ ${lanes.join("\n")}
|
|
|
98176
98245
|
emitStatement(
|
|
98177
98246
|
setTextRange(
|
|
98178
98247
|
factory2.createExpressionStatement(
|
|
98179
|
-
visitNode(node.incrementor, visitor, isExpression)
|
|
98248
|
+
Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
|
|
98180
98249
|
),
|
|
98181
98250
|
node.incrementor
|
|
98182
98251
|
)
|
|
@@ -98221,7 +98290,7 @@ ${lanes.join("\n")}
|
|
|
98221
98290
|
const keysIndex = factory2.createLoopVariable();
|
|
98222
98291
|
const initializer = node.initializer;
|
|
98223
98292
|
hoistVariableDeclaration(keysIndex);
|
|
98224
|
-
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
98293
|
+
emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98225
98294
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
98226
98295
|
emitStatement(
|
|
98227
98296
|
factory2.createForInStatement(
|
|
@@ -98252,7 +98321,7 @@ ${lanes.join("\n")}
|
|
|
98252
98321
|
}
|
|
98253
98322
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
98254
98323
|
} else {
|
|
98255
|
-
variable = visitNode(initializer, visitor, isExpression);
|
|
98324
|
+
variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
98256
98325
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
98257
98326
|
}
|
|
98258
98327
|
emitAssignment(variable, key);
|
|
@@ -98277,8 +98346,8 @@ ${lanes.join("\n")}
|
|
|
98277
98346
|
node = factory2.updateForInStatement(
|
|
98278
98347
|
node,
|
|
98279
98348
|
initializer.declarations[0].name,
|
|
98280
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98281
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
98349
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98350
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
98282
98351
|
);
|
|
98283
98352
|
} else {
|
|
98284
98353
|
node = visitEachChild(node, visitor, context);
|
|
@@ -98354,7 +98423,7 @@ ${lanes.join("\n")}
|
|
|
98354
98423
|
}
|
|
98355
98424
|
function transformAndEmitWithStatement(node) {
|
|
98356
98425
|
if (containsYield(node)) {
|
|
98357
|
-
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
98426
|
+
beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
98358
98427
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98359
98428
|
endWithBlock();
|
|
98360
98429
|
} else {
|
|
@@ -98366,7 +98435,7 @@ ${lanes.join("\n")}
|
|
|
98366
98435
|
const caseBlock = node.caseBlock;
|
|
98367
98436
|
const numClauses = caseBlock.clauses.length;
|
|
98368
98437
|
const endLabel = beginSwitchBlock();
|
|
98369
|
-
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
98438
|
+
const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98370
98439
|
const clauseLabels = [];
|
|
98371
98440
|
let defaultClauseIndex = -1;
|
|
98372
98441
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -98388,7 +98457,7 @@ ${lanes.join("\n")}
|
|
|
98388
98457
|
}
|
|
98389
98458
|
pendingClauses.push(
|
|
98390
98459
|
factory2.createCaseClause(
|
|
98391
|
-
visitNode(clause.expression, visitor, isExpression),
|
|
98460
|
+
Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
|
|
98392
98461
|
[
|
|
98393
98462
|
createInlineBreak(
|
|
98394
98463
|
clauseLabels[i],
|
|
@@ -98458,7 +98527,7 @@ ${lanes.join("\n")}
|
|
|
98458
98527
|
function transformAndEmitThrowStatement(node) {
|
|
98459
98528
|
var _a2;
|
|
98460
98529
|
emitThrow(
|
|
98461
|
-
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
98530
|
+
Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
|
|
98462
98531
|
/*location*/
|
|
98463
98532
|
node
|
|
98464
98533
|
);
|
|
@@ -99748,7 +99817,7 @@ ${lanes.join("\n")}
|
|
|
99748
99817
|
}
|
|
99749
99818
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
99750
99819
|
if (currentModuleInfo.exportEquals) {
|
|
99751
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
99820
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
|
|
99752
99821
|
if (expressionResult) {
|
|
99753
99822
|
if (emitAsReturn) {
|
|
99754
99823
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -99943,7 +100012,7 @@ ${lanes.join("\n")}
|
|
|
99943
100012
|
}
|
|
99944
100013
|
function visitImportCallExpression(node) {
|
|
99945
100014
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
99946
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
100015
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
99947
100016
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
99948
100017
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
99949
100018
|
switch (compilerOptions.module) {
|
|
@@ -100472,7 +100541,7 @@ ${lanes.join("\n")}
|
|
|
100472
100541
|
deferredExports[id] = appendExportStatement(
|
|
100473
100542
|
deferredExports[id],
|
|
100474
100543
|
factory2.createIdentifier("default"),
|
|
100475
|
-
visitNode(node.expression, visitor),
|
|
100544
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100476
100545
|
/*location*/
|
|
100477
100546
|
node,
|
|
100478
100547
|
/*allowComments*/
|
|
@@ -100482,7 +100551,7 @@ ${lanes.join("\n")}
|
|
|
100482
100551
|
statements = appendExportStatement(
|
|
100483
100552
|
statements,
|
|
100484
100553
|
factory2.createIdentifier("default"),
|
|
100485
|
-
visitNode(node.expression, visitor),
|
|
100554
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100486
100555
|
/*location*/
|
|
100487
100556
|
node,
|
|
100488
100557
|
/*allowComments*/
|
|
@@ -100510,7 +100579,7 @@ ${lanes.join("\n")}
|
|
|
100510
100579
|
),
|
|
100511
100580
|
/*typeParameters*/
|
|
100512
100581
|
void 0,
|
|
100513
|
-
visitNodes2(node.parameters, visitor),
|
|
100582
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
100514
100583
|
/*type*/
|
|
100515
100584
|
void 0,
|
|
100516
100585
|
visitEachChild(node.body, visitor, context)
|
|
@@ -100551,8 +100620,8 @@ ${lanes.join("\n")}
|
|
|
100551
100620
|
),
|
|
100552
100621
|
/*typeParameters*/
|
|
100553
100622
|
void 0,
|
|
100554
|
-
visitNodes2(node.heritageClauses, visitor),
|
|
100555
|
-
visitNodes2(node.members, visitor)
|
|
100623
|
+
visitNodes2(node.heritageClauses, visitor, isHeritageClause),
|
|
100624
|
+
visitNodes2(node.members, visitor, isClassElement)
|
|
100556
100625
|
),
|
|
100557
100626
|
node
|
|
100558
100627
|
),
|
|
@@ -100600,7 +100669,7 @@ ${lanes.join("\n")}
|
|
|
100600
100669
|
variable.name,
|
|
100601
100670
|
variable.exclamationToken,
|
|
100602
100671
|
variable.type,
|
|
100603
|
-
visitNode(variable.initializer, visitor)
|
|
100672
|
+
visitNode(variable.initializer, visitor, isExpression)
|
|
100604
100673
|
);
|
|
100605
100674
|
variables = append(variables, updatedVariable);
|
|
100606
100675
|
expressions = append(expressions, expression);
|
|
@@ -100651,9 +100720,8 @@ ${lanes.join("\n")}
|
|
|
100651
100720
|
function transformInitializedVariable(node) {
|
|
100652
100721
|
if (isBindingPattern(node.name)) {
|
|
100653
100722
|
return flattenDestructuringAssignment(
|
|
100654
|
-
visitNode(node, visitor),
|
|
100655
|
-
|
|
100656
|
-
void 0,
|
|
100723
|
+
visitNode(node, visitor, isInitializedVariable),
|
|
100724
|
+
visitor,
|
|
100657
100725
|
context,
|
|
100658
100726
|
0 /* All */,
|
|
100659
100727
|
/*needsValue*/
|
|
@@ -100670,7 +100738,7 @@ ${lanes.join("\n")}
|
|
|
100670
100738
|
/*location*/
|
|
100671
100739
|
node.name
|
|
100672
100740
|
),
|
|
100673
|
-
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
100741
|
+
node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
|
|
100674
100742
|
);
|
|
100675
100743
|
}
|
|
100676
100744
|
}
|
|
@@ -101620,7 +101688,7 @@ ${lanes.join("\n")}
|
|
|
101620
101688
|
),
|
|
101621
101689
|
/*typeParameters*/
|
|
101622
101690
|
void 0,
|
|
101623
|
-
visitNodes2(node.parameters, visitor,
|
|
101691
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
101624
101692
|
/*type*/
|
|
101625
101693
|
void 0,
|
|
101626
101694
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -101994,7 +102062,7 @@ ${lanes.join("\n")}
|
|
|
101994
102062
|
}
|
|
101995
102063
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
101996
102064
|
} else {
|
|
101997
|
-
return visitNode(node, discardedValueVisitor,
|
|
102065
|
+
return visitNode(node, discardedValueVisitor, isForInitializer);
|
|
101998
102066
|
}
|
|
101999
102067
|
}
|
|
102000
102068
|
function visitDoStatement(node) {
|
|
@@ -102015,21 +102083,21 @@ ${lanes.join("\n")}
|
|
|
102015
102083
|
return factory2.updateLabeledStatement(
|
|
102016
102084
|
node,
|
|
102017
102085
|
node.label,
|
|
102018
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
102086
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
102019
102087
|
);
|
|
102020
102088
|
}
|
|
102021
102089
|
function visitWithStatement(node) {
|
|
102022
102090
|
return factory2.updateWithStatement(
|
|
102023
102091
|
node,
|
|
102024
102092
|
visitNode(node.expression, visitor, isExpression),
|
|
102025
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
102093
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
102026
102094
|
);
|
|
102027
102095
|
}
|
|
102028
102096
|
function visitSwitchStatement(node) {
|
|
102029
102097
|
return factory2.updateSwitchStatement(
|
|
102030
102098
|
node,
|
|
102031
102099
|
visitNode(node.expression, visitor, isExpression),
|
|
102032
|
-
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
102100
|
+
Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
|
|
102033
102101
|
);
|
|
102034
102102
|
}
|
|
102035
102103
|
function visitCaseBlock(node) {
|
|
@@ -102061,7 +102129,7 @@ ${lanes.join("\n")}
|
|
|
102061
102129
|
node = factory2.updateCatchClause(
|
|
102062
102130
|
node,
|
|
102063
102131
|
node.variableDeclaration,
|
|
102064
|
-
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
102132
|
+
Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
|
|
102065
102133
|
);
|
|
102066
102134
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
102067
102135
|
return node;
|
|
@@ -102131,7 +102199,7 @@ ${lanes.join("\n")}
|
|
|
102131
102199
|
}
|
|
102132
102200
|
function visitImportCallExpression(node) {
|
|
102133
102201
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
102134
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
102202
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
102135
102203
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
102136
102204
|
return factory2.createCallExpression(
|
|
102137
102205
|
factory2.createPropertyAccessExpression(
|
|
@@ -103275,7 +103343,7 @@ ${lanes.join("\n")}
|
|
|
103275
103343
|
sourceFile,
|
|
103276
103344
|
/*bundled*/
|
|
103277
103345
|
true
|
|
103278
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
103346
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
103279
103347
|
const newFile = factory2.updateSourceFile(
|
|
103280
103348
|
sourceFile,
|
|
103281
103349
|
[factory2.createModuleDeclaration(
|
|
@@ -103297,7 +103365,7 @@ ${lanes.join("\n")}
|
|
|
103297
103365
|
return newFile;
|
|
103298
103366
|
}
|
|
103299
103367
|
needsDeclare = true;
|
|
103300
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
103368
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
103301
103369
|
return factory2.updateSourceFile(
|
|
103302
103370
|
sourceFile,
|
|
103303
103371
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -103366,7 +103434,7 @@ ${lanes.join("\n")}
|
|
|
103366
103434
|
refs.forEach(referenceVisitor);
|
|
103367
103435
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
103368
103436
|
} else {
|
|
103369
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
103437
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
|
|
103370
103438
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
103371
103439
|
refs.forEach(referenceVisitor);
|
|
103372
103440
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -103483,9 +103551,9 @@ ${lanes.join("\n")}
|
|
|
103483
103551
|
return name;
|
|
103484
103552
|
} else {
|
|
103485
103553
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
103486
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
103554
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
103487
103555
|
} else {
|
|
103488
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
103556
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
103489
103557
|
}
|
|
103490
103558
|
}
|
|
103491
103559
|
function visitBindingElement(elem) {
|
|
@@ -103555,10 +103623,10 @@ ${lanes.join("\n")}
|
|
|
103555
103623
|
}
|
|
103556
103624
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
103557
103625
|
if (type && !shouldUseResolverType) {
|
|
103558
|
-
return visitNode(type, visitDeclarationSubtree);
|
|
103626
|
+
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
103559
103627
|
}
|
|
103560
103628
|
if (!getParseTreeNode(node)) {
|
|
103561
|
-
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
103629
|
+
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
103562
103630
|
}
|
|
103563
103631
|
if (node.kind === 175 /* SetAccessor */) {
|
|
103564
103632
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -103672,7 +103740,7 @@ ${lanes.join("\n")}
|
|
|
103672
103740
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
103673
103741
|
}
|
|
103674
103742
|
function ensureTypeParams(node, params) {
|
|
103675
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
103743
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
|
|
103676
103744
|
}
|
|
103677
103745
|
function isEnclosingDeclaration(node) {
|
|
103678
103746
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -103807,7 +103875,7 @@ ${lanes.join("\n")}
|
|
|
103807
103875
|
needsDeclare = priorNeedsDeclare;
|
|
103808
103876
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
103809
103877
|
}
|
|
103810
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
103878
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
103811
103879
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
103812
103880
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
103813
103881
|
const key = getOriginalNodeId(statement);
|
|
@@ -104021,7 +104089,7 @@ ${lanes.join("\n")}
|
|
|
104021
104089
|
input,
|
|
104022
104090
|
ensureModifiers(input),
|
|
104023
104091
|
updateParamsList(input, input.parameters),
|
|
104024
|
-
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
104092
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
104025
104093
|
));
|
|
104026
104094
|
}
|
|
104027
104095
|
case 257 /* VariableDeclaration */: {
|
|
@@ -104054,20 +104122,24 @@ ${lanes.join("\n")}
|
|
|
104054
104122
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
104055
104123
|
}
|
|
104056
104124
|
case 191 /* ConditionalType */: {
|
|
104057
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
104058
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
104125
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
|
|
104126
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
|
|
104059
104127
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
104060
104128
|
enclosingDeclaration = input.trueType;
|
|
104061
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
104129
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
|
|
104062
104130
|
enclosingDeclaration = oldEnclosingDecl;
|
|
104063
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
104131
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
|
|
104132
|
+
Debug.assert(checkType);
|
|
104133
|
+
Debug.assert(extendsType);
|
|
104134
|
+
Debug.assert(trueType);
|
|
104135
|
+
Debug.assert(falseType);
|
|
104064
104136
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
104065
104137
|
}
|
|
104066
104138
|
case 181 /* FunctionType */: {
|
|
104067
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
104139
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
104068
104140
|
}
|
|
104069
104141
|
case 182 /* ConstructorType */: {
|
|
104070
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
104142
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
104071
104143
|
}
|
|
104072
104144
|
case 202 /* ImportType */: {
|
|
104073
104145
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -104211,7 +104283,7 @@ ${lanes.join("\n")}
|
|
|
104211
104283
|
ensureModifiers(input),
|
|
104212
104284
|
input.name,
|
|
104213
104285
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
104214
|
-
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
104286
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
104215
104287
|
));
|
|
104216
104288
|
needsDeclare = previousNeedsDeclare;
|
|
104217
104289
|
return clean2;
|
|
@@ -104223,7 +104295,7 @@ ${lanes.join("\n")}
|
|
|
104223
104295
|
input.name,
|
|
104224
104296
|
ensureTypeParams(input, input.typeParameters),
|
|
104225
104297
|
transformHeritageClauses(input.heritageClauses),
|
|
104226
|
-
visitNodes2(input.members, visitDeclarationSubtree)
|
|
104298
|
+
visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
|
|
104227
104299
|
));
|
|
104228
104300
|
}
|
|
104229
104301
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -104340,7 +104412,7 @@ ${lanes.join("\n")}
|
|
|
104340
104412
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
104341
104413
|
resultHasScopeMarker = false;
|
|
104342
104414
|
needsScopeFixMarker = false;
|
|
104343
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
104415
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
|
|
104344
104416
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
104345
104417
|
if (input.flags & 16777216 /* Ambient */) {
|
|
104346
104418
|
needsScopeFixMarker = false;
|
|
@@ -104349,7 +104421,7 @@ ${lanes.join("\n")}
|
|
|
104349
104421
|
if (needsScopeFixMarker) {
|
|
104350
104422
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
104351
104423
|
} else {
|
|
104352
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
104424
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
|
|
104353
104425
|
}
|
|
104354
104426
|
}
|
|
104355
104427
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -104445,7 +104517,7 @@ ${lanes.join("\n")}
|
|
|
104445
104517
|
void 0
|
|
104446
104518
|
)
|
|
104447
104519
|
] : void 0;
|
|
104448
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
104520
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
104449
104521
|
const members = factory2.createNodeArray(memberNodes);
|
|
104450
104522
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
104451
104523
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -104469,11 +104541,11 @@ ${lanes.join("\n")}
|
|
|
104469
104541
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
104470
104542
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
104471
104543
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
104472
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
104544
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
104473
104545
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
104474
104546
|
return newClause;
|
|
104475
104547
|
}
|
|
104476
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
104548
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
|
|
104477
104549
|
}));
|
|
104478
104550
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
104479
104551
|
input,
|
|
@@ -104529,7 +104601,7 @@ ${lanes.join("\n")}
|
|
|
104529
104601
|
function transformVariableStatement(input) {
|
|
104530
104602
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
104531
104603
|
return;
|
|
104532
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
104604
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
|
|
104533
104605
|
if (!length(nodes))
|
|
104534
104606
|
return;
|
|
104535
104607
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -104620,7 +104692,7 @@ ${lanes.join("\n")}
|
|
|
104620
104692
|
function transformHeritageClauses(nodes) {
|
|
104621
104693
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
104622
104694
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
104623
|
-
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
104695
|
+
})), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
|
|
104624
104696
|
}
|
|
104625
104697
|
}
|
|
104626
104698
|
function isAlwaysType(node) {
|
|
@@ -114015,7 +114087,7 @@ ${lanes.join("\n")}
|
|
|
114015
114087
|
createOptionValueDiagnostic("importsNotUsedAsValues", Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
|
|
114016
114088
|
}
|
|
114017
114089
|
if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) {
|
|
114018
|
-
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.
|
|
114090
|
+
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
|
|
114019
114091
|
}
|
|
114020
114092
|
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
114021
114093
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
@@ -117432,6 +117504,9 @@ ${lanes.join("\n")}
|
|
|
117432
117504
|
}
|
|
117433
117505
|
);
|
|
117434
117506
|
return filesInError.map((fileName) => {
|
|
117507
|
+
if (fileName === void 0) {
|
|
117508
|
+
return void 0;
|
|
117509
|
+
}
|
|
117435
117510
|
const diagnosticForFileName = find(
|
|
117436
117511
|
diagnostics,
|
|
117437
117512
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -118121,6 +118196,8 @@ ${lanes.join("\n")}
|
|
|
118121
118196
|
parseConfigFile2();
|
|
118122
118197
|
newLine = updateNewLine();
|
|
118123
118198
|
}
|
|
118199
|
+
Debug.assert(compilerOptions);
|
|
118200
|
+
Debug.assert(rootFileNames);
|
|
118124
118201
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
118125
118202
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
118126
118203
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -118223,6 +118300,8 @@ ${lanes.join("\n")}
|
|
|
118223
118300
|
}
|
|
118224
118301
|
function synchronizeProgram() {
|
|
118225
118302
|
writeLog(`Synchronizing program`);
|
|
118303
|
+
Debug.assert(compilerOptions);
|
|
118304
|
+
Debug.assert(rootFileNames);
|
|
118226
118305
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
118227
118306
|
const program = getCurrentBuilderProgram();
|
|
118228
118307
|
if (hasChangedCompilerOptions) {
|
|
@@ -118462,6 +118541,8 @@ ${lanes.join("\n")}
|
|
|
118462
118541
|
}
|
|
118463
118542
|
function reloadFileNamesFromConfigFile() {
|
|
118464
118543
|
writeLog("Reloading new file names and options");
|
|
118544
|
+
Debug.assert(compilerOptions);
|
|
118545
|
+
Debug.assert(configFileName);
|
|
118465
118546
|
reloadLevel = 0 /* None */;
|
|
118466
118547
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
118467
118548
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -118470,6 +118551,7 @@ ${lanes.join("\n")}
|
|
|
118470
118551
|
synchronizeProgram();
|
|
118471
118552
|
}
|
|
118472
118553
|
function reloadConfigFile() {
|
|
118554
|
+
Debug.assert(configFileName);
|
|
118473
118555
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
118474
118556
|
reloadLevel = 0 /* None */;
|
|
118475
118557
|
if (cachedDirectoryStructureHost) {
|
|
@@ -118482,6 +118564,7 @@ ${lanes.join("\n")}
|
|
|
118482
118564
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
118483
118565
|
}
|
|
118484
118566
|
function parseConfigFile2() {
|
|
118567
|
+
Debug.assert(configFileName);
|
|
118485
118568
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
118486
118569
|
configFileName,
|
|
118487
118570
|
optionsToExtendForConfigFile,
|
|
@@ -118509,6 +118592,7 @@ ${lanes.join("\n")}
|
|
|
118509
118592
|
return config.parsedCommandLine;
|
|
118510
118593
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
118511
118594
|
writeLog("Reloading new file names and options");
|
|
118595
|
+
Debug.assert(compilerOptions);
|
|
118512
118596
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
118513
118597
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
118514
118598
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -118600,7 +118684,8 @@ ${lanes.join("\n")}
|
|
|
118600
118684
|
return watchDirectory(
|
|
118601
118685
|
directory,
|
|
118602
118686
|
(fileOrDirectory) => {
|
|
118603
|
-
Debug.assert(
|
|
118687
|
+
Debug.assert(configFileName);
|
|
118688
|
+
Debug.assert(compilerOptions);
|
|
118604
118689
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
118605
118690
|
if (cachedDirectoryStructureHost) {
|
|
118606
118691
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -118631,6 +118716,7 @@ ${lanes.join("\n")}
|
|
|
118631
118716
|
);
|
|
118632
118717
|
}
|
|
118633
118718
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
118719
|
+
Debug.assert(configFileName);
|
|
118634
118720
|
updateSharedExtendedConfigFileWatcher(
|
|
118635
118721
|
forProjectPath,
|
|
118636
118722
|
options,
|
|
@@ -124096,7 +124182,7 @@ ${lanes.join("\n")}
|
|
|
124096
124182
|
if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) {
|
|
124097
124183
|
return false;
|
|
124098
124184
|
}
|
|
124099
|
-
return isInJSFile(declaration) || !findAncestor(declaration, isGlobalScopeAugmentation);
|
|
124185
|
+
return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d));
|
|
124100
124186
|
}
|
|
124101
124187
|
function isDeprecatedDeclaration(decl) {
|
|
124102
124188
|
return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */);
|
|
@@ -133520,7 +133606,7 @@ ${lanes.join("\n")}
|
|
|
133520
133606
|
if (!param.type) {
|
|
133521
133607
|
const paramType = getJSDocType(param);
|
|
133522
133608
|
if (paramType)
|
|
133523
|
-
changes.tryInsertTypeAnnotation(sourceFile, param,
|
|
133609
|
+
changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode));
|
|
133524
133610
|
}
|
|
133525
133611
|
}
|
|
133526
133612
|
if (needParens)
|
|
@@ -133528,12 +133614,12 @@ ${lanes.join("\n")}
|
|
|
133528
133614
|
if (!decl.type) {
|
|
133529
133615
|
const returnType = getJSDocReturnType(decl);
|
|
133530
133616
|
if (returnType)
|
|
133531
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
133617
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode));
|
|
133532
133618
|
}
|
|
133533
133619
|
} else {
|
|
133534
133620
|
const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist");
|
|
133535
133621
|
Debug.assert(!decl.type, "The JSDocType decl should have a type");
|
|
133536
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
133622
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode));
|
|
133537
133623
|
}
|
|
133538
133624
|
}
|
|
133539
133625
|
function isDeclarationWithType(node) {
|
|
@@ -133570,19 +133656,19 @@ ${lanes.join("\n")}
|
|
|
133570
133656
|
void 0,
|
|
133571
133657
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
133572
133658
|
isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
133573
|
-
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
133659
|
+
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
133574
133660
|
)));
|
|
133575
133661
|
setEmitFlags(typeNode, 1 /* SingleLine */);
|
|
133576
133662
|
return typeNode;
|
|
133577
133663
|
}
|
|
133578
133664
|
function transformJSDocOptionalType(node) {
|
|
133579
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
133665
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
133580
133666
|
}
|
|
133581
133667
|
function transformJSDocNullableType(node) {
|
|
133582
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
133668
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
133583
133669
|
}
|
|
133584
133670
|
function transformJSDocVariadicType(node) {
|
|
133585
|
-
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType));
|
|
133671
|
+
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode));
|
|
133586
133672
|
}
|
|
133587
133673
|
function transformJSDocFunctionType(node) {
|
|
133588
133674
|
var _a2;
|
|
@@ -133593,7 +133679,7 @@ ${lanes.join("\n")}
|
|
|
133593
133679
|
const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;
|
|
133594
133680
|
const name = node.name || (isRest ? "rest" : "arg" + index);
|
|
133595
133681
|
const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken;
|
|
133596
|
-
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType), node.initializer);
|
|
133682
|
+
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer);
|
|
133597
133683
|
}
|
|
133598
133684
|
function transformJSDocTypeReference(node) {
|
|
133599
133685
|
let name = node.typeName;
|
|
@@ -133620,7 +133706,7 @@ ${lanes.join("\n")}
|
|
|
133620
133706
|
if ((text === "Array" || text === "Promise") && !node.typeArguments) {
|
|
133621
133707
|
args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]);
|
|
133622
133708
|
} else {
|
|
133623
|
-
args = visitNodes2(node.typeArguments, transformJSDocType);
|
|
133709
|
+
args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode);
|
|
133624
133710
|
}
|
|
133625
133711
|
}
|
|
133626
133712
|
return factory.createTypeReferenceNode(name, args);
|
|
@@ -136200,13 +136286,19 @@ ${lanes.join("\n")}
|
|
|
136200
136286
|
if (isUMDExportSymbol(umdSymbol))
|
|
136201
136287
|
return umdSymbol;
|
|
136202
136288
|
const { parent: parent2 } = token;
|
|
136203
|
-
|
|
136204
|
-
checker.
|
|
136205
|
-
|
|
136206
|
-
|
|
136207
|
-
|
|
136208
|
-
|
|
136209
|
-
|
|
136289
|
+
if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) {
|
|
136290
|
+
const parentSymbol = checker.resolveName(
|
|
136291
|
+
checker.getJsxNamespace(parent2),
|
|
136292
|
+
isJsxOpeningLikeElement(parent2) ? token : parent2,
|
|
136293
|
+
111551 /* Value */,
|
|
136294
|
+
/*excludeGlobals*/
|
|
136295
|
+
false
|
|
136296
|
+
);
|
|
136297
|
+
if (isUMDExportSymbol(parentSymbol)) {
|
|
136298
|
+
return parentSymbol;
|
|
136299
|
+
}
|
|
136300
|
+
}
|
|
136301
|
+
return void 0;
|
|
136210
136302
|
}
|
|
136211
136303
|
function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) {
|
|
136212
136304
|
switch (exportKind) {
|
|
@@ -141658,18 +141750,17 @@ ${lanes.join("\n")}
|
|
|
141658
141750
|
}
|
|
141659
141751
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
|
141660
141752
|
let symbols;
|
|
141661
|
-
const typeNode = visitNode(importTypeNode, visit);
|
|
141753
|
+
const typeNode = visitNode(importTypeNode, visit, isTypeNode);
|
|
141662
141754
|
if (symbols && typeNode) {
|
|
141663
141755
|
return { typeNode, symbols };
|
|
141664
141756
|
}
|
|
141665
141757
|
function visit(node) {
|
|
141666
|
-
var _a2;
|
|
141667
141758
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
|
141668
141759
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
|
141669
141760
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
|
141670
141761
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
|
141671
141762
|
symbols = append(symbols, firstIdentifier.symbol);
|
|
141672
|
-
const typeArguments = (
|
|
141763
|
+
const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode);
|
|
141673
141764
|
return factory.createTypeReferenceNode(qualifier, typeArguments);
|
|
141674
141765
|
}
|
|
141675
141766
|
return visitEachChild(node, visit, nullTransformationContext);
|
|
@@ -156289,7 +156380,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156289
156380
|
let ignoreReturns = false;
|
|
156290
156381
|
const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);
|
|
156291
156382
|
if (hasWritesOrVariableDeclarations || substitutions.size) {
|
|
156292
|
-
const rewrittenStatements = visitNodes2(statements, visitor).slice();
|
|
156383
|
+
const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice();
|
|
156293
156384
|
if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {
|
|
156294
156385
|
const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);
|
|
156295
156386
|
if (assignments.length === 1) {
|
|
@@ -156317,7 +156408,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156317
156408
|
if (!returnValueProperty) {
|
|
156318
156409
|
returnValueProperty = "__return";
|
|
156319
156410
|
}
|
|
156320
|
-
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor)));
|
|
156411
|
+
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression)));
|
|
156321
156412
|
}
|
|
156322
156413
|
if (assignments.length === 1) {
|
|
156323
156414
|
return factory.createReturnStatement(assignments[0].name);
|
|
@@ -158885,6 +158976,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158885
158976
|
if (!visited) {
|
|
158886
158977
|
return visited;
|
|
158887
158978
|
}
|
|
158979
|
+
Debug.assert(nodes);
|
|
158888
158980
|
const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;
|
|
158889
158981
|
setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));
|
|
158890
158982
|
return nodeArray;
|
|
@@ -171552,6 +171644,7 @@ ${json}${newLine}`;
|
|
|
171552
171644
|
constructor(opts) {
|
|
171553
171645
|
this.changeSeq = 0;
|
|
171554
171646
|
this.handlers = new Map(Object.entries({
|
|
171647
|
+
// TODO(jakebailey): correctly type the handlers
|
|
171555
171648
|
[CommandNames.Status]: () => {
|
|
171556
171649
|
const response = { version };
|
|
171557
171650
|
return this.requiredResponse(response);
|
|
@@ -176428,6 +176521,7 @@ ${e.message}`;
|
|
|
176428
176521
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
176429
176522
|
isArray: () => isArray,
|
|
176430
176523
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
176524
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
176431
176525
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
176432
176526
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
176433
176527
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -176460,6 +176554,7 @@ ${e.message}`;
|
|
|
176460
176554
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
176461
176555
|
isBindingElement: () => isBindingElement,
|
|
176462
176556
|
isBindingName: () => isBindingName,
|
|
176557
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
176463
176558
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
176464
176559
|
isBindingPattern: () => isBindingPattern,
|
|
176465
176560
|
isBlock: () => isBlock,
|
|
@@ -176666,6 +176761,7 @@ ${e.message}`;
|
|
|
176666
176761
|
isInferTypeNode: () => isInferTypeNode,
|
|
176667
176762
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
176668
176763
|
isInitializedProperty: () => isInitializedProperty,
|
|
176764
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
176669
176765
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
176670
176766
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
176671
176767
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -176772,6 +176868,7 @@ ${e.message}`;
|
|
|
176772
176868
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
176773
176869
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
176774
176870
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
176871
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
176775
176872
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
176776
176873
|
isLocalName: () => isLocalName,
|
|
176777
176874
|
isLogicalOperator: () => isLogicalOperator,
|
|
@@ -179085,6 +179182,7 @@ ${e.message}`;
|
|
|
179085
179182
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
179086
179183
|
isArray: () => isArray,
|
|
179087
179184
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
179185
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
179088
179186
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
179089
179187
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
179090
179188
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -179117,6 +179215,7 @@ ${e.message}`;
|
|
|
179117
179215
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
179118
179216
|
isBindingElement: () => isBindingElement,
|
|
179119
179217
|
isBindingName: () => isBindingName,
|
|
179218
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
179120
179219
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
179121
179220
|
isBindingPattern: () => isBindingPattern,
|
|
179122
179221
|
isBlock: () => isBlock,
|
|
@@ -179323,6 +179422,7 @@ ${e.message}`;
|
|
|
179323
179422
|
isInferTypeNode: () => isInferTypeNode,
|
|
179324
179423
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
179325
179424
|
isInitializedProperty: () => isInitializedProperty,
|
|
179425
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
179326
179426
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
179327
179427
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
179328
179428
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -179429,6 +179529,7 @@ ${e.message}`;
|
|
|
179429
179529
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
179430
179530
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
179431
179531
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
179532
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
179432
179533
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
179433
179534
|
isLocalName: () => isLocalName,
|
|
179434
179535
|
isLogicalOperator: () => isLogicalOperator,
|