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/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20221118`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -3660,6 +3660,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
3660
3660
|
return TypeFlags2;
|
|
3661
3661
|
})(TypeFlags || {});
|
|
3662
3662
|
var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
3663
|
+
ObjectFlags3[ObjectFlags3["None"] = 0] = "None";
|
|
3663
3664
|
ObjectFlags3[ObjectFlags3["Class"] = 1] = "Class";
|
|
3664
3665
|
ObjectFlags3[ObjectFlags3["Interface"] = 2] = "Interface";
|
|
3665
3666
|
ObjectFlags3[ObjectFlags3["Reference"] = 4] = "Reference";
|
|
@@ -38060,6 +38061,7 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => {
|
|
|
38060
38061
|
return CheckMode3;
|
|
38061
38062
|
})(CheckMode || {});
|
|
38062
38063
|
var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
38064
|
+
SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None";
|
|
38063
38065
|
SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback";
|
|
38064
38066
|
SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback";
|
|
38065
38067
|
SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes";
|
|
@@ -38077,7 +38079,7 @@ var intrinsicTypeKinds = new Map(getEntries({
|
|
|
38077
38079
|
function SymbolLinks() {
|
|
38078
38080
|
}
|
|
38079
38081
|
function NodeLinks() {
|
|
38080
|
-
this.flags = 0
|
|
38082
|
+
this.flags = 0 /* None */;
|
|
38081
38083
|
}
|
|
38082
38084
|
function getNodeId(node) {
|
|
38083
38085
|
if (!node.id) {
|
|
@@ -38922,7 +38924,7 @@ function createTypeChecker(host) {
|
|
|
38922
38924
|
function createSymbol(flags, name, checkFlags) {
|
|
38923
38925
|
symbolCount++;
|
|
38924
38926
|
const symbol = new Symbol12(flags | 33554432 /* Transient */, name);
|
|
38925
|
-
symbol.checkFlags = checkFlags || 0
|
|
38927
|
+
symbol.checkFlags = checkFlags || 0 /* None */;
|
|
38926
38928
|
return symbol;
|
|
38927
38929
|
}
|
|
38928
38930
|
function getExcludedSymbolFlags(flags) {
|
|
@@ -41233,7 +41235,7 @@ function createTypeChecker(host) {
|
|
|
41233
41235
|
function createOriginType(flags) {
|
|
41234
41236
|
return new Type7(checker, flags);
|
|
41235
41237
|
}
|
|
41236
|
-
function createIntrinsicType(kind, intrinsicName, objectFlags = 0) {
|
|
41238
|
+
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
|
|
41237
41239
|
const type = createType(kind);
|
|
41238
41240
|
type.intrinsicName = intrinsicName;
|
|
41239
41241
|
type.objectFlags = objectFlags;
|
|
@@ -48074,7 +48076,7 @@ function createTypeChecker(host) {
|
|
|
48074
48076
|
function containsArgumentsReference(declaration) {
|
|
48075
48077
|
const links = getNodeLinks(declaration);
|
|
48076
48078
|
if (links.containsArgumentsReference === void 0) {
|
|
48077
|
-
if (links.flags &
|
|
48079
|
+
if (links.flags & 512 /* CaptureArguments */) {
|
|
48078
48080
|
links.containsArgumentsReference = true;
|
|
48079
48081
|
} else {
|
|
48080
48082
|
links.containsArgumentsReference = traverse(declaration.body);
|
|
@@ -48596,8 +48598,21 @@ function createTypeChecker(host) {
|
|
|
48596
48598
|
return errorType;
|
|
48597
48599
|
}
|
|
48598
48600
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
48599
|
-
|
|
48600
|
-
|
|
48601
|
+
let newAliasSymbol = aliasSymbol && (isLocalTypeAlias(symbol) || !isLocalTypeAlias(aliasSymbol)) ? aliasSymbol : void 0;
|
|
48602
|
+
let aliasTypeArguments;
|
|
48603
|
+
if (newAliasSymbol) {
|
|
48604
|
+
aliasTypeArguments = getTypeArgumentsForAliasSymbol(newAliasSymbol);
|
|
48605
|
+
} else if (isTypeReferenceType(node)) {
|
|
48606
|
+
const aliasSymbol2 = resolveTypeReferenceName(node, 2097152 /* Alias */, true);
|
|
48607
|
+
if (aliasSymbol2 && aliasSymbol2 !== unknownSymbol) {
|
|
48608
|
+
const resolved = resolveAlias(aliasSymbol2);
|
|
48609
|
+
if (resolved && resolved.flags & 524288 /* TypeAlias */) {
|
|
48610
|
+
newAliasSymbol = resolved;
|
|
48611
|
+
aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node);
|
|
48612
|
+
}
|
|
48613
|
+
}
|
|
48614
|
+
}
|
|
48615
|
+
return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, aliasTypeArguments);
|
|
48601
48616
|
}
|
|
48602
48617
|
return checkNoTypeArguments(node, symbol) ? type : errorType;
|
|
48603
48618
|
}
|
|
@@ -51974,7 +51989,7 @@ function createTypeChecker(host) {
|
|
|
51974
51989
|
return compareSignaturesRelated(
|
|
51975
51990
|
source,
|
|
51976
51991
|
target,
|
|
51977
|
-
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0
|
|
51992
|
+
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,
|
|
51978
51993
|
false,
|
|
51979
51994
|
void 0,
|
|
51980
51995
|
void 0,
|
|
@@ -52208,7 +52223,9 @@ function createTypeChecker(host) {
|
|
|
52208
52223
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
52209
52224
|
if (s & 1 /* Any */)
|
|
52210
52225
|
return true;
|
|
52211
|
-
if (s &
|
|
52226
|
+
if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */))
|
|
52227
|
+
return true;
|
|
52228
|
+
if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value))
|
|
52212
52229
|
return true;
|
|
52213
52230
|
if (isUnknownLikeUnionType(target))
|
|
52214
52231
|
return true;
|
|
@@ -55271,7 +55288,7 @@ function createTypeChecker(host) {
|
|
|
55271
55288
|
pos = p;
|
|
55272
55289
|
}
|
|
55273
55290
|
}
|
|
55274
|
-
function inferTypes(inferences, originalSource, originalTarget, priority = 0
|
|
55291
|
+
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
55275
55292
|
let bivariant = false;
|
|
55276
55293
|
let propagationType;
|
|
55277
55294
|
let inferencePriority = 2048 /* MaxValue */;
|
|
@@ -57713,8 +57730,8 @@ function createTypeChecker(host) {
|
|
|
57713
57730
|
}
|
|
57714
57731
|
const parent = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
57715
57732
|
const links = getNodeLinks(parent);
|
|
57716
|
-
if (!(links.flags &
|
|
57717
|
-
links.flags |=
|
|
57733
|
+
if (!(links.flags & 524288 /* AssignmentsMarked */)) {
|
|
57734
|
+
links.flags |= 524288 /* AssignmentsMarked */;
|
|
57718
57735
|
if (!hasParentWithAssignmentsMarked(parent)) {
|
|
57719
57736
|
markNodeAssignments(parent);
|
|
57720
57737
|
}
|
|
@@ -57722,7 +57739,7 @@ function createTypeChecker(host) {
|
|
|
57722
57739
|
return symbol.isAssigned || false;
|
|
57723
57740
|
}
|
|
57724
57741
|
function hasParentWithAssignmentsMarked(node) {
|
|
57725
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
57742
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */));
|
|
57726
57743
|
}
|
|
57727
57744
|
function markNodeAssignments(node) {
|
|
57728
57745
|
if (node.kind === 79 /* Identifier */) {
|
|
@@ -57801,11 +57818,11 @@ function createTypeChecker(host) {
|
|
|
57801
57818
|
const parent = declaration.parent.parent;
|
|
57802
57819
|
if (parent.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 166 /* Parameter */) {
|
|
57803
57820
|
const links = getNodeLinks(parent);
|
|
57804
|
-
if (!(links.flags &
|
|
57805
|
-
links.flags |=
|
|
57821
|
+
if (!(links.flags & 16777216 /* InCheckIdentifier */)) {
|
|
57822
|
+
links.flags |= 16777216 /* InCheckIdentifier */;
|
|
57806
57823
|
const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */);
|
|
57807
57824
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
57808
|
-
links.flags &= ~
|
|
57825
|
+
links.flags &= ~16777216 /* InCheckIdentifier */;
|
|
57809
57826
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
57810
57827
|
const pattern = declaration.parent;
|
|
57811
57828
|
const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode);
|
|
@@ -57855,7 +57872,7 @@ function createTypeChecker(host) {
|
|
|
57855
57872
|
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);
|
|
57856
57873
|
}
|
|
57857
57874
|
}
|
|
57858
|
-
getNodeLinks(container).flags |=
|
|
57875
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
57859
57876
|
return getTypeOfSymbol(symbol);
|
|
57860
57877
|
}
|
|
57861
57878
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -57872,8 +57889,8 @@ function createTypeChecker(host) {
|
|
|
57872
57889
|
let container = getContainingClass(node);
|
|
57873
57890
|
while (container !== void 0) {
|
|
57874
57891
|
if (container === declaration && container.name !== node) {
|
|
57875
|
-
getNodeLinks(declaration).flags |=
|
|
57876
|
-
getNodeLinks(node).flags |=
|
|
57892
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
57893
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
57877
57894
|
break;
|
|
57878
57895
|
}
|
|
57879
57896
|
container = getContainingClass(container);
|
|
@@ -57883,8 +57900,8 @@ function createTypeChecker(host) {
|
|
|
57883
57900
|
while (container.kind !== 308 /* SourceFile */) {
|
|
57884
57901
|
if (container.parent === declaration) {
|
|
57885
57902
|
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
57886
|
-
getNodeLinks(declaration).flags |=
|
|
57887
|
-
getNodeLinks(node).flags |=
|
|
57903
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
57904
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
57888
57905
|
}
|
|
57889
57906
|
break;
|
|
57890
57907
|
}
|
|
@@ -57998,7 +58015,7 @@ function createTypeChecker(host) {
|
|
|
57998
58015
|
const part = getPartOfForStatementContainingNode(node.parent, container);
|
|
57999
58016
|
if (part) {
|
|
58000
58017
|
const links = getNodeLinks(part);
|
|
58001
|
-
links.flags |=
|
|
58018
|
+
links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;
|
|
58002
58019
|
const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);
|
|
58003
58020
|
pushIfUnique(capturedBindings, symbol);
|
|
58004
58021
|
if (part === container.initializer) {
|
|
@@ -58008,19 +58025,19 @@ function createTypeChecker(host) {
|
|
|
58008
58025
|
}
|
|
58009
58026
|
}
|
|
58010
58027
|
if (capturesBlockScopeBindingInLoopBody) {
|
|
58011
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
58028
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
58012
58029
|
}
|
|
58013
58030
|
}
|
|
58014
58031
|
if (isForStatement(container)) {
|
|
58015
58032
|
const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */);
|
|
58016
58033
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
58017
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
58034
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */;
|
|
58018
58035
|
}
|
|
58019
58036
|
}
|
|
58020
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
58037
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
58021
58038
|
}
|
|
58022
58039
|
if (isCaptured) {
|
|
58023
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
58040
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;
|
|
58024
58041
|
}
|
|
58025
58042
|
}
|
|
58026
58043
|
function isBindingCapturedByNode(node, decl) {
|
|
@@ -58237,23 +58254,23 @@ function createTypeChecker(host) {
|
|
|
58237
58254
|
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
|
58238
58255
|
}
|
|
58239
58256
|
if (isStatic(container) || isCallExpression2) {
|
|
58240
|
-
nodeCheckFlag =
|
|
58257
|
+
nodeCheckFlag = 32 /* SuperStatic */;
|
|
58241
58258
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
58242
58259
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
58243
58260
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
58244
|
-
getNodeLinks(current).flags |=
|
|
58261
|
+
getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */;
|
|
58245
58262
|
}
|
|
58246
58263
|
});
|
|
58247
58264
|
}
|
|
58248
58265
|
} else {
|
|
58249
|
-
nodeCheckFlag =
|
|
58266
|
+
nodeCheckFlag = 16 /* SuperInstance */;
|
|
58250
58267
|
}
|
|
58251
58268
|
getNodeLinks(node).flags |= nodeCheckFlag;
|
|
58252
58269
|
if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) {
|
|
58253
58270
|
if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {
|
|
58254
|
-
getNodeLinks(container).flags |=
|
|
58271
|
+
getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;
|
|
58255
58272
|
} else {
|
|
58256
|
-
getNodeLinks(container).flags |=
|
|
58273
|
+
getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;
|
|
58257
58274
|
}
|
|
58258
58275
|
}
|
|
58259
58276
|
if (needToCaptureLexicalThis) {
|
|
@@ -58281,7 +58298,7 @@ function createTypeChecker(host) {
|
|
|
58281
58298
|
error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
|
|
58282
58299
|
return errorType;
|
|
58283
58300
|
}
|
|
58284
|
-
return nodeCheckFlag ===
|
|
58301
|
+
return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);
|
|
58285
58302
|
function isLegalUsageOfSuperExpression(container2) {
|
|
58286
58303
|
if (!container2) {
|
|
58287
58304
|
return false;
|
|
@@ -59296,9 +59313,9 @@ function createTypeChecker(host) {
|
|
|
59296
59313
|
const container = getEnclosingBlockScopeContainer(node.parent.parent);
|
|
59297
59314
|
const enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
59298
59315
|
if (enclosingIterationStatement) {
|
|
59299
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
59300
|
-
getNodeLinks(node).flags |=
|
|
59301
|
-
getNodeLinks(node.parent.parent).flags |=
|
|
59316
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
59317
|
+
getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
59318
|
+
getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
59302
59319
|
}
|
|
59303
59320
|
}
|
|
59304
59321
|
if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
|
|
@@ -63285,10 +63302,10 @@ function createTypeChecker(host) {
|
|
|
63285
63302
|
}
|
|
63286
63303
|
function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
|
|
63287
63304
|
const links = getNodeLinks(node);
|
|
63288
|
-
if (!(links.flags &
|
|
63305
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
63289
63306
|
const contextualSignature = getContextualSignature(node);
|
|
63290
|
-
if (!(links.flags &
|
|
63291
|
-
links.flags |=
|
|
63307
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
63308
|
+
links.flags |= 64 /* ContextChecked */;
|
|
63292
63309
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */));
|
|
63293
63310
|
if (!signature) {
|
|
63294
63311
|
return;
|
|
@@ -65278,13 +65295,13 @@ function createTypeChecker(host) {
|
|
|
65278
65295
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
65279
65296
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
65280
65297
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
65281
|
-
getNodeLinks(lexicalScope).flags |=
|
|
65298
|
+
getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */;
|
|
65282
65299
|
}
|
|
65283
65300
|
if (isClassExpression(node.parent)) {
|
|
65284
65301
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
65285
65302
|
if (enclosingIterationStatement) {
|
|
65286
|
-
getNodeLinks(node.name).flags |=
|
|
65287
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
65303
|
+
getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
65304
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
65288
65305
|
}
|
|
65289
65306
|
}
|
|
65290
65307
|
}
|
|
@@ -66879,7 +66896,7 @@ function createTypeChecker(host) {
|
|
|
66879
66896
|
}
|
|
66880
66897
|
function checkWeakMapSetCollision(node) {
|
|
66881
66898
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
66882
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
66899
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) {
|
|
66883
66900
|
Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
|
|
66884
66901
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
66885
66902
|
}
|
|
@@ -66893,18 +66910,18 @@ function createTypeChecker(host) {
|
|
|
66893
66910
|
let hasCollision = false;
|
|
66894
66911
|
if (isClassExpression(node)) {
|
|
66895
66912
|
for (const member of node.members) {
|
|
66896
|
-
if (getNodeCheckFlags(member) &
|
|
66913
|
+
if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
66897
66914
|
hasCollision = true;
|
|
66898
66915
|
break;
|
|
66899
66916
|
}
|
|
66900
66917
|
}
|
|
66901
66918
|
} else if (isFunctionExpression(node)) {
|
|
66902
|
-
if (getNodeCheckFlags(node) &
|
|
66919
|
+
if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
66903
66920
|
hasCollision = true;
|
|
66904
66921
|
}
|
|
66905
66922
|
} else {
|
|
66906
66923
|
const container = getEnclosingBlockScopeContainer(node);
|
|
66907
|
-
if (container && getNodeCheckFlags(container) &
|
|
66924
|
+
if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
66908
66925
|
hasCollision = true;
|
|
66909
66926
|
}
|
|
66910
66927
|
}
|
|
@@ -68789,8 +68806,8 @@ function createTypeChecker(host) {
|
|
|
68789
68806
|
}
|
|
68790
68807
|
function computeEnumMemberValues(node) {
|
|
68791
68808
|
const nodeLinks2 = getNodeLinks(node);
|
|
68792
|
-
if (!(nodeLinks2.flags &
|
|
68793
|
-
nodeLinks2.flags |=
|
|
68809
|
+
if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {
|
|
68810
|
+
nodeLinks2.flags |= 1024 /* EnumValuesComputed */;
|
|
68794
68811
|
let autoValue = 0;
|
|
68795
68812
|
for (const member of node.members) {
|
|
68796
68813
|
const value = computeMemberValue(member, autoValue);
|
|
@@ -69066,7 +69083,7 @@ function createTypeChecker(host) {
|
|
|
69066
69083
|
}
|
|
69067
69084
|
const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */);
|
|
69068
69085
|
if (mergedClass && inSameLexicalScope(node, mergedClass)) {
|
|
69069
|
-
getNodeLinks(node).flags |=
|
|
69086
|
+
getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;
|
|
69070
69087
|
}
|
|
69071
69088
|
}
|
|
69072
69089
|
if (isAmbientExternalModule) {
|
|
@@ -70697,8 +70714,8 @@ function createTypeChecker(host) {
|
|
|
70697
70714
|
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
70698
70715
|
if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, void 0, void 0, false)) {
|
|
70699
70716
|
links.isDeclarationWithCollidingName = true;
|
|
70700
|
-
} else if (nodeLinks2.flags &
|
|
70701
|
-
const isDeclaredInLoop = nodeLinks2.flags &
|
|
70717
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
70718
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
70702
70719
|
const inLoopInitializer = isIterationStatement(container, false);
|
|
70703
70720
|
const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement(container.parent, false);
|
|
70704
70721
|
links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);
|
|
@@ -77673,12 +77690,12 @@ function transformClassFields(context) {
|
|
|
77673
77690
|
function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {
|
|
77674
77691
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
77675
77692
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
77676
|
-
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) &
|
|
77693
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */;
|
|
77677
77694
|
let temp;
|
|
77678
77695
|
function createClassTempVar() {
|
|
77679
77696
|
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
77680
|
-
const isClassWithConstructorReference2 = classCheckFlags &
|
|
77681
|
-
const requiresBlockScopedVar = classCheckFlags &
|
|
77697
|
+
const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
|
|
77698
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
77682
77699
|
return factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
|
|
77683
77700
|
}
|
|
77684
77701
|
if (facts & 2 /* NeedsClassConstructorReference */) {
|
|
@@ -78191,7 +78208,7 @@ function transformClassFields(context) {
|
|
|
78191
78208
|
}
|
|
78192
78209
|
function trySubstituteClassAlias(node) {
|
|
78193
78210
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
78194
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
78211
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
78195
78212
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
78196
78213
|
if (declaration) {
|
|
78197
78214
|
const classAlias = classAliases[declaration.id];
|
|
@@ -78214,7 +78231,7 @@ function transformClassFields(context) {
|
|
|
78214
78231
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
78215
78232
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
78216
78233
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
78217
|
-
if (resolver.getNodeCheckFlags(name) &
|
|
78234
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
78218
78235
|
addBlockScopedVariable(generatedName);
|
|
78219
78236
|
} else {
|
|
78220
78237
|
hoistVariableDeclaration(generatedName);
|
|
@@ -78363,7 +78380,7 @@ function transformClassFields(context) {
|
|
|
78363
78380
|
const { className } = getPrivateIdentifierEnvironment();
|
|
78364
78381
|
const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_";
|
|
78365
78382
|
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);
|
|
78366
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
78383
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
78367
78384
|
addBlockScopedVariable(identifier);
|
|
78368
78385
|
} else {
|
|
78369
78386
|
hoistVariableDeclaration(identifier);
|
|
@@ -79228,7 +79245,7 @@ function transformLegacyDecorators(context) {
|
|
|
79228
79245
|
}
|
|
79229
79246
|
}
|
|
79230
79247
|
function getClassAliasIfNeeded(node) {
|
|
79231
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
79248
|
+
if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) {
|
|
79232
79249
|
enableSubstitutionForClassAliases();
|
|
79233
79250
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
79234
79251
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -79262,7 +79279,7 @@ function transformLegacyDecorators(context) {
|
|
|
79262
79279
|
}
|
|
79263
79280
|
function trySubstituteClassAlias(node) {
|
|
79264
79281
|
if (classAliases) {
|
|
79265
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
79282
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
79266
79283
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
79267
79284
|
if (declaration) {
|
|
79268
79285
|
const classAlias = classAliases[declaration.id];
|
|
@@ -79297,7 +79314,7 @@ function transformES2017(context) {
|
|
|
79297
79314
|
let capturedSuperProperties;
|
|
79298
79315
|
let hasSuperElementAccess;
|
|
79299
79316
|
const substitutedSuperAccessors = [];
|
|
79300
|
-
let contextFlags = 0
|
|
79317
|
+
let contextFlags = 0 /* None */;
|
|
79301
79318
|
const previousOnEmitNode = context.onEmitNode;
|
|
79302
79319
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
79303
79320
|
context.onEmitNode = onEmitNode;
|
|
@@ -79624,7 +79641,7 @@ function transformES2017(context) {
|
|
|
79624
79641
|
hasSuperElementAccess = false;
|
|
79625
79642
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
79626
79643
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
79627
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
79644
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
79628
79645
|
if (emitSuperHelpers) {
|
|
79629
79646
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
79630
79647
|
if (capturedSuperProperties.size) {
|
|
@@ -79635,9 +79652,9 @@ function transformES2017(context) {
|
|
|
79635
79652
|
updated = factory2.updateBlock(updated, statements);
|
|
79636
79653
|
}
|
|
79637
79654
|
if (hasSuperElementAccess) {
|
|
79638
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
79655
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
79639
79656
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
79640
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
79657
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
79641
79658
|
addEmitHelper(updated, asyncSuperHelper);
|
|
79642
79659
|
}
|
|
79643
79660
|
}
|
|
@@ -79652,7 +79669,7 @@ function transformES2017(context) {
|
|
|
79652
79669
|
const nodeType = original.type;
|
|
79653
79670
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
79654
79671
|
const isArrowFunction2 = node.kind === 216 /* ArrowFunction */;
|
|
79655
|
-
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) &
|
|
79672
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
79656
79673
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
79657
79674
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
79658
79675
|
for (const parameter of node.parameters) {
|
|
@@ -79679,7 +79696,7 @@ function transformES2017(context) {
|
|
|
79679
79696
|
)
|
|
79680
79697
|
);
|
|
79681
79698
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
79682
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
79699
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
79683
79700
|
if (emitSuperHelpers) {
|
|
79684
79701
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
79685
79702
|
if (capturedSuperProperties.size) {
|
|
@@ -79691,9 +79708,9 @@ function transformES2017(context) {
|
|
|
79691
79708
|
const block = factory2.createBlock(statements, true);
|
|
79692
79709
|
setTextRange(block, node.body);
|
|
79693
79710
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
79694
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
79711
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
79695
79712
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
79696
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
79713
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
79697
79714
|
addEmitHelper(block, asyncSuperHelper);
|
|
79698
79715
|
}
|
|
79699
79716
|
}
|
|
@@ -79753,7 +79770,7 @@ function transformES2017(context) {
|
|
|
79753
79770
|
}
|
|
79754
79771
|
function onEmitNode(hint, node, emitCallback) {
|
|
79755
79772
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
79756
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
79773
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
79757
79774
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
79758
79775
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
79759
79776
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -79829,7 +79846,7 @@ function transformES2017(context) {
|
|
|
79829
79846
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
79830
79847
|
}
|
|
79831
79848
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
79832
|
-
if (enclosingSuperContainerFlags &
|
|
79849
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
79833
79850
|
return setTextRange(
|
|
79834
79851
|
factory2.createPropertyAccessExpression(
|
|
79835
79852
|
factory2.createCallExpression(
|
|
@@ -79854,7 +79871,7 @@ function transformES2017(context) {
|
|
|
79854
79871
|
}
|
|
79855
79872
|
}
|
|
79856
79873
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
79857
|
-
const hasBinding = (resolver.getNodeCheckFlags(node) &
|
|
79874
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
79858
79875
|
const accessors = [];
|
|
79859
79876
|
names.forEach((_, key) => {
|
|
79860
79877
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -80792,7 +80809,7 @@ function transformES2018(context) {
|
|
|
80792
80809
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
80793
80810
|
)
|
|
80794
80811
|
);
|
|
80795
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
80812
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
80796
80813
|
if (emitSuperHelpers) {
|
|
80797
80814
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
80798
80815
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -80803,9 +80820,9 @@ function transformES2018(context) {
|
|
|
80803
80820
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
80804
80821
|
const block = factory2.updateBlock(node.body, statements);
|
|
80805
80822
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
80806
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
80823
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
80807
80824
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
80808
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
80825
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
80809
80826
|
addEmitHelper(block, asyncSuperHelper);
|
|
80810
80827
|
}
|
|
80811
80828
|
}
|
|
@@ -80915,7 +80932,7 @@ function transformES2018(context) {
|
|
|
80915
80932
|
}
|
|
80916
80933
|
function onEmitNode(hint, node, emitCallback) {
|
|
80917
80934
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
80918
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
80935
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
80919
80936
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
80920
80937
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
80921
80938
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -80991,7 +81008,7 @@ function transformES2018(context) {
|
|
|
80991
81008
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
80992
81009
|
}
|
|
80993
81010
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
80994
|
-
if (enclosingSuperContainerFlags &
|
|
81011
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
80995
81012
|
return setTextRange(
|
|
80996
81013
|
factory2.createPropertyAccessExpression(
|
|
80997
81014
|
factory2.createCallExpression(
|
|
@@ -83347,8 +83364,8 @@ function transformES2015(context) {
|
|
|
83347
83364
|
}
|
|
83348
83365
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
83349
83366
|
const flags = resolver.getNodeCheckFlags(node);
|
|
83350
|
-
const isCapturedInFunction = flags &
|
|
83351
|
-
const isDeclaredInLoop = flags &
|
|
83367
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
83368
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
83352
83369
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
83353
83370
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
83354
83371
|
return emitExplicitInitializer;
|
|
@@ -83709,7 +83726,7 @@ function transformES2015(context) {
|
|
|
83709
83726
|
return factory2.inlineExpressions(expressions);
|
|
83710
83727
|
}
|
|
83711
83728
|
function shouldConvertPartOfIterationStatement(node) {
|
|
83712
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
83729
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
83713
83730
|
}
|
|
83714
83731
|
function shouldConvertInitializerOfForStatement(node) {
|
|
83715
83732
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -83724,7 +83741,7 @@ function transformES2015(context) {
|
|
|
83724
83741
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
83725
83742
|
}
|
|
83726
83743
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
83727
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
83744
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
83728
83745
|
}
|
|
83729
83746
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
83730
83747
|
if (!state.hoistedLocalVariables) {
|
|
@@ -84185,10 +84202,10 @@ function transformES2015(context) {
|
|
|
84185
84202
|
} else {
|
|
84186
84203
|
loopParameters.push(factory2.createParameterDeclaration(void 0, void 0, name));
|
|
84187
84204
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
84188
|
-
if (checkFlags &
|
|
84205
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
84189
84206
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
84190
|
-
let flags = 0
|
|
84191
|
-
if (checkFlags &
|
|
84207
|
+
let flags = 0 /* None */;
|
|
84208
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */) {
|
|
84192
84209
|
flags |= 1 /* Body */;
|
|
84193
84210
|
}
|
|
84194
84211
|
if (isForStatement(container)) {
|