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/tsserver.js
CHANGED
|
@@ -2648,7 +2648,7 @@ var ts = (() => {
|
|
|
2648
2648
|
|
|
2649
2649
|
// src/compiler/corePublic.ts
|
|
2650
2650
|
var versionMajorMinor = "5.0";
|
|
2651
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2651
|
+
var version = `${versionMajorMinor}.0-dev.20221117`;
|
|
2652
2652
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2653
2653
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2654
2654
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6868,6 +6868,7 @@ ${lanes.join("\n")}
|
|
|
6868
6868
|
return EnumKind2;
|
|
6869
6869
|
})(EnumKind || {});
|
|
6870
6870
|
var CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
|
|
6871
|
+
CheckFlags2[CheckFlags2["None"] = 0] = "None";
|
|
6871
6872
|
CheckFlags2[CheckFlags2["Instantiated"] = 1] = "Instantiated";
|
|
6872
6873
|
CheckFlags2[CheckFlags2["SyntheticProperty"] = 2] = "SyntheticProperty";
|
|
6873
6874
|
CheckFlags2[CheckFlags2["SyntheticMethod"] = 4] = "SyntheticMethod";
|
|
@@ -6915,31 +6916,32 @@ ${lanes.join("\n")}
|
|
|
6915
6916
|
return InternalSymbolName2;
|
|
6916
6917
|
})(InternalSymbolName || {});
|
|
6917
6918
|
var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
|
|
6919
|
+
NodeCheckFlags2[NodeCheckFlags2["None"] = 0] = "None";
|
|
6918
6920
|
NodeCheckFlags2[NodeCheckFlags2["TypeChecked"] = 1] = "TypeChecked";
|
|
6919
6921
|
NodeCheckFlags2[NodeCheckFlags2["LexicalThis"] = 2] = "LexicalThis";
|
|
6920
6922
|
NodeCheckFlags2[NodeCheckFlags2["CaptureThis"] = 4] = "CaptureThis";
|
|
6921
6923
|
NodeCheckFlags2[NodeCheckFlags2["CaptureNewTarget"] = 8] = "CaptureNewTarget";
|
|
6922
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] =
|
|
6923
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] =
|
|
6924
|
-
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] =
|
|
6925
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] =
|
|
6926
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] =
|
|
6927
|
-
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] =
|
|
6928
|
-
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] =
|
|
6929
|
-
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] =
|
|
6930
|
-
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] =
|
|
6931
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] =
|
|
6932
|
-
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] =
|
|
6933
|
-
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] =
|
|
6934
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] =
|
|
6935
|
-
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] =
|
|
6936
|
-
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] =
|
|
6937
|
-
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] =
|
|
6938
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] =
|
|
6939
|
-
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] =
|
|
6940
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] =
|
|
6941
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] =
|
|
6942
|
-
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] =
|
|
6924
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] = 16] = "SuperInstance";
|
|
6925
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] = 32] = "SuperStatic";
|
|
6926
|
+
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] = 64] = "ContextChecked";
|
|
6927
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
|
|
6928
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
|
|
6929
|
+
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] = 512] = "CaptureArguments";
|
|
6930
|
+
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
|
|
6931
|
+
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
|
|
6932
|
+
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
|
|
6933
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
|
|
6934
|
+
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
|
|
6935
|
+
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
|
|
6936
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding";
|
|
6937
|
+
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding";
|
|
6938
|
+
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter";
|
|
6939
|
+
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked";
|
|
6940
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference";
|
|
6941
|
+
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass";
|
|
6942
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers";
|
|
6943
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer";
|
|
6944
|
+
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier";
|
|
6943
6945
|
return NodeCheckFlags2;
|
|
6944
6946
|
})(NodeCheckFlags || {});
|
|
6945
6947
|
var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
@@ -7012,6 +7014,7 @@ ${lanes.join("\n")}
|
|
|
7012
7014
|
return TypeFlags2;
|
|
7013
7015
|
})(TypeFlags || {});
|
|
7014
7016
|
var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
7017
|
+
ObjectFlags3[ObjectFlags3["None"] = 0] = "None";
|
|
7015
7018
|
ObjectFlags3[ObjectFlags3["Class"] = 1] = "Class";
|
|
7016
7019
|
ObjectFlags3[ObjectFlags3["Interface"] = 2] = "Interface";
|
|
7017
7020
|
ObjectFlags3[ObjectFlags3["Reference"] = 4] = "Reference";
|
|
@@ -7129,6 +7132,7 @@ ${lanes.join("\n")}
|
|
|
7129
7132
|
return TypeMapKind2;
|
|
7130
7133
|
})(TypeMapKind || {});
|
|
7131
7134
|
var InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {
|
|
7135
|
+
InferencePriority2[InferencePriority2["None"] = 0] = "None";
|
|
7132
7136
|
InferencePriority2[InferencePriority2["NakedTypeVariable"] = 1] = "NakedTypeVariable";
|
|
7133
7137
|
InferencePriority2[InferencePriority2["SpeculativeTuple"] = 2] = "SpeculativeTuple";
|
|
7134
7138
|
InferencePriority2[InferencePriority2["SubstituteSource"] = 4] = "SubstituteSource";
|
|
@@ -42900,6 +42904,7 @@ ${lanes.join("\n")}
|
|
|
42900
42904
|
return CheckMode3;
|
|
42901
42905
|
})(CheckMode || {});
|
|
42902
42906
|
var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
42907
|
+
SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None";
|
|
42903
42908
|
SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback";
|
|
42904
42909
|
SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback";
|
|
42905
42910
|
SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes";
|
|
@@ -42917,7 +42922,7 @@ ${lanes.join("\n")}
|
|
|
42917
42922
|
function SymbolLinks() {
|
|
42918
42923
|
}
|
|
42919
42924
|
function NodeLinks() {
|
|
42920
|
-
this.flags = 0
|
|
42925
|
+
this.flags = 0 /* None */;
|
|
42921
42926
|
}
|
|
42922
42927
|
function getNodeId(node) {
|
|
42923
42928
|
if (!node.id) {
|
|
@@ -43762,7 +43767,7 @@ ${lanes.join("\n")}
|
|
|
43762
43767
|
function createSymbol(flags, name, checkFlags) {
|
|
43763
43768
|
symbolCount++;
|
|
43764
43769
|
const symbol = new Symbol46(flags | 33554432 /* Transient */, name);
|
|
43765
|
-
symbol.checkFlags = checkFlags || 0
|
|
43770
|
+
symbol.checkFlags = checkFlags || 0 /* None */;
|
|
43766
43771
|
return symbol;
|
|
43767
43772
|
}
|
|
43768
43773
|
function getExcludedSymbolFlags(flags) {
|
|
@@ -46073,7 +46078,7 @@ ${lanes.join("\n")}
|
|
|
46073
46078
|
function createOriginType(flags) {
|
|
46074
46079
|
return new Type27(checker, flags);
|
|
46075
46080
|
}
|
|
46076
|
-
function createIntrinsicType(kind, intrinsicName, objectFlags = 0) {
|
|
46081
|
+
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
|
|
46077
46082
|
const type = createType(kind);
|
|
46078
46083
|
type.intrinsicName = intrinsicName;
|
|
46079
46084
|
type.objectFlags = objectFlags;
|
|
@@ -52914,7 +52919,7 @@ ${lanes.join("\n")}
|
|
|
52914
52919
|
function containsArgumentsReference(declaration) {
|
|
52915
52920
|
const links = getNodeLinks(declaration);
|
|
52916
52921
|
if (links.containsArgumentsReference === void 0) {
|
|
52917
|
-
if (links.flags &
|
|
52922
|
+
if (links.flags & 512 /* CaptureArguments */) {
|
|
52918
52923
|
links.containsArgumentsReference = true;
|
|
52919
52924
|
} else {
|
|
52920
52925
|
links.containsArgumentsReference = traverse(declaration.body);
|
|
@@ -56814,7 +56819,7 @@ ${lanes.join("\n")}
|
|
|
56814
56819
|
return compareSignaturesRelated(
|
|
56815
56820
|
source,
|
|
56816
56821
|
target,
|
|
56817
|
-
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0
|
|
56822
|
+
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,
|
|
56818
56823
|
false,
|
|
56819
56824
|
void 0,
|
|
56820
56825
|
void 0,
|
|
@@ -57048,7 +57053,9 @@ ${lanes.join("\n")}
|
|
|
57048
57053
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
57049
57054
|
if (s & 1 /* Any */)
|
|
57050
57055
|
return true;
|
|
57051
|
-
if (s &
|
|
57056
|
+
if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */))
|
|
57057
|
+
return true;
|
|
57058
|
+
if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value))
|
|
57052
57059
|
return true;
|
|
57053
57060
|
if (isUnknownLikeUnionType(target))
|
|
57054
57061
|
return true;
|
|
@@ -60111,7 +60118,7 @@ ${lanes.join("\n")}
|
|
|
60111
60118
|
pos = p;
|
|
60112
60119
|
}
|
|
60113
60120
|
}
|
|
60114
|
-
function inferTypes(inferences, originalSource, originalTarget, priority = 0
|
|
60121
|
+
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
60115
60122
|
let bivariant = false;
|
|
60116
60123
|
let propagationType;
|
|
60117
60124
|
let inferencePriority = 2048 /* MaxValue */;
|
|
@@ -62553,8 +62560,8 @@ ${lanes.join("\n")}
|
|
|
62553
62560
|
}
|
|
62554
62561
|
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
62555
62562
|
const links = getNodeLinks(parent2);
|
|
62556
|
-
if (!(links.flags &
|
|
62557
|
-
links.flags |=
|
|
62563
|
+
if (!(links.flags & 524288 /* AssignmentsMarked */)) {
|
|
62564
|
+
links.flags |= 524288 /* AssignmentsMarked */;
|
|
62558
62565
|
if (!hasParentWithAssignmentsMarked(parent2)) {
|
|
62559
62566
|
markNodeAssignments(parent2);
|
|
62560
62567
|
}
|
|
@@ -62562,7 +62569,7 @@ ${lanes.join("\n")}
|
|
|
62562
62569
|
return symbol.isAssigned || false;
|
|
62563
62570
|
}
|
|
62564
62571
|
function hasParentWithAssignmentsMarked(node) {
|
|
62565
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
62572
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */));
|
|
62566
62573
|
}
|
|
62567
62574
|
function markNodeAssignments(node) {
|
|
62568
62575
|
if (node.kind === 79 /* Identifier */) {
|
|
@@ -62641,11 +62648,11 @@ ${lanes.join("\n")}
|
|
|
62641
62648
|
const parent2 = declaration.parent.parent;
|
|
62642
62649
|
if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) {
|
|
62643
62650
|
const links = getNodeLinks(parent2);
|
|
62644
|
-
if (!(links.flags &
|
|
62645
|
-
links.flags |=
|
|
62651
|
+
if (!(links.flags & 16777216 /* InCheckIdentifier */)) {
|
|
62652
|
+
links.flags |= 16777216 /* InCheckIdentifier */;
|
|
62646
62653
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
62647
62654
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
62648
|
-
links.flags &= ~
|
|
62655
|
+
links.flags &= ~16777216 /* InCheckIdentifier */;
|
|
62649
62656
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
62650
62657
|
const pattern = declaration.parent;
|
|
62651
62658
|
const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location2.flowNode);
|
|
@@ -62695,7 +62702,7 @@ ${lanes.join("\n")}
|
|
|
62695
62702
|
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);
|
|
62696
62703
|
}
|
|
62697
62704
|
}
|
|
62698
|
-
getNodeLinks(container).flags |=
|
|
62705
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
62699
62706
|
return getTypeOfSymbol(symbol);
|
|
62700
62707
|
}
|
|
62701
62708
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -62712,8 +62719,8 @@ ${lanes.join("\n")}
|
|
|
62712
62719
|
let container = getContainingClass(node);
|
|
62713
62720
|
while (container !== void 0) {
|
|
62714
62721
|
if (container === declaration && container.name !== node) {
|
|
62715
|
-
getNodeLinks(declaration).flags |=
|
|
62716
|
-
getNodeLinks(node).flags |=
|
|
62722
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
62723
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
62717
62724
|
break;
|
|
62718
62725
|
}
|
|
62719
62726
|
container = getContainingClass(container);
|
|
@@ -62723,8 +62730,8 @@ ${lanes.join("\n")}
|
|
|
62723
62730
|
while (container.kind !== 308 /* SourceFile */) {
|
|
62724
62731
|
if (container.parent === declaration) {
|
|
62725
62732
|
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
62726
|
-
getNodeLinks(declaration).flags |=
|
|
62727
|
-
getNodeLinks(node).flags |=
|
|
62733
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
62734
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
62728
62735
|
}
|
|
62729
62736
|
break;
|
|
62730
62737
|
}
|
|
@@ -62838,7 +62845,7 @@ ${lanes.join("\n")}
|
|
|
62838
62845
|
const part = getPartOfForStatementContainingNode(node.parent, container);
|
|
62839
62846
|
if (part) {
|
|
62840
62847
|
const links = getNodeLinks(part);
|
|
62841
|
-
links.flags |=
|
|
62848
|
+
links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;
|
|
62842
62849
|
const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);
|
|
62843
62850
|
pushIfUnique(capturedBindings, symbol);
|
|
62844
62851
|
if (part === container.initializer) {
|
|
@@ -62848,19 +62855,19 @@ ${lanes.join("\n")}
|
|
|
62848
62855
|
}
|
|
62849
62856
|
}
|
|
62850
62857
|
if (capturesBlockScopeBindingInLoopBody) {
|
|
62851
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
62858
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
62852
62859
|
}
|
|
62853
62860
|
}
|
|
62854
62861
|
if (isForStatement(container)) {
|
|
62855
62862
|
const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */);
|
|
62856
62863
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
62857
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
62864
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */;
|
|
62858
62865
|
}
|
|
62859
62866
|
}
|
|
62860
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
62867
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
62861
62868
|
}
|
|
62862
62869
|
if (isCaptured) {
|
|
62863
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
62870
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;
|
|
62864
62871
|
}
|
|
62865
62872
|
}
|
|
62866
62873
|
function isBindingCapturedByNode(node, decl) {
|
|
@@ -63077,23 +63084,23 @@ ${lanes.join("\n")}
|
|
|
63077
63084
|
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
|
63078
63085
|
}
|
|
63079
63086
|
if (isStatic(container) || isCallExpression2) {
|
|
63080
|
-
nodeCheckFlag =
|
|
63087
|
+
nodeCheckFlag = 32 /* SuperStatic */;
|
|
63081
63088
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
63082
63089
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
63083
63090
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
63084
|
-
getNodeLinks(current).flags |=
|
|
63091
|
+
getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */;
|
|
63085
63092
|
}
|
|
63086
63093
|
});
|
|
63087
63094
|
}
|
|
63088
63095
|
} else {
|
|
63089
|
-
nodeCheckFlag =
|
|
63096
|
+
nodeCheckFlag = 16 /* SuperInstance */;
|
|
63090
63097
|
}
|
|
63091
63098
|
getNodeLinks(node).flags |= nodeCheckFlag;
|
|
63092
63099
|
if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) {
|
|
63093
63100
|
if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {
|
|
63094
|
-
getNodeLinks(container).flags |=
|
|
63101
|
+
getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;
|
|
63095
63102
|
} else {
|
|
63096
|
-
getNodeLinks(container).flags |=
|
|
63103
|
+
getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;
|
|
63097
63104
|
}
|
|
63098
63105
|
}
|
|
63099
63106
|
if (needToCaptureLexicalThis) {
|
|
@@ -63121,7 +63128,7 @@ ${lanes.join("\n")}
|
|
|
63121
63128
|
error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
|
|
63122
63129
|
return errorType;
|
|
63123
63130
|
}
|
|
63124
|
-
return nodeCheckFlag ===
|
|
63131
|
+
return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);
|
|
63125
63132
|
function isLegalUsageOfSuperExpression(container2) {
|
|
63126
63133
|
if (!container2) {
|
|
63127
63134
|
return false;
|
|
@@ -64136,9 +64143,9 @@ ${lanes.join("\n")}
|
|
|
64136
64143
|
const container = getEnclosingBlockScopeContainer(node.parent.parent);
|
|
64137
64144
|
const enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
64138
64145
|
if (enclosingIterationStatement) {
|
|
64139
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
64140
|
-
getNodeLinks(node).flags |=
|
|
64141
|
-
getNodeLinks(node.parent.parent).flags |=
|
|
64146
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
64147
|
+
getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
64148
|
+
getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
64142
64149
|
}
|
|
64143
64150
|
}
|
|
64144
64151
|
if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
|
|
@@ -68125,10 +68132,10 @@ ${lanes.join("\n")}
|
|
|
68125
68132
|
}
|
|
68126
68133
|
function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
|
|
68127
68134
|
const links = getNodeLinks(node);
|
|
68128
|
-
if (!(links.flags &
|
|
68135
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
68129
68136
|
const contextualSignature = getContextualSignature(node);
|
|
68130
|
-
if (!(links.flags &
|
|
68131
|
-
links.flags |=
|
|
68137
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
68138
|
+
links.flags |= 64 /* ContextChecked */;
|
|
68132
68139
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */));
|
|
68133
68140
|
if (!signature) {
|
|
68134
68141
|
return;
|
|
@@ -70118,13 +70125,13 @@ ${lanes.join("\n")}
|
|
|
70118
70125
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
70119
70126
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
70120
70127
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
70121
|
-
getNodeLinks(lexicalScope).flags |=
|
|
70128
|
+
getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */;
|
|
70122
70129
|
}
|
|
70123
70130
|
if (isClassExpression(node.parent)) {
|
|
70124
70131
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
70125
70132
|
if (enclosingIterationStatement) {
|
|
70126
|
-
getNodeLinks(node.name).flags |=
|
|
70127
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
70133
|
+
getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
70134
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
70128
70135
|
}
|
|
70129
70136
|
}
|
|
70130
70137
|
}
|
|
@@ -71719,7 +71726,7 @@ ${lanes.join("\n")}
|
|
|
71719
71726
|
}
|
|
71720
71727
|
function checkWeakMapSetCollision(node) {
|
|
71721
71728
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
71722
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
71729
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) {
|
|
71723
71730
|
Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
|
|
71724
71731
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
71725
71732
|
}
|
|
@@ -71733,18 +71740,18 @@ ${lanes.join("\n")}
|
|
|
71733
71740
|
let hasCollision = false;
|
|
71734
71741
|
if (isClassExpression(node)) {
|
|
71735
71742
|
for (const member of node.members) {
|
|
71736
|
-
if (getNodeCheckFlags(member) &
|
|
71743
|
+
if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
71737
71744
|
hasCollision = true;
|
|
71738
71745
|
break;
|
|
71739
71746
|
}
|
|
71740
71747
|
}
|
|
71741
71748
|
} else if (isFunctionExpression(node)) {
|
|
71742
|
-
if (getNodeCheckFlags(node) &
|
|
71749
|
+
if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
71743
71750
|
hasCollision = true;
|
|
71744
71751
|
}
|
|
71745
71752
|
} else {
|
|
71746
71753
|
const container = getEnclosingBlockScopeContainer(node);
|
|
71747
|
-
if (container && getNodeCheckFlags(container) &
|
|
71754
|
+
if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
71748
71755
|
hasCollision = true;
|
|
71749
71756
|
}
|
|
71750
71757
|
}
|
|
@@ -73629,8 +73636,8 @@ ${lanes.join("\n")}
|
|
|
73629
73636
|
}
|
|
73630
73637
|
function computeEnumMemberValues(node) {
|
|
73631
73638
|
const nodeLinks2 = getNodeLinks(node);
|
|
73632
|
-
if (!(nodeLinks2.flags &
|
|
73633
|
-
nodeLinks2.flags |=
|
|
73639
|
+
if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {
|
|
73640
|
+
nodeLinks2.flags |= 1024 /* EnumValuesComputed */;
|
|
73634
73641
|
let autoValue = 0;
|
|
73635
73642
|
for (const member of node.members) {
|
|
73636
73643
|
const value = computeMemberValue(member, autoValue);
|
|
@@ -73906,7 +73913,7 @@ ${lanes.join("\n")}
|
|
|
73906
73913
|
}
|
|
73907
73914
|
const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */);
|
|
73908
73915
|
if (mergedClass && inSameLexicalScope(node, mergedClass)) {
|
|
73909
|
-
getNodeLinks(node).flags |=
|
|
73916
|
+
getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;
|
|
73910
73917
|
}
|
|
73911
73918
|
}
|
|
73912
73919
|
if (isAmbientExternalModule) {
|
|
@@ -75537,8 +75544,8 @@ ${lanes.join("\n")}
|
|
|
75537
75544
|
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
75538
75545
|
if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, void 0, void 0, false)) {
|
|
75539
75546
|
links.isDeclarationWithCollidingName = true;
|
|
75540
|
-
} else if (nodeLinks2.flags &
|
|
75541
|
-
const isDeclaredInLoop = nodeLinks2.flags &
|
|
75547
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
75548
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
75542
75549
|
const inLoopInitializer = isIterationStatement(container, false);
|
|
75543
75550
|
const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement(container.parent, false);
|
|
75544
75551
|
links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);
|
|
@@ -82678,12 +82685,12 @@ ${lanes.join("\n")}
|
|
|
82678
82685
|
function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {
|
|
82679
82686
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
82680
82687
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
82681
|
-
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) &
|
|
82688
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */;
|
|
82682
82689
|
let temp;
|
|
82683
82690
|
function createClassTempVar() {
|
|
82684
82691
|
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
82685
|
-
const isClassWithConstructorReference2 = classCheckFlags &
|
|
82686
|
-
const requiresBlockScopedVar = classCheckFlags &
|
|
82692
|
+
const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
|
|
82693
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
82687
82694
|
return factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
|
|
82688
82695
|
}
|
|
82689
82696
|
if (facts & 2 /* NeedsClassConstructorReference */) {
|
|
@@ -83196,7 +83203,7 @@ ${lanes.join("\n")}
|
|
|
83196
83203
|
}
|
|
83197
83204
|
function trySubstituteClassAlias(node) {
|
|
83198
83205
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
83199
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
83206
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
83200
83207
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
83201
83208
|
if (declaration) {
|
|
83202
83209
|
const classAlias = classAliases[declaration.id];
|
|
@@ -83219,7 +83226,7 @@ ${lanes.join("\n")}
|
|
|
83219
83226
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
83220
83227
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
83221
83228
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
83222
|
-
if (resolver.getNodeCheckFlags(name) &
|
|
83229
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
83223
83230
|
addBlockScopedVariable(generatedName);
|
|
83224
83231
|
} else {
|
|
83225
83232
|
hoistVariableDeclaration(generatedName);
|
|
@@ -83368,7 +83375,7 @@ ${lanes.join("\n")}
|
|
|
83368
83375
|
const { className } = getPrivateIdentifierEnvironment();
|
|
83369
83376
|
const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_";
|
|
83370
83377
|
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);
|
|
83371
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
83378
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
83372
83379
|
addBlockScopedVariable(identifier);
|
|
83373
83380
|
} else {
|
|
83374
83381
|
hoistVariableDeclaration(identifier);
|
|
@@ -84233,7 +84240,7 @@ ${lanes.join("\n")}
|
|
|
84233
84240
|
}
|
|
84234
84241
|
}
|
|
84235
84242
|
function getClassAliasIfNeeded(node) {
|
|
84236
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
84243
|
+
if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) {
|
|
84237
84244
|
enableSubstitutionForClassAliases();
|
|
84238
84245
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
84239
84246
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -84267,7 +84274,7 @@ ${lanes.join("\n")}
|
|
|
84267
84274
|
}
|
|
84268
84275
|
function trySubstituteClassAlias(node) {
|
|
84269
84276
|
if (classAliases) {
|
|
84270
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
84277
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
84271
84278
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
84272
84279
|
if (declaration) {
|
|
84273
84280
|
const classAlias = classAliases[declaration.id];
|
|
@@ -84302,7 +84309,7 @@ ${lanes.join("\n")}
|
|
|
84302
84309
|
let capturedSuperProperties;
|
|
84303
84310
|
let hasSuperElementAccess;
|
|
84304
84311
|
const substitutedSuperAccessors = [];
|
|
84305
|
-
let contextFlags = 0
|
|
84312
|
+
let contextFlags = 0 /* None */;
|
|
84306
84313
|
const previousOnEmitNode = context.onEmitNode;
|
|
84307
84314
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
84308
84315
|
context.onEmitNode = onEmitNode;
|
|
@@ -84629,7 +84636,7 @@ ${lanes.join("\n")}
|
|
|
84629
84636
|
hasSuperElementAccess = false;
|
|
84630
84637
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
84631
84638
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
84632
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
84639
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
84633
84640
|
if (emitSuperHelpers) {
|
|
84634
84641
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
84635
84642
|
if (capturedSuperProperties.size) {
|
|
@@ -84640,9 +84647,9 @@ ${lanes.join("\n")}
|
|
|
84640
84647
|
updated = factory2.updateBlock(updated, statements);
|
|
84641
84648
|
}
|
|
84642
84649
|
if (hasSuperElementAccess) {
|
|
84643
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
84650
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
84644
84651
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
84645
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
84652
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
84646
84653
|
addEmitHelper(updated, asyncSuperHelper);
|
|
84647
84654
|
}
|
|
84648
84655
|
}
|
|
@@ -84657,7 +84664,7 @@ ${lanes.join("\n")}
|
|
|
84657
84664
|
const nodeType = original.type;
|
|
84658
84665
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
84659
84666
|
const isArrowFunction2 = node.kind === 216 /* ArrowFunction */;
|
|
84660
|
-
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) &
|
|
84667
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
84661
84668
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
84662
84669
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
84663
84670
|
for (const parameter of node.parameters) {
|
|
@@ -84684,7 +84691,7 @@ ${lanes.join("\n")}
|
|
|
84684
84691
|
)
|
|
84685
84692
|
);
|
|
84686
84693
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
84687
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
84694
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
84688
84695
|
if (emitSuperHelpers) {
|
|
84689
84696
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
84690
84697
|
if (capturedSuperProperties.size) {
|
|
@@ -84696,9 +84703,9 @@ ${lanes.join("\n")}
|
|
|
84696
84703
|
const block = factory2.createBlock(statements, true);
|
|
84697
84704
|
setTextRange(block, node.body);
|
|
84698
84705
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
84699
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
84706
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
84700
84707
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
84701
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
84708
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
84702
84709
|
addEmitHelper(block, asyncSuperHelper);
|
|
84703
84710
|
}
|
|
84704
84711
|
}
|
|
@@ -84758,7 +84765,7 @@ ${lanes.join("\n")}
|
|
|
84758
84765
|
}
|
|
84759
84766
|
function onEmitNode(hint, node, emitCallback) {
|
|
84760
84767
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
84761
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
84768
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
84762
84769
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
84763
84770
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
84764
84771
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -84834,7 +84841,7 @@ ${lanes.join("\n")}
|
|
|
84834
84841
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
84835
84842
|
}
|
|
84836
84843
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location2) {
|
|
84837
|
-
if (enclosingSuperContainerFlags &
|
|
84844
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
84838
84845
|
return setTextRange(
|
|
84839
84846
|
factory2.createPropertyAccessExpression(
|
|
84840
84847
|
factory2.createCallExpression(
|
|
@@ -84859,7 +84866,7 @@ ${lanes.join("\n")}
|
|
|
84859
84866
|
}
|
|
84860
84867
|
}
|
|
84861
84868
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
84862
|
-
const hasBinding = (resolver.getNodeCheckFlags(node) &
|
|
84869
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
84863
84870
|
const accessors = [];
|
|
84864
84871
|
names.forEach((_, key) => {
|
|
84865
84872
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -85797,7 +85804,7 @@ ${lanes.join("\n")}
|
|
|
85797
85804
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
85798
85805
|
)
|
|
85799
85806
|
);
|
|
85800
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
85807
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
85801
85808
|
if (emitSuperHelpers) {
|
|
85802
85809
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
85803
85810
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -85808,9 +85815,9 @@ ${lanes.join("\n")}
|
|
|
85808
85815
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
85809
85816
|
const block = factory2.updateBlock(node.body, statements);
|
|
85810
85817
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
85811
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
85818
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
85812
85819
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
85813
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
85820
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
85814
85821
|
addEmitHelper(block, asyncSuperHelper);
|
|
85815
85822
|
}
|
|
85816
85823
|
}
|
|
@@ -85920,7 +85927,7 @@ ${lanes.join("\n")}
|
|
|
85920
85927
|
}
|
|
85921
85928
|
function onEmitNode(hint, node, emitCallback) {
|
|
85922
85929
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
85923
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
85930
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
85924
85931
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
85925
85932
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
85926
85933
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -85996,7 +86003,7 @@ ${lanes.join("\n")}
|
|
|
85996
86003
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
85997
86004
|
}
|
|
85998
86005
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location2) {
|
|
85999
|
-
if (enclosingSuperContainerFlags &
|
|
86006
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
86000
86007
|
return setTextRange(
|
|
86001
86008
|
factory2.createPropertyAccessExpression(
|
|
86002
86009
|
factory2.createCallExpression(
|
|
@@ -88352,8 +88359,8 @@ ${lanes.join("\n")}
|
|
|
88352
88359
|
}
|
|
88353
88360
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
88354
88361
|
const flags = resolver.getNodeCheckFlags(node);
|
|
88355
|
-
const isCapturedInFunction = flags &
|
|
88356
|
-
const isDeclaredInLoop = flags &
|
|
88362
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
88363
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
88357
88364
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
88358
88365
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
88359
88366
|
return emitExplicitInitializer;
|
|
@@ -88714,7 +88721,7 @@ ${lanes.join("\n")}
|
|
|
88714
88721
|
return factory2.inlineExpressions(expressions);
|
|
88715
88722
|
}
|
|
88716
88723
|
function shouldConvertPartOfIterationStatement(node) {
|
|
88717
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
88724
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
88718
88725
|
}
|
|
88719
88726
|
function shouldConvertInitializerOfForStatement(node) {
|
|
88720
88727
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -88729,7 +88736,7 @@ ${lanes.join("\n")}
|
|
|
88729
88736
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
88730
88737
|
}
|
|
88731
88738
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
88732
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
88739
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
88733
88740
|
}
|
|
88734
88741
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
88735
88742
|
if (!state.hoistedLocalVariables) {
|
|
@@ -89190,10 +89197,10 @@ ${lanes.join("\n")}
|
|
|
89190
89197
|
} else {
|
|
89191
89198
|
loopParameters.push(factory2.createParameterDeclaration(void 0, void 0, name));
|
|
89192
89199
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
89193
|
-
if (checkFlags &
|
|
89200
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
89194
89201
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
89195
|
-
let flags = 0
|
|
89196
|
-
if (checkFlags &
|
|
89202
|
+
let flags = 0 /* None */;
|
|
89203
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */) {
|
|
89197
89204
|
flags |= 1 /* Body */;
|
|
89198
89205
|
}
|
|
89199
89206
|
if (isForStatement(container)) {
|
|
@@ -148071,6 +148078,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
148071
148078
|
// src/services/formatting/rule.ts
|
|
148072
148079
|
var anyContext = emptyArray;
|
|
148073
148080
|
var RuleAction = /* @__PURE__ */ ((RuleAction2) => {
|
|
148081
|
+
RuleAction2[RuleAction2["None"] = 0] = "None";
|
|
148074
148082
|
RuleAction2[RuleAction2["StopProcessingSpaceActions"] = 1] = "StopProcessingSpaceActions";
|
|
148075
148083
|
RuleAction2[RuleAction2["StopProcessingTokenActions"] = 2] = "StopProcessingTokenActions";
|
|
148076
148084
|
RuleAction2[RuleAction2["InsertSpace"] = 4] = "InsertSpace";
|
|
@@ -148718,7 +148726,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
148718
148726
|
return rulesMapCache;
|
|
148719
148727
|
}
|
|
148720
148728
|
function getRuleActionExclusion(ruleAction) {
|
|
148721
|
-
let mask2 = 0
|
|
148729
|
+
let mask2 = 0 /* None */;
|
|
148722
148730
|
if (ruleAction & 1 /* StopProcessingSpaceActions */) {
|
|
148723
148731
|
mask2 |= 28 /* ModifySpaceAction */;
|
|
148724
148732
|
}
|