typescript 5.0.0-dev.20221116 → 5.0.0-dev.20221117
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 +83 -79
- package/lib/tsserver.js +109 -101
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +109 -101
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +109 -101
- 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.20221117`;
|
|
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);
|
|
@@ -54273,7 +54277,7 @@ ${lanes.join("\n")}
|
|
|
54273
54277
|
return compareSignaturesRelated(
|
|
54274
54278
|
source,
|
|
54275
54279
|
target,
|
|
54276
|
-
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0
|
|
54280
|
+
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,
|
|
54277
54281
|
false,
|
|
54278
54282
|
void 0,
|
|
54279
54283
|
void 0,
|
|
@@ -54507,7 +54511,9 @@ ${lanes.join("\n")}
|
|
|
54507
54511
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
54508
54512
|
if (s & 1 /* Any */)
|
|
54509
54513
|
return true;
|
|
54510
|
-
if (s &
|
|
54514
|
+
if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */))
|
|
54515
|
+
return true;
|
|
54516
|
+
if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value))
|
|
54511
54517
|
return true;
|
|
54512
54518
|
if (isUnknownLikeUnionType(target))
|
|
54513
54519
|
return true;
|
|
@@ -57570,7 +57576,7 @@ ${lanes.join("\n")}
|
|
|
57570
57576
|
pos = p;
|
|
57571
57577
|
}
|
|
57572
57578
|
}
|
|
57573
|
-
function inferTypes(inferences, originalSource, originalTarget, priority = 0
|
|
57579
|
+
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
57574
57580
|
let bivariant = false;
|
|
57575
57581
|
let propagationType;
|
|
57576
57582
|
let inferencePriority = 2048 /* MaxValue */;
|
|
@@ -60012,8 +60018,8 @@ ${lanes.join("\n")}
|
|
|
60012
60018
|
}
|
|
60013
60019
|
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
60014
60020
|
const links = getNodeLinks(parent2);
|
|
60015
|
-
if (!(links.flags &
|
|
60016
|
-
links.flags |=
|
|
60021
|
+
if (!(links.flags & 524288 /* AssignmentsMarked */)) {
|
|
60022
|
+
links.flags |= 524288 /* AssignmentsMarked */;
|
|
60017
60023
|
if (!hasParentWithAssignmentsMarked(parent2)) {
|
|
60018
60024
|
markNodeAssignments(parent2);
|
|
60019
60025
|
}
|
|
@@ -60021,7 +60027,7 @@ ${lanes.join("\n")}
|
|
|
60021
60027
|
return symbol.isAssigned || false;
|
|
60022
60028
|
}
|
|
60023
60029
|
function hasParentWithAssignmentsMarked(node) {
|
|
60024
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
60030
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */));
|
|
60025
60031
|
}
|
|
60026
60032
|
function markNodeAssignments(node) {
|
|
60027
60033
|
if (node.kind === 79 /* Identifier */) {
|
|
@@ -60100,11 +60106,11 @@ ${lanes.join("\n")}
|
|
|
60100
60106
|
const parent2 = declaration.parent.parent;
|
|
60101
60107
|
if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) {
|
|
60102
60108
|
const links = getNodeLinks(parent2);
|
|
60103
|
-
if (!(links.flags &
|
|
60104
|
-
links.flags |=
|
|
60109
|
+
if (!(links.flags & 16777216 /* InCheckIdentifier */)) {
|
|
60110
|
+
links.flags |= 16777216 /* InCheckIdentifier */;
|
|
60105
60111
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
60106
60112
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
60107
|
-
links.flags &= ~
|
|
60113
|
+
links.flags &= ~16777216 /* InCheckIdentifier */;
|
|
60108
60114
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
60109
60115
|
const pattern = declaration.parent;
|
|
60110
60116
|
const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode);
|
|
@@ -60154,7 +60160,7 @@ ${lanes.join("\n")}
|
|
|
60154
60160
|
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
60161
|
}
|
|
60156
60162
|
}
|
|
60157
|
-
getNodeLinks(container).flags |=
|
|
60163
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
60158
60164
|
return getTypeOfSymbol(symbol);
|
|
60159
60165
|
}
|
|
60160
60166
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -60171,8 +60177,8 @@ ${lanes.join("\n")}
|
|
|
60171
60177
|
let container = getContainingClass(node);
|
|
60172
60178
|
while (container !== void 0) {
|
|
60173
60179
|
if (container === declaration && container.name !== node) {
|
|
60174
|
-
getNodeLinks(declaration).flags |=
|
|
60175
|
-
getNodeLinks(node).flags |=
|
|
60180
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60181
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60176
60182
|
break;
|
|
60177
60183
|
}
|
|
60178
60184
|
container = getContainingClass(container);
|
|
@@ -60182,8 +60188,8 @@ ${lanes.join("\n")}
|
|
|
60182
60188
|
while (container.kind !== 308 /* SourceFile */) {
|
|
60183
60189
|
if (container.parent === declaration) {
|
|
60184
60190
|
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
60185
|
-
getNodeLinks(declaration).flags |=
|
|
60186
|
-
getNodeLinks(node).flags |=
|
|
60191
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60192
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60187
60193
|
}
|
|
60188
60194
|
break;
|
|
60189
60195
|
}
|
|
@@ -60297,7 +60303,7 @@ ${lanes.join("\n")}
|
|
|
60297
60303
|
const part = getPartOfForStatementContainingNode(node.parent, container);
|
|
60298
60304
|
if (part) {
|
|
60299
60305
|
const links = getNodeLinks(part);
|
|
60300
|
-
links.flags |=
|
|
60306
|
+
links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;
|
|
60301
60307
|
const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);
|
|
60302
60308
|
pushIfUnique(capturedBindings, symbol);
|
|
60303
60309
|
if (part === container.initializer) {
|
|
@@ -60307,19 +60313,19 @@ ${lanes.join("\n")}
|
|
|
60307
60313
|
}
|
|
60308
60314
|
}
|
|
60309
60315
|
if (capturesBlockScopeBindingInLoopBody) {
|
|
60310
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
60316
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
60311
60317
|
}
|
|
60312
60318
|
}
|
|
60313
60319
|
if (isForStatement(container)) {
|
|
60314
60320
|
const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */);
|
|
60315
60321
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
60316
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60322
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */;
|
|
60317
60323
|
}
|
|
60318
60324
|
}
|
|
60319
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60325
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
60320
60326
|
}
|
|
60321
60327
|
if (isCaptured) {
|
|
60322
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60328
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;
|
|
60323
60329
|
}
|
|
60324
60330
|
}
|
|
60325
60331
|
function isBindingCapturedByNode(node, decl) {
|
|
@@ -60536,23 +60542,23 @@ ${lanes.join("\n")}
|
|
|
60536
60542
|
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
|
60537
60543
|
}
|
|
60538
60544
|
if (isStatic(container) || isCallExpression2) {
|
|
60539
|
-
nodeCheckFlag =
|
|
60545
|
+
nodeCheckFlag = 32 /* SuperStatic */;
|
|
60540
60546
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
60541
60547
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
60542
60548
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
60543
|
-
getNodeLinks(current).flags |=
|
|
60549
|
+
getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */;
|
|
60544
60550
|
}
|
|
60545
60551
|
});
|
|
60546
60552
|
}
|
|
60547
60553
|
} else {
|
|
60548
|
-
nodeCheckFlag =
|
|
60554
|
+
nodeCheckFlag = 16 /* SuperInstance */;
|
|
60549
60555
|
}
|
|
60550
60556
|
getNodeLinks(node).flags |= nodeCheckFlag;
|
|
60551
60557
|
if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) {
|
|
60552
60558
|
if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {
|
|
60553
|
-
getNodeLinks(container).flags |=
|
|
60559
|
+
getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;
|
|
60554
60560
|
} else {
|
|
60555
|
-
getNodeLinks(container).flags |=
|
|
60561
|
+
getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;
|
|
60556
60562
|
}
|
|
60557
60563
|
}
|
|
60558
60564
|
if (needToCaptureLexicalThis) {
|
|
@@ -60580,7 +60586,7 @@ ${lanes.join("\n")}
|
|
|
60580
60586
|
error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
|
|
60581
60587
|
return errorType;
|
|
60582
60588
|
}
|
|
60583
|
-
return nodeCheckFlag ===
|
|
60589
|
+
return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);
|
|
60584
60590
|
function isLegalUsageOfSuperExpression(container2) {
|
|
60585
60591
|
if (!container2) {
|
|
60586
60592
|
return false;
|
|
@@ -61595,9 +61601,9 @@ ${lanes.join("\n")}
|
|
|
61595
61601
|
const container = getEnclosingBlockScopeContainer(node.parent.parent);
|
|
61596
61602
|
const enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
61597
61603
|
if (enclosingIterationStatement) {
|
|
61598
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
61599
|
-
getNodeLinks(node).flags |=
|
|
61600
|
-
getNodeLinks(node.parent.parent).flags |=
|
|
61604
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
61605
|
+
getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61606
|
+
getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61601
61607
|
}
|
|
61602
61608
|
}
|
|
61603
61609
|
if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
|
|
@@ -65584,10 +65590,10 @@ ${lanes.join("\n")}
|
|
|
65584
65590
|
}
|
|
65585
65591
|
function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
|
|
65586
65592
|
const links = getNodeLinks(node);
|
|
65587
|
-
if (!(links.flags &
|
|
65593
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65588
65594
|
const contextualSignature = getContextualSignature(node);
|
|
65589
|
-
if (!(links.flags &
|
|
65590
|
-
links.flags |=
|
|
65595
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65596
|
+
links.flags |= 64 /* ContextChecked */;
|
|
65591
65597
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */));
|
|
65592
65598
|
if (!signature) {
|
|
65593
65599
|
return;
|
|
@@ -67577,13 +67583,13 @@ ${lanes.join("\n")}
|
|
|
67577
67583
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
67578
67584
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
67579
67585
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
67580
|
-
getNodeLinks(lexicalScope).flags |=
|
|
67586
|
+
getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */;
|
|
67581
67587
|
}
|
|
67582
67588
|
if (isClassExpression(node.parent)) {
|
|
67583
67589
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
67584
67590
|
if (enclosingIterationStatement) {
|
|
67585
|
-
getNodeLinks(node.name).flags |=
|
|
67586
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
67591
|
+
getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
67592
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
67587
67593
|
}
|
|
67588
67594
|
}
|
|
67589
67595
|
}
|
|
@@ -69178,7 +69184,7 @@ ${lanes.join("\n")}
|
|
|
69178
69184
|
}
|
|
69179
69185
|
function checkWeakMapSetCollision(node) {
|
|
69180
69186
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
69181
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
69187
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) {
|
|
69182
69188
|
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
69189
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
69184
69190
|
}
|
|
@@ -69192,18 +69198,18 @@ ${lanes.join("\n")}
|
|
|
69192
69198
|
let hasCollision = false;
|
|
69193
69199
|
if (isClassExpression(node)) {
|
|
69194
69200
|
for (const member of node.members) {
|
|
69195
|
-
if (getNodeCheckFlags(member) &
|
|
69201
|
+
if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69196
69202
|
hasCollision = true;
|
|
69197
69203
|
break;
|
|
69198
69204
|
}
|
|
69199
69205
|
}
|
|
69200
69206
|
} else if (isFunctionExpression(node)) {
|
|
69201
|
-
if (getNodeCheckFlags(node) &
|
|
69207
|
+
if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69202
69208
|
hasCollision = true;
|
|
69203
69209
|
}
|
|
69204
69210
|
} else {
|
|
69205
69211
|
const container = getEnclosingBlockScopeContainer(node);
|
|
69206
|
-
if (container && getNodeCheckFlags(container) &
|
|
69212
|
+
if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69207
69213
|
hasCollision = true;
|
|
69208
69214
|
}
|
|
69209
69215
|
}
|
|
@@ -71088,8 +71094,8 @@ ${lanes.join("\n")}
|
|
|
71088
71094
|
}
|
|
71089
71095
|
function computeEnumMemberValues(node) {
|
|
71090
71096
|
const nodeLinks2 = getNodeLinks(node);
|
|
71091
|
-
if (!(nodeLinks2.flags &
|
|
71092
|
-
nodeLinks2.flags |=
|
|
71097
|
+
if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {
|
|
71098
|
+
nodeLinks2.flags |= 1024 /* EnumValuesComputed */;
|
|
71093
71099
|
let autoValue = 0;
|
|
71094
71100
|
for (const member of node.members) {
|
|
71095
71101
|
const value = computeMemberValue(member, autoValue);
|
|
@@ -71365,7 +71371,7 @@ ${lanes.join("\n")}
|
|
|
71365
71371
|
}
|
|
71366
71372
|
const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */);
|
|
71367
71373
|
if (mergedClass && inSameLexicalScope(node, mergedClass)) {
|
|
71368
|
-
getNodeLinks(node).flags |=
|
|
71374
|
+
getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;
|
|
71369
71375
|
}
|
|
71370
71376
|
}
|
|
71371
71377
|
if (isAmbientExternalModule) {
|
|
@@ -72996,8 +73002,8 @@ ${lanes.join("\n")}
|
|
|
72996
73002
|
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
72997
73003
|
if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, void 0, void 0, false)) {
|
|
72998
73004
|
links.isDeclarationWithCollidingName = true;
|
|
72999
|
-
} else if (nodeLinks2.flags &
|
|
73000
|
-
const isDeclaredInLoop = nodeLinks2.flags &
|
|
73005
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
73006
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
73001
73007
|
const inLoopInitializer = isIterationStatement(container, false);
|
|
73002
73008
|
const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement(container.parent, false);
|
|
73003
73009
|
links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);
|
|
@@ -75299,6 +75305,7 @@ ${lanes.join("\n")}
|
|
|
75299
75305
|
return CheckMode3;
|
|
75300
75306
|
})(CheckMode || {});
|
|
75301
75307
|
SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
75308
|
+
SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None";
|
|
75302
75309
|
SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback";
|
|
75303
75310
|
SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback";
|
|
75304
75311
|
SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes";
|
|
@@ -80303,12 +80310,12 @@ ${lanes.join("\n")}
|
|
|
80303
80310
|
function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {
|
|
80304
80311
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
80305
80312
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
80306
|
-
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) &
|
|
80313
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */;
|
|
80307
80314
|
let temp;
|
|
80308
80315
|
function createClassTempVar() {
|
|
80309
80316
|
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
80310
|
-
const isClassWithConstructorReference2 = classCheckFlags &
|
|
80311
|
-
const requiresBlockScopedVar = classCheckFlags &
|
|
80317
|
+
const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
|
|
80318
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
80312
80319
|
return factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
|
|
80313
80320
|
}
|
|
80314
80321
|
if (facts & 2 /* NeedsClassConstructorReference */) {
|
|
@@ -80821,7 +80828,7 @@ ${lanes.join("\n")}
|
|
|
80821
80828
|
}
|
|
80822
80829
|
function trySubstituteClassAlias(node) {
|
|
80823
80830
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
80824
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
80831
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
80825
80832
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
80826
80833
|
if (declaration) {
|
|
80827
80834
|
const classAlias = classAliases[declaration.id];
|
|
@@ -80844,7 +80851,7 @@ ${lanes.join("\n")}
|
|
|
80844
80851
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
80845
80852
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
80846
80853
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
80847
|
-
if (resolver.getNodeCheckFlags(name) &
|
|
80854
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
80848
80855
|
addBlockScopedVariable(generatedName);
|
|
80849
80856
|
} else {
|
|
80850
80857
|
hoistVariableDeclaration(generatedName);
|
|
@@ -80993,7 +81000,7 @@ ${lanes.join("\n")}
|
|
|
80993
81000
|
const { className } = getPrivateIdentifierEnvironment();
|
|
80994
81001
|
const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_";
|
|
80995
81002
|
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) &
|
|
81003
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
80997
81004
|
addBlockScopedVariable(identifier);
|
|
80998
81005
|
} else {
|
|
80999
81006
|
hoistVariableDeclaration(identifier);
|
|
@@ -81877,7 +81884,7 @@ ${lanes.join("\n")}
|
|
|
81877
81884
|
}
|
|
81878
81885
|
}
|
|
81879
81886
|
function getClassAliasIfNeeded(node) {
|
|
81880
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81887
|
+
if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) {
|
|
81881
81888
|
enableSubstitutionForClassAliases();
|
|
81882
81889
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
81883
81890
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -81911,7 +81918,7 @@ ${lanes.join("\n")}
|
|
|
81911
81918
|
}
|
|
81912
81919
|
function trySubstituteClassAlias(node) {
|
|
81913
81920
|
if (classAliases) {
|
|
81914
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81921
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
81915
81922
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
81916
81923
|
if (declaration) {
|
|
81917
81924
|
const classAlias = classAliases[declaration.id];
|
|
@@ -81952,7 +81959,7 @@ ${lanes.join("\n")}
|
|
|
81952
81959
|
let capturedSuperProperties;
|
|
81953
81960
|
let hasSuperElementAccess;
|
|
81954
81961
|
const substitutedSuperAccessors = [];
|
|
81955
|
-
let contextFlags = 0
|
|
81962
|
+
let contextFlags = 0 /* None */;
|
|
81956
81963
|
const previousOnEmitNode = context.onEmitNode;
|
|
81957
81964
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
81958
81965
|
context.onEmitNode = onEmitNode;
|
|
@@ -82279,7 +82286,7 @@ ${lanes.join("\n")}
|
|
|
82279
82286
|
hasSuperElementAccess = false;
|
|
82280
82287
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
82281
82288
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
82282
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82289
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
82283
82290
|
if (emitSuperHelpers) {
|
|
82284
82291
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82285
82292
|
if (capturedSuperProperties.size) {
|
|
@@ -82290,9 +82297,9 @@ ${lanes.join("\n")}
|
|
|
82290
82297
|
updated = factory2.updateBlock(updated, statements);
|
|
82291
82298
|
}
|
|
82292
82299
|
if (hasSuperElementAccess) {
|
|
82293
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82300
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82294
82301
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
82295
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82302
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82296
82303
|
addEmitHelper(updated, asyncSuperHelper);
|
|
82297
82304
|
}
|
|
82298
82305
|
}
|
|
@@ -82307,7 +82314,7 @@ ${lanes.join("\n")}
|
|
|
82307
82314
|
const nodeType = original.type;
|
|
82308
82315
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
82309
82316
|
const isArrowFunction2 = node.kind === 216 /* ArrowFunction */;
|
|
82310
|
-
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) &
|
|
82317
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
82311
82318
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
82312
82319
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
82313
82320
|
for (const parameter of node.parameters) {
|
|
@@ -82334,7 +82341,7 @@ ${lanes.join("\n")}
|
|
|
82334
82341
|
)
|
|
82335
82342
|
);
|
|
82336
82343
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
82337
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82344
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
82338
82345
|
if (emitSuperHelpers) {
|
|
82339
82346
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82340
82347
|
if (capturedSuperProperties.size) {
|
|
@@ -82346,9 +82353,9 @@ ${lanes.join("\n")}
|
|
|
82346
82353
|
const block = factory2.createBlock(statements, true);
|
|
82347
82354
|
setTextRange(block, node.body);
|
|
82348
82355
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
82349
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82356
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82350
82357
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
82351
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82358
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82352
82359
|
addEmitHelper(block, asyncSuperHelper);
|
|
82353
82360
|
}
|
|
82354
82361
|
}
|
|
@@ -82408,7 +82415,7 @@ ${lanes.join("\n")}
|
|
|
82408
82415
|
}
|
|
82409
82416
|
function onEmitNode(hint, node, emitCallback) {
|
|
82410
82417
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
82411
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
82418
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
82412
82419
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
82413
82420
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
82414
82421
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -82484,7 +82491,7 @@ ${lanes.join("\n")}
|
|
|
82484
82491
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
82485
82492
|
}
|
|
82486
82493
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
82487
|
-
if (enclosingSuperContainerFlags &
|
|
82494
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82488
82495
|
return setTextRange(
|
|
82489
82496
|
factory2.createPropertyAccessExpression(
|
|
82490
82497
|
factory2.createCallExpression(
|
|
@@ -82509,7 +82516,7 @@ ${lanes.join("\n")}
|
|
|
82509
82516
|
}
|
|
82510
82517
|
}
|
|
82511
82518
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
82512
|
-
const hasBinding = (resolver.getNodeCheckFlags(node) &
|
|
82519
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
82513
82520
|
const accessors = [];
|
|
82514
82521
|
names.forEach((_, key) => {
|
|
82515
82522
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -83453,7 +83460,7 @@ ${lanes.join("\n")}
|
|
|
83453
83460
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
83454
83461
|
)
|
|
83455
83462
|
);
|
|
83456
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
83463
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
83457
83464
|
if (emitSuperHelpers) {
|
|
83458
83465
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
83459
83466
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -83464,9 +83471,9 @@ ${lanes.join("\n")}
|
|
|
83464
83471
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
83465
83472
|
const block = factory2.updateBlock(node.body, statements);
|
|
83466
83473
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
83467
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
83474
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83468
83475
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
83469
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
83476
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
83470
83477
|
addEmitHelper(block, asyncSuperHelper);
|
|
83471
83478
|
}
|
|
83472
83479
|
}
|
|
@@ -83576,7 +83583,7 @@ ${lanes.join("\n")}
|
|
|
83576
83583
|
}
|
|
83577
83584
|
function onEmitNode(hint, node, emitCallback) {
|
|
83578
83585
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
83579
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
83586
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
83580
83587
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
83581
83588
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
83582
83589
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -83652,7 +83659,7 @@ ${lanes.join("\n")}
|
|
|
83652
83659
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
83653
83660
|
}
|
|
83654
83661
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
83655
|
-
if (enclosingSuperContainerFlags &
|
|
83662
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83656
83663
|
return setTextRange(
|
|
83657
83664
|
factory2.createPropertyAccessExpression(
|
|
83658
83665
|
factory2.createCallExpression(
|
|
@@ -86051,8 +86058,8 @@ ${lanes.join("\n")}
|
|
|
86051
86058
|
}
|
|
86052
86059
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
86053
86060
|
const flags = resolver.getNodeCheckFlags(node);
|
|
86054
|
-
const isCapturedInFunction = flags &
|
|
86055
|
-
const isDeclaredInLoop = flags &
|
|
86061
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
86062
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
86056
86063
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
86057
86064
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
86058
86065
|
return emitExplicitInitializer;
|
|
@@ -86413,7 +86420,7 @@ ${lanes.join("\n")}
|
|
|
86413
86420
|
return factory2.inlineExpressions(expressions);
|
|
86414
86421
|
}
|
|
86415
86422
|
function shouldConvertPartOfIterationStatement(node) {
|
|
86416
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86423
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
86417
86424
|
}
|
|
86418
86425
|
function shouldConvertInitializerOfForStatement(node) {
|
|
86419
86426
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -86428,7 +86435,7 @@ ${lanes.join("\n")}
|
|
|
86428
86435
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
86429
86436
|
}
|
|
86430
86437
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
86431
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86438
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
86432
86439
|
}
|
|
86433
86440
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
86434
86441
|
if (!state.hoistedLocalVariables) {
|
|
@@ -86889,10 +86896,10 @@ ${lanes.join("\n")}
|
|
|
86889
86896
|
} else {
|
|
86890
86897
|
loopParameters.push(factory2.createParameterDeclaration(void 0, void 0, name));
|
|
86891
86898
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
86892
|
-
if (checkFlags &
|
|
86899
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
86893
86900
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
86894
|
-
let flags = 0
|
|
86895
|
-
if (checkFlags &
|
|
86901
|
+
let flags = 0 /* None */;
|
|
86902
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */) {
|
|
86896
86903
|
flags |= 1 /* Body */;
|
|
86897
86904
|
}
|
|
86898
86905
|
if (isForStatement(container)) {
|
|
@@ -144609,6 +144616,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
144609
144616
|
init_ts4();
|
|
144610
144617
|
anyContext = emptyArray;
|
|
144611
144618
|
RuleAction = /* @__PURE__ */ ((RuleAction2) => {
|
|
144619
|
+
RuleAction2[RuleAction2["None"] = 0] = "None";
|
|
144612
144620
|
RuleAction2[RuleAction2["StopProcessingSpaceActions"] = 1] = "StopProcessingSpaceActions";
|
|
144613
144621
|
RuleAction2[RuleAction2["StopProcessingTokenActions"] = 2] = "StopProcessingTokenActions";
|
|
144614
144622
|
RuleAction2[RuleAction2["InsertSpace"] = 4] = "InsertSpace";
|
|
@@ -145264,7 +145272,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
145264
145272
|
return rulesMapCache;
|
|
145265
145273
|
}
|
|
145266
145274
|
function getRuleActionExclusion(ruleAction) {
|
|
145267
|
-
let mask2 = 0
|
|
145275
|
+
let mask2 = 0 /* None */;
|
|
145268
145276
|
if (ruleAction & 1 /* StopProcessingSpaceActions */) {
|
|
145269
145277
|
mask2 |= 28 /* ModifySpaceAction */;
|
|
145270
145278
|
}
|