typescript 5.0.0-dev.20221116 → 5.0.0-dev.20221118
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 +98 -81
- package/lib/tsserver.js +124 -103
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +124 -103
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +124 -103
- package/lib/typingsInstaller.js +3 -1
- package/package.json +1 -1
package/lib/typescript.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-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20221118`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4320,6 +4320,7 @@ ${lanes.join("\n")}
|
|
|
4320
4320
|
return EnumKind2;
|
|
4321
4321
|
})(EnumKind || {});
|
|
4322
4322
|
CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
|
|
4323
|
+
CheckFlags2[CheckFlags2["None"] = 0] = "None";
|
|
4323
4324
|
CheckFlags2[CheckFlags2["Instantiated"] = 1] = "Instantiated";
|
|
4324
4325
|
CheckFlags2[CheckFlags2["SyntheticProperty"] = 2] = "SyntheticProperty";
|
|
4325
4326
|
CheckFlags2[CheckFlags2["SyntheticMethod"] = 4] = "SyntheticMethod";
|
|
@@ -4367,31 +4368,32 @@ ${lanes.join("\n")}
|
|
|
4367
4368
|
return InternalSymbolName2;
|
|
4368
4369
|
})(InternalSymbolName || {});
|
|
4369
4370
|
NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
|
|
4371
|
+
NodeCheckFlags2[NodeCheckFlags2["None"] = 0] = "None";
|
|
4370
4372
|
NodeCheckFlags2[NodeCheckFlags2["TypeChecked"] = 1] = "TypeChecked";
|
|
4371
4373
|
NodeCheckFlags2[NodeCheckFlags2["LexicalThis"] = 2] = "LexicalThis";
|
|
4372
4374
|
NodeCheckFlags2[NodeCheckFlags2["CaptureThis"] = 4] = "CaptureThis";
|
|
4373
4375
|
NodeCheckFlags2[NodeCheckFlags2["CaptureNewTarget"] = 8] = "CaptureNewTarget";
|
|
4374
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] =
|
|
4375
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] =
|
|
4376
|
-
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] =
|
|
4377
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] =
|
|
4378
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] =
|
|
4379
|
-
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] =
|
|
4380
|
-
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] =
|
|
4381
|
-
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] =
|
|
4382
|
-
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] =
|
|
4383
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] =
|
|
4384
|
-
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] =
|
|
4385
|
-
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] =
|
|
4386
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] =
|
|
4387
|
-
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] =
|
|
4388
|
-
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] =
|
|
4389
|
-
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] =
|
|
4390
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] =
|
|
4391
|
-
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] =
|
|
4392
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] =
|
|
4393
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] =
|
|
4394
|
-
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] =
|
|
4376
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] = 16] = "SuperInstance";
|
|
4377
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] = 32] = "SuperStatic";
|
|
4378
|
+
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] = 64] = "ContextChecked";
|
|
4379
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
|
|
4380
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
|
|
4381
|
+
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] = 512] = "CaptureArguments";
|
|
4382
|
+
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
|
|
4383
|
+
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
|
|
4384
|
+
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
|
|
4385
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
|
|
4386
|
+
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
|
|
4387
|
+
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
|
|
4388
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding";
|
|
4389
|
+
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding";
|
|
4390
|
+
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter";
|
|
4391
|
+
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked";
|
|
4392
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference";
|
|
4393
|
+
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass";
|
|
4394
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers";
|
|
4395
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer";
|
|
4396
|
+
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier";
|
|
4395
4397
|
return NodeCheckFlags2;
|
|
4396
4398
|
})(NodeCheckFlags || {});
|
|
4397
4399
|
TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
@@ -4464,6 +4466,7 @@ ${lanes.join("\n")}
|
|
|
4464
4466
|
return TypeFlags2;
|
|
4465
4467
|
})(TypeFlags || {});
|
|
4466
4468
|
ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
4469
|
+
ObjectFlags3[ObjectFlags3["None"] = 0] = "None";
|
|
4467
4470
|
ObjectFlags3[ObjectFlags3["Class"] = 1] = "Class";
|
|
4468
4471
|
ObjectFlags3[ObjectFlags3["Interface"] = 2] = "Interface";
|
|
4469
4472
|
ObjectFlags3[ObjectFlags3["Reference"] = 4] = "Reference";
|
|
@@ -4581,6 +4584,7 @@ ${lanes.join("\n")}
|
|
|
4581
4584
|
return TypeMapKind2;
|
|
4582
4585
|
})(TypeMapKind || {});
|
|
4583
4586
|
InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {
|
|
4587
|
+
InferencePriority2[InferencePriority2["None"] = 0] = "None";
|
|
4584
4588
|
InferencePriority2[InferencePriority2["NakedTypeVariable"] = 1] = "NakedTypeVariable";
|
|
4585
4589
|
InferencePriority2[InferencePriority2["SpeculativeTuple"] = 2] = "SpeculativeTuple";
|
|
4586
4590
|
InferencePriority2[InferencePriority2["SubstituteSource"] = 4] = "SubstituteSource";
|
|
@@ -40376,7 +40380,7 @@ ${lanes.join("\n")}
|
|
|
40376
40380
|
function SymbolLinks() {
|
|
40377
40381
|
}
|
|
40378
40382
|
function NodeLinks() {
|
|
40379
|
-
this.flags = 0
|
|
40383
|
+
this.flags = 0 /* None */;
|
|
40380
40384
|
}
|
|
40381
40385
|
function getNodeId(node) {
|
|
40382
40386
|
if (!node.id) {
|
|
@@ -41221,7 +41225,7 @@ ${lanes.join("\n")}
|
|
|
41221
41225
|
function createSymbol(flags, name, checkFlags) {
|
|
41222
41226
|
symbolCount++;
|
|
41223
41227
|
const symbol = new Symbol46(flags | 33554432 /* Transient */, name);
|
|
41224
|
-
symbol.checkFlags = checkFlags || 0
|
|
41228
|
+
symbol.checkFlags = checkFlags || 0 /* None */;
|
|
41225
41229
|
return symbol;
|
|
41226
41230
|
}
|
|
41227
41231
|
function getExcludedSymbolFlags(flags) {
|
|
@@ -43532,7 +43536,7 @@ ${lanes.join("\n")}
|
|
|
43532
43536
|
function createOriginType(flags) {
|
|
43533
43537
|
return new Type27(checker, flags);
|
|
43534
43538
|
}
|
|
43535
|
-
function createIntrinsicType(kind, intrinsicName, objectFlags = 0) {
|
|
43539
|
+
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
|
|
43536
43540
|
const type = createType(kind);
|
|
43537
43541
|
type.intrinsicName = intrinsicName;
|
|
43538
43542
|
type.objectFlags = objectFlags;
|
|
@@ -50373,7 +50377,7 @@ ${lanes.join("\n")}
|
|
|
50373
50377
|
function containsArgumentsReference(declaration) {
|
|
50374
50378
|
const links = getNodeLinks(declaration);
|
|
50375
50379
|
if (links.containsArgumentsReference === void 0) {
|
|
50376
|
-
if (links.flags &
|
|
50380
|
+
if (links.flags & 512 /* CaptureArguments */) {
|
|
50377
50381
|
links.containsArgumentsReference = true;
|
|
50378
50382
|
} else {
|
|
50379
50383
|
links.containsArgumentsReference = traverse(declaration.body);
|
|
@@ -50895,8 +50899,21 @@ ${lanes.join("\n")}
|
|
|
50895
50899
|
return errorType;
|
|
50896
50900
|
}
|
|
50897
50901
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
50898
|
-
|
|
50899
|
-
|
|
50902
|
+
let newAliasSymbol = aliasSymbol && (isLocalTypeAlias(symbol) || !isLocalTypeAlias(aliasSymbol)) ? aliasSymbol : void 0;
|
|
50903
|
+
let aliasTypeArguments;
|
|
50904
|
+
if (newAliasSymbol) {
|
|
50905
|
+
aliasTypeArguments = getTypeArgumentsForAliasSymbol(newAliasSymbol);
|
|
50906
|
+
} else if (isTypeReferenceType(node)) {
|
|
50907
|
+
const aliasSymbol2 = resolveTypeReferenceName(node, 2097152 /* Alias */, true);
|
|
50908
|
+
if (aliasSymbol2 && aliasSymbol2 !== unknownSymbol) {
|
|
50909
|
+
const resolved = resolveAlias(aliasSymbol2);
|
|
50910
|
+
if (resolved && resolved.flags & 524288 /* TypeAlias */) {
|
|
50911
|
+
newAliasSymbol = resolved;
|
|
50912
|
+
aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node);
|
|
50913
|
+
}
|
|
50914
|
+
}
|
|
50915
|
+
}
|
|
50916
|
+
return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, aliasTypeArguments);
|
|
50900
50917
|
}
|
|
50901
50918
|
return checkNoTypeArguments(node, symbol) ? type : errorType;
|
|
50902
50919
|
}
|
|
@@ -54273,7 +54290,7 @@ ${lanes.join("\n")}
|
|
|
54273
54290
|
return compareSignaturesRelated(
|
|
54274
54291
|
source,
|
|
54275
54292
|
target,
|
|
54276
|
-
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0
|
|
54293
|
+
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,
|
|
54277
54294
|
false,
|
|
54278
54295
|
void 0,
|
|
54279
54296
|
void 0,
|
|
@@ -54507,7 +54524,9 @@ ${lanes.join("\n")}
|
|
|
54507
54524
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
54508
54525
|
if (s & 1 /* Any */)
|
|
54509
54526
|
return true;
|
|
54510
|
-
if (s &
|
|
54527
|
+
if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */))
|
|
54528
|
+
return true;
|
|
54529
|
+
if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value))
|
|
54511
54530
|
return true;
|
|
54512
54531
|
if (isUnknownLikeUnionType(target))
|
|
54513
54532
|
return true;
|
|
@@ -57570,7 +57589,7 @@ ${lanes.join("\n")}
|
|
|
57570
57589
|
pos = p;
|
|
57571
57590
|
}
|
|
57572
57591
|
}
|
|
57573
|
-
function inferTypes(inferences, originalSource, originalTarget, priority = 0
|
|
57592
|
+
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
57574
57593
|
let bivariant = false;
|
|
57575
57594
|
let propagationType;
|
|
57576
57595
|
let inferencePriority = 2048 /* MaxValue */;
|
|
@@ -60012,8 +60031,8 @@ ${lanes.join("\n")}
|
|
|
60012
60031
|
}
|
|
60013
60032
|
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
60014
60033
|
const links = getNodeLinks(parent2);
|
|
60015
|
-
if (!(links.flags &
|
|
60016
|
-
links.flags |=
|
|
60034
|
+
if (!(links.flags & 524288 /* AssignmentsMarked */)) {
|
|
60035
|
+
links.flags |= 524288 /* AssignmentsMarked */;
|
|
60017
60036
|
if (!hasParentWithAssignmentsMarked(parent2)) {
|
|
60018
60037
|
markNodeAssignments(parent2);
|
|
60019
60038
|
}
|
|
@@ -60021,7 +60040,7 @@ ${lanes.join("\n")}
|
|
|
60021
60040
|
return symbol.isAssigned || false;
|
|
60022
60041
|
}
|
|
60023
60042
|
function hasParentWithAssignmentsMarked(node) {
|
|
60024
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
60043
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */));
|
|
60025
60044
|
}
|
|
60026
60045
|
function markNodeAssignments(node) {
|
|
60027
60046
|
if (node.kind === 79 /* Identifier */) {
|
|
@@ -60100,11 +60119,11 @@ ${lanes.join("\n")}
|
|
|
60100
60119
|
const parent2 = declaration.parent.parent;
|
|
60101
60120
|
if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) {
|
|
60102
60121
|
const links = getNodeLinks(parent2);
|
|
60103
|
-
if (!(links.flags &
|
|
60104
|
-
links.flags |=
|
|
60122
|
+
if (!(links.flags & 16777216 /* InCheckIdentifier */)) {
|
|
60123
|
+
links.flags |= 16777216 /* InCheckIdentifier */;
|
|
60105
60124
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
60106
60125
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
60107
|
-
links.flags &= ~
|
|
60126
|
+
links.flags &= ~16777216 /* InCheckIdentifier */;
|
|
60108
60127
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
60109
60128
|
const pattern = declaration.parent;
|
|
60110
60129
|
const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode);
|
|
@@ -60154,7 +60173,7 @@ ${lanes.join("\n")}
|
|
|
60154
60173
|
error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
|
|
60155
60174
|
}
|
|
60156
60175
|
}
|
|
60157
|
-
getNodeLinks(container).flags |=
|
|
60176
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
60158
60177
|
return getTypeOfSymbol(symbol);
|
|
60159
60178
|
}
|
|
60160
60179
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -60171,8 +60190,8 @@ ${lanes.join("\n")}
|
|
|
60171
60190
|
let container = getContainingClass(node);
|
|
60172
60191
|
while (container !== void 0) {
|
|
60173
60192
|
if (container === declaration && container.name !== node) {
|
|
60174
|
-
getNodeLinks(declaration).flags |=
|
|
60175
|
-
getNodeLinks(node).flags |=
|
|
60193
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60194
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60176
60195
|
break;
|
|
60177
60196
|
}
|
|
60178
60197
|
container = getContainingClass(container);
|
|
@@ -60182,8 +60201,8 @@ ${lanes.join("\n")}
|
|
|
60182
60201
|
while (container.kind !== 308 /* SourceFile */) {
|
|
60183
60202
|
if (container.parent === declaration) {
|
|
60184
60203
|
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
60185
|
-
getNodeLinks(declaration).flags |=
|
|
60186
|
-
getNodeLinks(node).flags |=
|
|
60204
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60205
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60187
60206
|
}
|
|
60188
60207
|
break;
|
|
60189
60208
|
}
|
|
@@ -60297,7 +60316,7 @@ ${lanes.join("\n")}
|
|
|
60297
60316
|
const part = getPartOfForStatementContainingNode(node.parent, container);
|
|
60298
60317
|
if (part) {
|
|
60299
60318
|
const links = getNodeLinks(part);
|
|
60300
|
-
links.flags |=
|
|
60319
|
+
links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;
|
|
60301
60320
|
const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);
|
|
60302
60321
|
pushIfUnique(capturedBindings, symbol);
|
|
60303
60322
|
if (part === container.initializer) {
|
|
@@ -60307,19 +60326,19 @@ ${lanes.join("\n")}
|
|
|
60307
60326
|
}
|
|
60308
60327
|
}
|
|
60309
60328
|
if (capturesBlockScopeBindingInLoopBody) {
|
|
60310
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
60329
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
60311
60330
|
}
|
|
60312
60331
|
}
|
|
60313
60332
|
if (isForStatement(container)) {
|
|
60314
60333
|
const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */);
|
|
60315
60334
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
60316
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60335
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */;
|
|
60317
60336
|
}
|
|
60318
60337
|
}
|
|
60319
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60338
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
60320
60339
|
}
|
|
60321
60340
|
if (isCaptured) {
|
|
60322
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60341
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;
|
|
60323
60342
|
}
|
|
60324
60343
|
}
|
|
60325
60344
|
function isBindingCapturedByNode(node, decl) {
|
|
@@ -60536,23 +60555,23 @@ ${lanes.join("\n")}
|
|
|
60536
60555
|
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
|
60537
60556
|
}
|
|
60538
60557
|
if (isStatic(container) || isCallExpression2) {
|
|
60539
|
-
nodeCheckFlag =
|
|
60558
|
+
nodeCheckFlag = 32 /* SuperStatic */;
|
|
60540
60559
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
60541
60560
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
60542
60561
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
60543
|
-
getNodeLinks(current).flags |=
|
|
60562
|
+
getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */;
|
|
60544
60563
|
}
|
|
60545
60564
|
});
|
|
60546
60565
|
}
|
|
60547
60566
|
} else {
|
|
60548
|
-
nodeCheckFlag =
|
|
60567
|
+
nodeCheckFlag = 16 /* SuperInstance */;
|
|
60549
60568
|
}
|
|
60550
60569
|
getNodeLinks(node).flags |= nodeCheckFlag;
|
|
60551
60570
|
if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) {
|
|
60552
60571
|
if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {
|
|
60553
|
-
getNodeLinks(container).flags |=
|
|
60572
|
+
getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;
|
|
60554
60573
|
} else {
|
|
60555
|
-
getNodeLinks(container).flags |=
|
|
60574
|
+
getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;
|
|
60556
60575
|
}
|
|
60557
60576
|
}
|
|
60558
60577
|
if (needToCaptureLexicalThis) {
|
|
@@ -60580,7 +60599,7 @@ ${lanes.join("\n")}
|
|
|
60580
60599
|
error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
|
|
60581
60600
|
return errorType;
|
|
60582
60601
|
}
|
|
60583
|
-
return nodeCheckFlag ===
|
|
60602
|
+
return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);
|
|
60584
60603
|
function isLegalUsageOfSuperExpression(container2) {
|
|
60585
60604
|
if (!container2) {
|
|
60586
60605
|
return false;
|
|
@@ -61595,9 +61614,9 @@ ${lanes.join("\n")}
|
|
|
61595
61614
|
const container = getEnclosingBlockScopeContainer(node.parent.parent);
|
|
61596
61615
|
const enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
61597
61616
|
if (enclosingIterationStatement) {
|
|
61598
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
61599
|
-
getNodeLinks(node).flags |=
|
|
61600
|
-
getNodeLinks(node.parent.parent).flags |=
|
|
61617
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
61618
|
+
getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61619
|
+
getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61601
61620
|
}
|
|
61602
61621
|
}
|
|
61603
61622
|
if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
|
|
@@ -65584,10 +65603,10 @@ ${lanes.join("\n")}
|
|
|
65584
65603
|
}
|
|
65585
65604
|
function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
|
|
65586
65605
|
const links = getNodeLinks(node);
|
|
65587
|
-
if (!(links.flags &
|
|
65606
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65588
65607
|
const contextualSignature = getContextualSignature(node);
|
|
65589
|
-
if (!(links.flags &
|
|
65590
|
-
links.flags |=
|
|
65608
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65609
|
+
links.flags |= 64 /* ContextChecked */;
|
|
65591
65610
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */));
|
|
65592
65611
|
if (!signature) {
|
|
65593
65612
|
return;
|
|
@@ -67577,13 +67596,13 @@ ${lanes.join("\n")}
|
|
|
67577
67596
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
67578
67597
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
67579
67598
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
67580
|
-
getNodeLinks(lexicalScope).flags |=
|
|
67599
|
+
getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */;
|
|
67581
67600
|
}
|
|
67582
67601
|
if (isClassExpression(node.parent)) {
|
|
67583
67602
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
67584
67603
|
if (enclosingIterationStatement) {
|
|
67585
|
-
getNodeLinks(node.name).flags |=
|
|
67586
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
67604
|
+
getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
67605
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
67587
67606
|
}
|
|
67588
67607
|
}
|
|
67589
67608
|
}
|
|
@@ -69178,7 +69197,7 @@ ${lanes.join("\n")}
|
|
|
69178
69197
|
}
|
|
69179
69198
|
function checkWeakMapSetCollision(node) {
|
|
69180
69199
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
69181
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
69200
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) {
|
|
69182
69201
|
Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
|
|
69183
69202
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
69184
69203
|
}
|
|
@@ -69192,18 +69211,18 @@ ${lanes.join("\n")}
|
|
|
69192
69211
|
let hasCollision = false;
|
|
69193
69212
|
if (isClassExpression(node)) {
|
|
69194
69213
|
for (const member of node.members) {
|
|
69195
|
-
if (getNodeCheckFlags(member) &
|
|
69214
|
+
if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69196
69215
|
hasCollision = true;
|
|
69197
69216
|
break;
|
|
69198
69217
|
}
|
|
69199
69218
|
}
|
|
69200
69219
|
} else if (isFunctionExpression(node)) {
|
|
69201
|
-
if (getNodeCheckFlags(node) &
|
|
69220
|
+
if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69202
69221
|
hasCollision = true;
|
|
69203
69222
|
}
|
|
69204
69223
|
} else {
|
|
69205
69224
|
const container = getEnclosingBlockScopeContainer(node);
|
|
69206
|
-
if (container && getNodeCheckFlags(container) &
|
|
69225
|
+
if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69207
69226
|
hasCollision = true;
|
|
69208
69227
|
}
|
|
69209
69228
|
}
|
|
@@ -71088,8 +71107,8 @@ ${lanes.join("\n")}
|
|
|
71088
71107
|
}
|
|
71089
71108
|
function computeEnumMemberValues(node) {
|
|
71090
71109
|
const nodeLinks2 = getNodeLinks(node);
|
|
71091
|
-
if (!(nodeLinks2.flags &
|
|
71092
|
-
nodeLinks2.flags |=
|
|
71110
|
+
if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {
|
|
71111
|
+
nodeLinks2.flags |= 1024 /* EnumValuesComputed */;
|
|
71093
71112
|
let autoValue = 0;
|
|
71094
71113
|
for (const member of node.members) {
|
|
71095
71114
|
const value = computeMemberValue(member, autoValue);
|
|
@@ -71365,7 +71384,7 @@ ${lanes.join("\n")}
|
|
|
71365
71384
|
}
|
|
71366
71385
|
const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */);
|
|
71367
71386
|
if (mergedClass && inSameLexicalScope(node, mergedClass)) {
|
|
71368
|
-
getNodeLinks(node).flags |=
|
|
71387
|
+
getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;
|
|
71369
71388
|
}
|
|
71370
71389
|
}
|
|
71371
71390
|
if (isAmbientExternalModule) {
|
|
@@ -72996,8 +73015,8 @@ ${lanes.join("\n")}
|
|
|
72996
73015
|
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
72997
73016
|
if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, void 0, void 0, false)) {
|
|
72998
73017
|
links.isDeclarationWithCollidingName = true;
|
|
72999
|
-
} else if (nodeLinks2.flags &
|
|
73000
|
-
const isDeclaredInLoop = nodeLinks2.flags &
|
|
73018
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
73019
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
73001
73020
|
const inLoopInitializer = isIterationStatement(container, false);
|
|
73002
73021
|
const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement(container.parent, false);
|
|
73003
73022
|
links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);
|
|
@@ -75299,6 +75318,7 @@ ${lanes.join("\n")}
|
|
|
75299
75318
|
return CheckMode3;
|
|
75300
75319
|
})(CheckMode || {});
|
|
75301
75320
|
SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
75321
|
+
SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None";
|
|
75302
75322
|
SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback";
|
|
75303
75323
|
SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback";
|
|
75304
75324
|
SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes";
|
|
@@ -80303,12 +80323,12 @@ ${lanes.join("\n")}
|
|
|
80303
80323
|
function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {
|
|
80304
80324
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
80305
80325
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
80306
|
-
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) &
|
|
80326
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */;
|
|
80307
80327
|
let temp;
|
|
80308
80328
|
function createClassTempVar() {
|
|
80309
80329
|
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
80310
|
-
const isClassWithConstructorReference2 = classCheckFlags &
|
|
80311
|
-
const requiresBlockScopedVar = classCheckFlags &
|
|
80330
|
+
const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
|
|
80331
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
80312
80332
|
return factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
|
|
80313
80333
|
}
|
|
80314
80334
|
if (facts & 2 /* NeedsClassConstructorReference */) {
|
|
@@ -80821,7 +80841,7 @@ ${lanes.join("\n")}
|
|
|
80821
80841
|
}
|
|
80822
80842
|
function trySubstituteClassAlias(node) {
|
|
80823
80843
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
80824
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
80844
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
80825
80845
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
80826
80846
|
if (declaration) {
|
|
80827
80847
|
const classAlias = classAliases[declaration.id];
|
|
@@ -80844,7 +80864,7 @@ ${lanes.join("\n")}
|
|
|
80844
80864
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
80845
80865
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
80846
80866
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
80847
|
-
if (resolver.getNodeCheckFlags(name) &
|
|
80867
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
80848
80868
|
addBlockScopedVariable(generatedName);
|
|
80849
80869
|
} else {
|
|
80850
80870
|
hoistVariableDeclaration(generatedName);
|
|
@@ -80993,7 +81013,7 @@ ${lanes.join("\n")}
|
|
|
80993
81013
|
const { className } = getPrivateIdentifierEnvironment();
|
|
80994
81014
|
const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_";
|
|
80995
81015
|
const identifier = typeof name === "object" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === "string" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable(void 0, true, prefix, suffix);
|
|
80996
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81016
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
80997
81017
|
addBlockScopedVariable(identifier);
|
|
80998
81018
|
} else {
|
|
80999
81019
|
hoistVariableDeclaration(identifier);
|
|
@@ -81877,7 +81897,7 @@ ${lanes.join("\n")}
|
|
|
81877
81897
|
}
|
|
81878
81898
|
}
|
|
81879
81899
|
function getClassAliasIfNeeded(node) {
|
|
81880
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81900
|
+
if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) {
|
|
81881
81901
|
enableSubstitutionForClassAliases();
|
|
81882
81902
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
81883
81903
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -81911,7 +81931,7 @@ ${lanes.join("\n")}
|
|
|
81911
81931
|
}
|
|
81912
81932
|
function trySubstituteClassAlias(node) {
|
|
81913
81933
|
if (classAliases) {
|
|
81914
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81934
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
81915
81935
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
81916
81936
|
if (declaration) {
|
|
81917
81937
|
const classAlias = classAliases[declaration.id];
|
|
@@ -81952,7 +81972,7 @@ ${lanes.join("\n")}
|
|
|
81952
81972
|
let capturedSuperProperties;
|
|
81953
81973
|
let hasSuperElementAccess;
|
|
81954
81974
|
const substitutedSuperAccessors = [];
|
|
81955
|
-
let contextFlags = 0
|
|
81975
|
+
let contextFlags = 0 /* None */;
|
|
81956
81976
|
const previousOnEmitNode = context.onEmitNode;
|
|
81957
81977
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
81958
81978
|
context.onEmitNode = onEmitNode;
|
|
@@ -82279,7 +82299,7 @@ ${lanes.join("\n")}
|
|
|
82279
82299
|
hasSuperElementAccess = false;
|
|
82280
82300
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
82281
82301
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
82282
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82302
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
82283
82303
|
if (emitSuperHelpers) {
|
|
82284
82304
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82285
82305
|
if (capturedSuperProperties.size) {
|
|
@@ -82290,9 +82310,9 @@ ${lanes.join("\n")}
|
|
|
82290
82310
|
updated = factory2.updateBlock(updated, statements);
|
|
82291
82311
|
}
|
|
82292
82312
|
if (hasSuperElementAccess) {
|
|
82293
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82313
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82294
82314
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
82295
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82315
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82296
82316
|
addEmitHelper(updated, asyncSuperHelper);
|
|
82297
82317
|
}
|
|
82298
82318
|
}
|
|
@@ -82307,7 +82327,7 @@ ${lanes.join("\n")}
|
|
|
82307
82327
|
const nodeType = original.type;
|
|
82308
82328
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
82309
82329
|
const isArrowFunction2 = node.kind === 216 /* ArrowFunction */;
|
|
82310
|
-
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) &
|
|
82330
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
82311
82331
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
82312
82332
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
82313
82333
|
for (const parameter of node.parameters) {
|
|
@@ -82334,7 +82354,7 @@ ${lanes.join("\n")}
|
|
|
82334
82354
|
)
|
|
82335
82355
|
);
|
|
82336
82356
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
82337
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82357
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
82338
82358
|
if (emitSuperHelpers) {
|
|
82339
82359
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82340
82360
|
if (capturedSuperProperties.size) {
|
|
@@ -82346,9 +82366,9 @@ ${lanes.join("\n")}
|
|
|
82346
82366
|
const block = factory2.createBlock(statements, true);
|
|
82347
82367
|
setTextRange(block, node.body);
|
|
82348
82368
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
82349
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82369
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82350
82370
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
82351
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82371
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82352
82372
|
addEmitHelper(block, asyncSuperHelper);
|
|
82353
82373
|
}
|
|
82354
82374
|
}
|
|
@@ -82408,7 +82428,7 @@ ${lanes.join("\n")}
|
|
|
82408
82428
|
}
|
|
82409
82429
|
function onEmitNode(hint, node, emitCallback) {
|
|
82410
82430
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
82411
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
82431
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
82412
82432
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
82413
82433
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
82414
82434
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -82484,7 +82504,7 @@ ${lanes.join("\n")}
|
|
|
82484
82504
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
82485
82505
|
}
|
|
82486
82506
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
82487
|
-
if (enclosingSuperContainerFlags &
|
|
82507
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82488
82508
|
return setTextRange(
|
|
82489
82509
|
factory2.createPropertyAccessExpression(
|
|
82490
82510
|
factory2.createCallExpression(
|
|
@@ -82509,7 +82529,7 @@ ${lanes.join("\n")}
|
|
|
82509
82529
|
}
|
|
82510
82530
|
}
|
|
82511
82531
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
82512
|
-
const hasBinding = (resolver.getNodeCheckFlags(node) &
|
|
82532
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
82513
82533
|
const accessors = [];
|
|
82514
82534
|
names.forEach((_, key) => {
|
|
82515
82535
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -83453,7 +83473,7 @@ ${lanes.join("\n")}
|
|
|
83453
83473
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
83454
83474
|
)
|
|
83455
83475
|
);
|
|
83456
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
83476
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
83457
83477
|
if (emitSuperHelpers) {
|
|
83458
83478
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
83459
83479
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -83464,9 +83484,9 @@ ${lanes.join("\n")}
|
|
|
83464
83484
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
83465
83485
|
const block = factory2.updateBlock(node.body, statements);
|
|
83466
83486
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
83467
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
83487
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83468
83488
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
83469
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
83489
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
83470
83490
|
addEmitHelper(block, asyncSuperHelper);
|
|
83471
83491
|
}
|
|
83472
83492
|
}
|
|
@@ -83576,7 +83596,7 @@ ${lanes.join("\n")}
|
|
|
83576
83596
|
}
|
|
83577
83597
|
function onEmitNode(hint, node, emitCallback) {
|
|
83578
83598
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
83579
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
83599
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
83580
83600
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
83581
83601
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
83582
83602
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -83652,7 +83672,7 @@ ${lanes.join("\n")}
|
|
|
83652
83672
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
83653
83673
|
}
|
|
83654
83674
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
83655
|
-
if (enclosingSuperContainerFlags &
|
|
83675
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83656
83676
|
return setTextRange(
|
|
83657
83677
|
factory2.createPropertyAccessExpression(
|
|
83658
83678
|
factory2.createCallExpression(
|
|
@@ -86051,8 +86071,8 @@ ${lanes.join("\n")}
|
|
|
86051
86071
|
}
|
|
86052
86072
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
86053
86073
|
const flags = resolver.getNodeCheckFlags(node);
|
|
86054
|
-
const isCapturedInFunction = flags &
|
|
86055
|
-
const isDeclaredInLoop = flags &
|
|
86074
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
86075
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
86056
86076
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
86057
86077
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
86058
86078
|
return emitExplicitInitializer;
|
|
@@ -86413,7 +86433,7 @@ ${lanes.join("\n")}
|
|
|
86413
86433
|
return factory2.inlineExpressions(expressions);
|
|
86414
86434
|
}
|
|
86415
86435
|
function shouldConvertPartOfIterationStatement(node) {
|
|
86416
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86436
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
86417
86437
|
}
|
|
86418
86438
|
function shouldConvertInitializerOfForStatement(node) {
|
|
86419
86439
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -86428,7 +86448,7 @@ ${lanes.join("\n")}
|
|
|
86428
86448
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
86429
86449
|
}
|
|
86430
86450
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
86431
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86451
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
86432
86452
|
}
|
|
86433
86453
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
86434
86454
|
if (!state.hoistedLocalVariables) {
|
|
@@ -86889,10 +86909,10 @@ ${lanes.join("\n")}
|
|
|
86889
86909
|
} else {
|
|
86890
86910
|
loopParameters.push(factory2.createParameterDeclaration(void 0, void 0, name));
|
|
86891
86911
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
86892
|
-
if (checkFlags &
|
|
86912
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
86893
86913
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
86894
|
-
let flags = 0
|
|
86895
|
-
if (checkFlags &
|
|
86914
|
+
let flags = 0 /* None */;
|
|
86915
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */) {
|
|
86896
86916
|
flags |= 1 /* Body */;
|
|
86897
86917
|
}
|
|
86898
86918
|
if (isForStatement(container)) {
|
|
@@ -144609,6 +144629,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
144609
144629
|
init_ts4();
|
|
144610
144630
|
anyContext = emptyArray;
|
|
144611
144631
|
RuleAction = /* @__PURE__ */ ((RuleAction2) => {
|
|
144632
|
+
RuleAction2[RuleAction2["None"] = 0] = "None";
|
|
144612
144633
|
RuleAction2[RuleAction2["StopProcessingSpaceActions"] = 1] = "StopProcessingSpaceActions";
|
|
144613
144634
|
RuleAction2[RuleAction2["StopProcessingTokenActions"] = 2] = "StopProcessingTokenActions";
|
|
144614
144635
|
RuleAction2[RuleAction2["InsertSpace"] = 4] = "InsertSpace";
|
|
@@ -145264,7 +145285,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
145264
145285
|
return rulesMapCache;
|
|
145265
145286
|
}
|
|
145266
145287
|
function getRuleActionExclusion(ruleAction) {
|
|
145267
|
-
let mask2 = 0
|
|
145288
|
+
let mask2 = 0 /* None */;
|
|
145268
145289
|
if (ruleAction & 1 /* StopProcessingSpaceActions */) {
|
|
145269
145290
|
mask2 |= 28 /* ModifySpaceAction */;
|
|
145270
145291
|
}
|