@typescript-deploys/pr-build 5.5.0-pr-57201-2 → 5.5.0-pr-58364-29

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.
Files changed (3) hide show
  1. package/lib/tsc.js +243 -59
  2. package/lib/typescript.js +243 -87
  3. package/package.json +1 -1
package/lib/tsc.js CHANGED
@@ -1518,6 +1518,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1518
1518
  );
1519
1519
  }
1520
1520
  Debug2.formatNodeFlags = formatNodeFlags;
1521
+ function formatNodeCheckFlags(flags) {
1522
+ return formatEnum(
1523
+ flags,
1524
+ NodeCheckFlags,
1525
+ /*isFlags*/
1526
+ true
1527
+ );
1528
+ }
1529
+ Debug2.formatNodeCheckFlags = formatNodeCheckFlags;
1521
1530
  function formatModifierFlags(flags) {
1522
1531
  return formatEnum(
1523
1532
  flags,
@@ -3530,6 +3539,34 @@ var SymbolFlags = /* @__PURE__ */ ((SymbolFlags2) => {
3530
3539
  SymbolFlags2[SymbolFlags2["LateBindingContainer"] = 6256] = "LateBindingContainer";
3531
3540
  return SymbolFlags2;
3532
3541
  })(SymbolFlags || {});
3542
+ var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags3) => {
3543
+ NodeCheckFlags3[NodeCheckFlags3["None"] = 0] = "None";
3544
+ NodeCheckFlags3[NodeCheckFlags3["TypeChecked"] = 1] = "TypeChecked";
3545
+ NodeCheckFlags3[NodeCheckFlags3["LexicalThis"] = 2] = "LexicalThis";
3546
+ NodeCheckFlags3[NodeCheckFlags3["CaptureThis"] = 4] = "CaptureThis";
3547
+ NodeCheckFlags3[NodeCheckFlags3["CaptureNewTarget"] = 8] = "CaptureNewTarget";
3548
+ NodeCheckFlags3[NodeCheckFlags3["SuperInstance"] = 16] = "SuperInstance";
3549
+ NodeCheckFlags3[NodeCheckFlags3["SuperStatic"] = 32] = "SuperStatic";
3550
+ NodeCheckFlags3[NodeCheckFlags3["ContextChecked"] = 64] = "ContextChecked";
3551
+ NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
3552
+ NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
3553
+ NodeCheckFlags3[NodeCheckFlags3["CaptureArguments"] = 512] = "CaptureArguments";
3554
+ NodeCheckFlags3[NodeCheckFlags3["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
3555
+ NodeCheckFlags3[NodeCheckFlags3["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
3556
+ NodeCheckFlags3[NodeCheckFlags3["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
3557
+ NodeCheckFlags3[NodeCheckFlags3["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
3558
+ NodeCheckFlags3[NodeCheckFlags3["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
3559
+ NodeCheckFlags3[NodeCheckFlags3["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
3560
+ NodeCheckFlags3[NodeCheckFlags3["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter";
3561
+ NodeCheckFlags3[NodeCheckFlags3["AssignmentsMarked"] = 131072] = "AssignmentsMarked";
3562
+ NodeCheckFlags3[NodeCheckFlags3["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference";
3563
+ NodeCheckFlags3[NodeCheckFlags3["ConstructorReference"] = 536870912] = "ConstructorReference";
3564
+ NodeCheckFlags3[NodeCheckFlags3["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers";
3565
+ NodeCheckFlags3[NodeCheckFlags3["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer";
3566
+ NodeCheckFlags3[NodeCheckFlags3["InCheckIdentifier"] = 4194304] = "InCheckIdentifier";
3567
+ NodeCheckFlags3[NodeCheckFlags3["LazyFlags"] = 539358128] = "LazyFlags";
3568
+ return NodeCheckFlags3;
3569
+ })(NodeCheckFlags || {});
3533
3570
  var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
3534
3571
  TypeFlags2[TypeFlags2["Any"] = 1] = "Any";
3535
3572
  TypeFlags2[TypeFlags2["Unknown"] = 2] = "Unknown";
@@ -35880,7 +35917,7 @@ var commandOptionsWithoutBuild = [
35880
35917
  showInSimplifiedHelpView: false,
35881
35918
  category: Diagnostics.Compiler_Diagnostics,
35882
35919
  description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
35883
- transpileOptionValue: void 0,
35920
+ transpileOptionValue: true,
35884
35921
  defaultValueDescription: false,
35885
35922
  affectsSemanticDiagnostics: true,
35886
35923
  affectsBuildInfo: true,
@@ -47677,10 +47714,22 @@ function createTypeChecker(host) {
47677
47714
  return !!aliasDeclarationLinks.typeOnlyDeclaration;
47678
47715
  }
47679
47716
  function getTypeOnlyAliasDeclaration(symbol, include) {
47717
+ var _a;
47680
47718
  if (!(symbol.flags & 2097152 /* Alias */)) {
47681
47719
  return void 0;
47682
47720
  }
47683
47721
  const links = getSymbolLinks(symbol);
47722
+ if (links.typeOnlyDeclaration === void 0) {
47723
+ links.typeOnlyDeclaration = false;
47724
+ const resolved = resolveSymbol(symbol);
47725
+ markSymbolOfAliasDeclarationIfTypeOnly(
47726
+ (_a = symbol.declarations) == null ? void 0 : _a[0],
47727
+ getDeclarationOfAliasSymbol(symbol) && getImmediateAliasedSymbol(symbol),
47728
+ resolved,
47729
+ /*overwriteEmpty*/
47730
+ true
47731
+ );
47732
+ }
47684
47733
  if (include === void 0) {
47685
47734
  return links.typeOnlyDeclaration || void 0;
47686
47735
  }
@@ -69177,9 +69226,6 @@ function createTypeChecker(host) {
69177
69226
  if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {
69178
69227
  return markJsxAliasReferenced(location);
69179
69228
  }
69180
- if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
69181
- return markAsyncFunctionAliasReferenced(location);
69182
- }
69183
69229
  if (isImportEqualsDeclaration(location)) {
69184
69230
  if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {
69185
69231
  return markImportEqualsAliasReferenced(location);
@@ -69189,6 +69235,9 @@ function createTypeChecker(host) {
69189
69235
  if (isExportSpecifier(location)) {
69190
69236
  return markExportSpecifierAliasReferenced(location);
69191
69237
  }
69238
+ if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
69239
+ markAsyncFunctionAliasReferenced(location);
69240
+ }
69192
69241
  if (!compilerOptions.emitDecoratorMetadata) {
69193
69242
  return;
69194
69243
  }
@@ -69526,18 +69575,12 @@ function createTypeChecker(host) {
69526
69575
  }
69527
69576
  return type;
69528
69577
  }
69529
- function checkIdentifier(node, checkMode) {
69530
- if (isThisInTypeQuery(node)) {
69531
- return checkThisExpression(node);
69532
- }
69533
- const symbol = getResolvedSymbol(node);
69534
- if (symbol === unknownSymbol) {
69535
- return errorType;
69536
- }
69578
+ function checkIdentifierCalculateNodeCheckFlags(node, symbol) {
69579
+ if (isThisInTypeQuery(node)) return;
69537
69580
  if (symbol === argumentsSymbol) {
69538
69581
  if (isInPropertyInitializerOrClassStaticBlock(node)) {
69539
69582
  error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
69540
- return errorType;
69583
+ return;
69541
69584
  }
69542
69585
  let container = getContainingFunction(node);
69543
69586
  if (container) {
@@ -69556,17 +69599,14 @@ function createTypeChecker(host) {
69556
69599
  }
69557
69600
  }
69558
69601
  }
69559
- return getTypeOfSymbol(symbol);
69560
- }
69561
- if (shouldMarkIdentifierAliasReferenced(node)) {
69562
- markLinkedReferences(node, 1 /* Identifier */);
69602
+ return;
69563
69603
  }
69564
69604
  const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
69565
69605
  const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);
69566
69606
  if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
69567
69607
  addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
69568
69608
  }
69569
- let declaration = localOrExportSymbol.valueDeclaration;
69609
+ const declaration = localOrExportSymbol.valueDeclaration;
69570
69610
  if (declaration && localOrExportSymbol.flags & 32 /* Class */) {
69571
69611
  if (isClassLike(declaration) && declaration.name !== node) {
69572
69612
  let container = getThisContainer(
@@ -69593,6 +69633,27 @@ function createTypeChecker(host) {
69593
69633
  }
69594
69634
  }
69595
69635
  checkNestedBlockScopedBinding(node, symbol);
69636
+ }
69637
+ function checkIdentifier(node, checkMode) {
69638
+ if (isThisInTypeQuery(node)) {
69639
+ return checkThisExpression(node);
69640
+ }
69641
+ const symbol = getResolvedSymbol(node);
69642
+ if (symbol === unknownSymbol) {
69643
+ return errorType;
69644
+ }
69645
+ checkIdentifierCalculateNodeCheckFlags(node, symbol);
69646
+ if (symbol === argumentsSymbol) {
69647
+ if (isInPropertyInitializerOrClassStaticBlock(node)) {
69648
+ return errorType;
69649
+ }
69650
+ return getTypeOfSymbol(symbol);
69651
+ }
69652
+ if (shouldMarkIdentifierAliasReferenced(node)) {
69653
+ markLinkedReferences(node, 1 /* Identifier */);
69654
+ }
69655
+ const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
69656
+ let declaration = localOrExportSymbol.valueDeclaration;
69596
69657
  let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
69597
69658
  const assignmentKind = getAssignmentTargetKind(node);
69598
69659
  if (assignmentKind) {
@@ -84579,7 +84640,6 @@ function createTypeChecker(host) {
84579
84640
  if (links.isDeclarationWithCollidingName === void 0) {
84580
84641
  const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration);
84581
84642
  if (isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) {
84582
- const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
84583
84643
  if (resolveName(
84584
84644
  container.parent,
84585
84645
  symbol.escapedName,
@@ -84590,8 +84650,8 @@ function createTypeChecker(host) {
84590
84650
  false
84591
84651
  )) {
84592
84652
  links.isDeclarationWithCollidingName = true;
84593
- } else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
84594
- const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
84653
+ } else if (hasNodeCheckFlag(symbol.valueDeclaration, 16384 /* CapturedBlockScopedBinding */)) {
84654
+ const isDeclaredInLoop = hasNodeCheckFlag(symbol.valueDeclaration, 32768 /* BlockScopedBindingInLoop */);
84595
84655
  const inLoopInitializer = isIterationStatement(
84596
84656
  container,
84597
84657
  /*lookInLabeledStatements*/
@@ -84673,6 +84733,9 @@ function createTypeChecker(host) {
84673
84733
  if (!symbol) {
84674
84734
  return false;
84675
84735
  }
84736
+ const container = getSourceFileOfNode(symbol.valueDeclaration);
84737
+ const fileSymbol = container && getSymbolOfDeclaration(container);
84738
+ void resolveExternalModuleSymbol(fileSymbol);
84676
84739
  const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
84677
84740
  if (target === unknownSymbol) {
84678
84741
  return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
@@ -84771,6 +84834,108 @@ function createTypeChecker(host) {
84771
84834
  if (nodeId < 0 || nodeId >= nodeLinks.length) return 0;
84772
84835
  return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0;
84773
84836
  }
84837
+ function hasNodeCheckFlag(node, flag) {
84838
+ calculateNodeCheckFlagWorker(node, flag);
84839
+ return !!(getNodeCheckFlags(node) & flag);
84840
+ }
84841
+ function calculateNodeCheckFlagWorker(node, flag) {
84842
+ if (!compilerOptions.noCheck) {
84843
+ return;
84844
+ }
84845
+ const links = getNodeLinks(node);
84846
+ if (links.calculatedFlags & flag) {
84847
+ return;
84848
+ }
84849
+ switch (flag) {
84850
+ case 16 /* SuperInstance */:
84851
+ case 32 /* SuperStatic */:
84852
+ return checkSingleSuperExpression(node);
84853
+ case 128 /* MethodWithSuperPropertyAccessInAsync */:
84854
+ case 256 /* MethodWithSuperPropertyAssignmentInAsync */:
84855
+ case 2097152 /* ContainsSuperPropertyInStaticInitializer */:
84856
+ return checkChildSuperExpressions(node);
84857
+ case 512 /* CaptureArguments */:
84858
+ case 8192 /* ContainsCapturedBlockScopeBinding */:
84859
+ case 65536 /* NeedsLoopOutParameter */:
84860
+ case 262144 /* ContainsConstructorReference */:
84861
+ return checkChildIdentifiers(node);
84862
+ case 536870912 /* ConstructorReference */:
84863
+ return checkSingleIdentifier(node);
84864
+ case 4096 /* LoopWithCapturedBlockScopedBinding */:
84865
+ case 32768 /* BlockScopedBindingInLoop */:
84866
+ case 16384 /* CapturedBlockScopedBinding */:
84867
+ return checkContainingBlockScopeBindingUses(node);
84868
+ default:
84869
+ return Debug.assertNever(flag, `Unhandled node check flag calculation: ${Debug.formatNodeCheckFlags(flag)}`);
84870
+ }
84871
+ function forEachNodeRecursively(root, cb) {
84872
+ const rootResult = cb(root, root.parent);
84873
+ if (rootResult === "skip") return void 0;
84874
+ if (rootResult) return rootResult;
84875
+ return forEachChildRecursively(root, cb);
84876
+ }
84877
+ function checkSuperExpressions(node2) {
84878
+ const links2 = getNodeLinks(node2);
84879
+ if (links2.calculatedFlags & flag) return "skip";
84880
+ links2.calculatedFlags |= 128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */ | 2097152 /* ContainsSuperPropertyInStaticInitializer */;
84881
+ checkSingleSuperExpression(node2);
84882
+ return void 0;
84883
+ }
84884
+ function checkChildSuperExpressions(node2) {
84885
+ forEachNodeRecursively(node2, checkSuperExpressions);
84886
+ }
84887
+ function checkSingleSuperExpression(node2) {
84888
+ const nodeLinks2 = getNodeLinks(node2);
84889
+ nodeLinks2.calculatedFlags |= 16 /* SuperInstance */ | 32 /* SuperStatic */;
84890
+ if (node2.kind === 108 /* SuperKeyword */) {
84891
+ checkSuperExpression(node2);
84892
+ }
84893
+ }
84894
+ function checkIdentifiers(node2) {
84895
+ const links2 = getNodeLinks(node2);
84896
+ if (links2.calculatedFlags & flag) return "skip";
84897
+ links2.calculatedFlags |= 512 /* CaptureArguments */ | 8192 /* ContainsCapturedBlockScopeBinding */ | 65536 /* NeedsLoopOutParameter */ | 262144 /* ContainsConstructorReference */;
84898
+ checkSingleIdentifier(node2);
84899
+ return void 0;
84900
+ }
84901
+ function checkChildIdentifiers(node2) {
84902
+ forEachNodeRecursively(node2, checkIdentifiers);
84903
+ }
84904
+ function checkSingleIdentifier(node2) {
84905
+ const nodeLinks2 = getNodeLinks(node2);
84906
+ nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
84907
+ if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
84908
+ const s = getSymbolAtLocation(
84909
+ node2,
84910
+ /*ignoreErrors*/
84911
+ true
84912
+ );
84913
+ if (s && s !== unknownSymbol) {
84914
+ checkIdentifierCalculateNodeCheckFlags(node2, s);
84915
+ }
84916
+ }
84917
+ }
84918
+ function checkBlockScopeBindings(node2) {
84919
+ const links2 = getNodeLinks(node2);
84920
+ if (links2.calculatedFlags & flag) return "skip";
84921
+ links2.calculatedFlags |= 4096 /* LoopWithCapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */;
84922
+ checkSingleBlockScopeBinding(node2);
84923
+ return void 0;
84924
+ }
84925
+ function checkContainingBlockScopeBindingUses(node2) {
84926
+ const scope = getEnclosingBlockScopeContainer(isDeclarationName(node2) ? node2.parent : node2);
84927
+ forEachNodeRecursively(scope, checkBlockScopeBindings);
84928
+ }
84929
+ function checkSingleBlockScopeBinding(node2) {
84930
+ checkSingleIdentifier(node2);
84931
+ if (isComputedPropertyName(node2)) {
84932
+ checkComputedPropertyName(node2);
84933
+ }
84934
+ if (isPrivateIdentifier(node2) && isClassElement(node2.parent)) {
84935
+ setNodeLinksForPrivateIdentifierScope(node2.parent);
84936
+ }
84937
+ }
84938
+ }
84774
84939
  function getEnumMemberValue(node) {
84775
84940
  computeEnumMemberValues(node.parent);
84776
84941
  return getNodeLinks(node).enumMemberValue ?? evaluatorResult(
@@ -84791,7 +84956,15 @@ function createTypeChecker(host) {
84791
84956
  if (node.kind === 306 /* EnumMember */) {
84792
84957
  return getEnumMemberValue(node).value;
84793
84958
  }
84794
- const symbol = getNodeLinks(node).resolvedSymbol;
84959
+ if (!getNodeLinks(node).resolvedSymbol) {
84960
+ void checkExpressionCached(node);
84961
+ }
84962
+ const symbol = getNodeLinks(node).resolvedSymbol || (isEntityNameExpression(node) ? resolveEntityName(
84963
+ node,
84964
+ 111551 /* Value */,
84965
+ /*ignoreErrors*/
84966
+ true
84967
+ ) : void 0);
84795
84968
  if (symbol && symbol.flags & 8 /* EnumMember */) {
84796
84969
  const member = symbol.valueDeclaration;
84797
84970
  if (isEnumConst(member.parent)) {
@@ -85142,9 +85315,10 @@ function createTypeChecker(host) {
85142
85315
  const node = getParseTreeNode(nodeIn);
85143
85316
  return node && canCollectSymbolAliasAccessabilityData ? isReferencedAliasDeclaration(node, checkChildren) : true;
85144
85317
  },
85145
- getNodeCheckFlags: (nodeIn) => {
85318
+ hasNodeCheckFlag: (nodeIn, flag) => {
85146
85319
  const node = getParseTreeNode(nodeIn);
85147
- return node ? getNodeCheckFlags(node) : 0;
85320
+ if (!node) return false;
85321
+ return hasNodeCheckFlag(node, flag);
85148
85322
  },
85149
85323
  isTopLevelValueImportEqualsWithEntityName,
85150
85324
  isDeclarationVisible,
@@ -85167,6 +85341,10 @@ function createTypeChecker(host) {
85167
85341
  return node ? getEnumMemberValue(node) : void 0;
85168
85342
  },
85169
85343
  collectLinkedAliases,
85344
+ markLinkedReferences: (nodeIn) => {
85345
+ const node = getParseTreeNode(nodeIn);
85346
+ return node && markLinkedReferences(node, 0 /* Unspecified */);
85347
+ },
85170
85348
  getReferencedValueDeclaration,
85171
85349
  getReferencedValueDeclarations,
85172
85350
  getTypeReferenceSerializationKind,
@@ -92958,7 +93136,7 @@ function transformClassFields(context) {
92958
93136
  containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
92959
93137
  } else if (isPrivateIdentifierClassElementDeclaration(member)) {
92960
93138
  containsInstancePrivateElements = true;
92961
- if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) {
93139
+ if (resolver.hasNodeCheckFlag(member, 262144 /* ContainsConstructorReference */)) {
92962
93140
  facts |= 2 /* NeedsClassConstructorReference */;
92963
93141
  }
92964
93142
  } else if (isPropertyDeclaration(member)) {
@@ -93065,7 +93243,7 @@ function transformClassFields(context) {
93065
93243
  if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
93066
93244
  getClassLexicalEnvironment().classThis = node.emitNode.classThis;
93067
93245
  }
93068
- const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */;
93246
+ const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);
93069
93247
  const isExport = hasSyntacticModifier(node, 32 /* Export */);
93070
93248
  const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
93071
93249
  let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);
@@ -93127,15 +93305,14 @@ function transformClassFields(context) {
93127
93305
  var _a, _b, _c;
93128
93306
  const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
93129
93307
  const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
93130
- const classCheckFlags = resolver.getNodeCheckFlags(node);
93131
- const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */;
93308
+ const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);
93309
+ const requiresBlockScopedVar = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);
93132
93310
  let temp;
93133
93311
  function createClassTempVar() {
93134
93312
  var _a2;
93135
93313
  if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) {
93136
93314
  return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;
93137
93315
  }
93138
- const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
93139
93316
  const temp2 = factory2.createTempVariable(
93140
93317
  requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,
93141
93318
  /*reservedInNestedScopes*/
@@ -93703,7 +93880,7 @@ function transformClassFields(context) {
93703
93880
  const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
93704
93881
  if (!alreadyTransformed && !inlinable && shouldHoist) {
93705
93882
  const generatedName = factory2.getGeneratedNameForNode(name);
93706
- if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
93883
+ if (resolver.hasNodeCheckFlag(name, 32768 /* BlockScopedBindingInLoop */)) {
93707
93884
  addBlockScopedVariable(generatedName);
93708
93885
  } else {
93709
93886
  hoistVariableDeclaration(generatedName);
@@ -93857,7 +94034,7 @@ function transformClassFields(context) {
93857
94034
  prefix,
93858
94035
  suffix
93859
94036
  );
93860
- if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
94037
+ if (resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */)) {
93861
94038
  addBlockScopedVariable(identifier);
93862
94039
  } else {
93863
94040
  hoistVariableDeclaration(identifier);
@@ -94096,7 +94273,7 @@ function transformClassFields(context) {
94096
94273
  }
94097
94274
  function trySubstituteClassAlias(node) {
94098
94275
  if (enabledSubstitutions & 1 /* ClassAliases */) {
94099
- if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
94276
+ if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {
94100
94277
  const declaration = resolver.getReferencedValueDeclaration(node);
94101
94278
  if (declaration) {
94102
94279
  const classAlias = classAliases[declaration.id];
@@ -94963,7 +95140,7 @@ function transformLegacyDecorators(context) {
94963
95140
  }
94964
95141
  }
94965
95142
  function getClassAliasIfNeeded(node) {
94966
- if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) {
95143
+ if (resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */)) {
94967
95144
  enableSubstitutionForClassAliases();
94968
95145
  const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
94969
95146
  classAliases[getOriginalNodeId(node)] = classAlias;
@@ -94996,7 +95173,7 @@ function transformLegacyDecorators(context) {
94996
95173
  }
94997
95174
  function trySubstituteClassAlias(node) {
94998
95175
  if (classAliases) {
94999
- if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
95176
+ if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {
95000
95177
  const declaration = resolver.getReferencedValueDeclaration(node);
95001
95178
  if (declaration) {
95002
95179
  const classAlias = classAliases[declaration.id];
@@ -97305,7 +97482,7 @@ function transformES2017(context) {
97305
97482
  hasSuperElementAccess = false;
97306
97483
  let updated = visitFunctionBody(node.body, visitor, context);
97307
97484
  const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
97308
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
97485
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
97309
97486
  if (emitSuperHelpers) {
97310
97487
  enableSubstitutionForAsyncMethodsWithSuper();
97311
97488
  if (capturedSuperProperties.size) {
@@ -97316,9 +97493,9 @@ function transformES2017(context) {
97316
97493
  updated = factory2.updateBlock(updated, statements);
97317
97494
  }
97318
97495
  if (hasSuperElementAccess) {
97319
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
97496
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
97320
97497
  addEmitHelper(updated, advancedAsyncSuperHelper);
97321
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
97498
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
97322
97499
  addEmitHelper(updated, asyncSuperHelper);
97323
97500
  }
97324
97501
  }
@@ -97385,7 +97562,7 @@ function transformES2017(context) {
97385
97562
  const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
97386
97563
  const isArrowFunction2 = node.kind === 219 /* ArrowFunction */;
97387
97564
  const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
97388
- const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
97565
+ const hasLexicalArguments = resolver.hasNodeCheckFlag(node, 512 /* CaptureArguments */);
97389
97566
  const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding;
97390
97567
  if (captureLexicalArguments) {
97391
97568
  lexicalArgumentsBinding = factory2.createUniqueName("arguments");
@@ -97440,7 +97617,7 @@ function transformES2017(context) {
97440
97617
  )
97441
97618
  )
97442
97619
  );
97443
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
97620
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));
97444
97621
  if (emitSuperHelpers) {
97445
97622
  enableSubstitutionForAsyncMethodsWithSuper();
97446
97623
  if (capturedSuperProperties.size) {
@@ -97459,9 +97636,9 @@ function transformES2017(context) {
97459
97636
  );
97460
97637
  setTextRange(block, node.body);
97461
97638
  if (emitSuperHelpers && hasSuperElementAccess) {
97462
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
97639
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
97463
97640
  addEmitHelper(block, advancedAsyncSuperHelper);
97464
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
97641
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
97465
97642
  addEmitHelper(block, asyncSuperHelper);
97466
97643
  }
97467
97644
  }
@@ -97520,7 +97697,7 @@ function transformES2017(context) {
97520
97697
  }
97521
97698
  function onEmitNode(hint, node, emitCallback) {
97522
97699
  if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
97523
- const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
97700
+ const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);
97524
97701
  if (superContainerFlags !== enclosingSuperContainerFlags) {
97525
97702
  const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
97526
97703
  enclosingSuperContainerFlags = superContainerFlags;
@@ -97624,7 +97801,7 @@ function transformES2017(context) {
97624
97801
  }
97625
97802
  }
97626
97803
  function createSuperAccessVariableStatement(factory2, resolver, node, names) {
97627
- const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
97804
+ const hasBinding = resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */);
97628
97805
  const accessors = [];
97629
97806
  names.forEach((_, key) => {
97630
97807
  const name = unescapeLeadingUnderscores(key);
@@ -98719,7 +98896,7 @@ function transformES2018(context) {
98719
98896
  !!(hierarchyFacts & 1 /* HasLexicalThis */)
98720
98897
  )
98721
98898
  );
98722
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
98899
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));
98723
98900
  if (emitSuperHelpers) {
98724
98901
  enableSubstitutionForAsyncMethodsWithSuper();
98725
98902
  const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
@@ -98729,9 +98906,9 @@ function transformES2018(context) {
98729
98906
  outerStatements.push(returnStatement);
98730
98907
  const block = factory2.updateBlock(node.body, outerStatements);
98731
98908
  if (emitSuperHelpers && hasSuperElementAccess) {
98732
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
98909
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
98733
98910
  addEmitHelper(block, advancedAsyncSuperHelper);
98734
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
98911
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
98735
98912
  addEmitHelper(block, asyncSuperHelper);
98736
98913
  }
98737
98914
  }
@@ -98864,7 +99041,7 @@ function transformES2018(context) {
98864
99041
  }
98865
99042
  function onEmitNode(hint, node, emitCallback) {
98866
99043
  if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
98867
- const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
99044
+ const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);
98868
99045
  if (superContainerFlags !== enclosingSuperContainerFlags) {
98869
99046
  const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
98870
99047
  enclosingSuperContainerFlags = superContainerFlags;
@@ -102569,9 +102746,8 @@ function transformES2015(context) {
102569
102746
  return createRange(pos, end);
102570
102747
  }
102571
102748
  function shouldEmitExplicitInitializerForLetDeclaration(node) {
102572
- const flags = resolver.getNodeCheckFlags(node);
102573
- const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
102574
- const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
102749
+ const isCapturedInFunction = resolver.hasNodeCheckFlag(node, 16384 /* CapturedBlockScopedBinding */);
102750
+ const isDeclaredInLoop = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);
102575
102751
  const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
102576
102752
  const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
102577
102753
  return emitExplicitInitializer;
@@ -103022,7 +103198,7 @@ function transformES2015(context) {
103022
103198
  return factory2.inlineExpressions(expressions);
103023
103199
  }
103024
103200
  function shouldConvertPartOfIterationStatement(node) {
103025
- return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
103201
+ return resolver.hasNodeCheckFlag(node, 8192 /* ContainsCapturedBlockScopeBinding */);
103026
103202
  }
103027
103203
  function shouldConvertInitializerOfForStatement(node) {
103028
103204
  return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
@@ -103037,7 +103213,7 @@ function transformES2015(context) {
103037
103213
  return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
103038
103214
  }
103039
103215
  function shouldConvertBodyOfIterationStatement(node) {
103040
- return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
103216
+ return resolver.hasNodeCheckFlag(node, 4096 /* LoopWithCapturedBlockScopedBinding */);
103041
103217
  }
103042
103218
  function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
103043
103219
  if (!state.hoistedLocalVariables) {
@@ -103586,11 +103762,11 @@ function transformES2015(context) {
103586
103762
  void 0,
103587
103763
  name
103588
103764
  ));
103589
- const checkFlags = resolver.getNodeCheckFlags(decl);
103590
- if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
103765
+ const needsOutParam = resolver.hasNodeCheckFlag(decl, 65536 /* NeedsLoopOutParameter */);
103766
+ if (needsOutParam || hasCapturedBindingsInForHead) {
103591
103767
  const outParamName = factory2.createUniqueName("out_" + idText(name));
103592
103768
  let flags = 0 /* None */;
103593
- if (checkFlags & 65536 /* NeedsLoopOutParameter */) {
103769
+ if (needsOutParam) {
103594
103770
  flags |= 1 /* Body */;
103595
103771
  }
103596
103772
  if (isForStatement(container)) {
@@ -112619,6 +112795,9 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
112619
112795
  emitSkipped = true;
112620
112796
  return;
112621
112797
  }
112798
+ if (compilerOptions.noCheck) {
112799
+ (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(markLinkedReferences);
112800
+ }
112622
112801
  const transform = transformNodes(
112623
112802
  resolver,
112624
112803
  host,
@@ -112753,6 +112932,13 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
112753
112932
  }
112754
112933
  forEachChild(node, collectLinkedAliases);
112755
112934
  }
112935
+ function markLinkedReferences(file) {
112936
+ forEachChildRecursively(file, (n) => {
112937
+ if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32 /* Export */)) return "skip";
112938
+ if (isImportDeclaration(n)) return "skip";
112939
+ resolver.markLinkedReferences(n);
112940
+ });
112941
+ }
112756
112942
  function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform, printer, mapOptions) {
112757
112943
  const sourceFileOrBundle = transform.transformed[0];
112758
112944
  const bundle = sourceFileOrBundle.kind === 308 /* Bundle */ ? sourceFileOrBundle : void 0;
@@ -112884,10 +113070,11 @@ var notImplementedResolver = {
112884
113070
  isValueAliasDeclaration: notImplemented,
112885
113071
  isReferencedAliasDeclaration: notImplemented,
112886
113072
  isTopLevelValueImportEqualsWithEntityName: notImplemented,
112887
- getNodeCheckFlags: notImplemented,
113073
+ hasNodeCheckFlag: notImplemented,
112888
113074
  isDeclarationVisible: notImplemented,
112889
113075
  isLateBound: (_node) => false,
112890
113076
  collectLinkedAliases: notImplemented,
113077
+ markLinkedReferences: notImplemented,
112891
113078
  isImplementationOfOverload: notImplemented,
112892
113079
  requiresAddingImplicitUndefined: notImplemented,
112893
113080
  isExpandoFunctionDeclaration: notImplemented,
@@ -120977,9 +121164,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
120977
121164
  if (options.noEmit) {
120978
121165
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
120979
121166
  }
120980
- if (!options.emitDeclarationOnly) {
120981
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
120982
- }
120983
121167
  }
120984
121168
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
120985
121169
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
package/lib/typescript.js CHANGED
@@ -4252,6 +4252,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
4252
4252
  );
4253
4253
  }
4254
4254
  Debug2.formatNodeFlags = formatNodeFlags;
4255
+ function formatNodeCheckFlags(flags) {
4256
+ return formatEnum(
4257
+ flags,
4258
+ NodeCheckFlags,
4259
+ /*isFlags*/
4260
+ true
4261
+ );
4262
+ }
4263
+ Debug2.formatNodeCheckFlags = formatNodeCheckFlags;
4255
4264
  function formatModifierFlags(flags) {
4256
4265
  return formatEnum(
4257
4266
  flags,
@@ -6544,32 +6553,33 @@ var InternalSymbolName = /* @__PURE__ */ ((InternalSymbolName2) => {
6544
6553
  InternalSymbolName2["ImportAttributes"] = "__importAttributes";
6545
6554
  return InternalSymbolName2;
6546
6555
  })(InternalSymbolName || {});
6547
- var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
6548
- NodeCheckFlags2[NodeCheckFlags2["None"] = 0] = "None";
6549
- NodeCheckFlags2[NodeCheckFlags2["TypeChecked"] = 1] = "TypeChecked";
6550
- NodeCheckFlags2[NodeCheckFlags2["LexicalThis"] = 2] = "LexicalThis";
6551
- NodeCheckFlags2[NodeCheckFlags2["CaptureThis"] = 4] = "CaptureThis";
6552
- NodeCheckFlags2[NodeCheckFlags2["CaptureNewTarget"] = 8] = "CaptureNewTarget";
6553
- NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] = 16] = "SuperInstance";
6554
- NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] = 32] = "SuperStatic";
6555
- NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] = 64] = "ContextChecked";
6556
- NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
6557
- NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
6558
- NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] = 512] = "CaptureArguments";
6559
- NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
6560
- NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
6561
- NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
6562
- NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
6563
- NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
6564
- NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
6565
- NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter";
6566
- NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked";
6567
- NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference";
6568
- NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference";
6569
- NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers";
6570
- NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer";
6571
- NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier";
6572
- return NodeCheckFlags2;
6556
+ var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags3) => {
6557
+ NodeCheckFlags3[NodeCheckFlags3["None"] = 0] = "None";
6558
+ NodeCheckFlags3[NodeCheckFlags3["TypeChecked"] = 1] = "TypeChecked";
6559
+ NodeCheckFlags3[NodeCheckFlags3["LexicalThis"] = 2] = "LexicalThis";
6560
+ NodeCheckFlags3[NodeCheckFlags3["CaptureThis"] = 4] = "CaptureThis";
6561
+ NodeCheckFlags3[NodeCheckFlags3["CaptureNewTarget"] = 8] = "CaptureNewTarget";
6562
+ NodeCheckFlags3[NodeCheckFlags3["SuperInstance"] = 16] = "SuperInstance";
6563
+ NodeCheckFlags3[NodeCheckFlags3["SuperStatic"] = 32] = "SuperStatic";
6564
+ NodeCheckFlags3[NodeCheckFlags3["ContextChecked"] = 64] = "ContextChecked";
6565
+ NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
6566
+ NodeCheckFlags3[NodeCheckFlags3["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
6567
+ NodeCheckFlags3[NodeCheckFlags3["CaptureArguments"] = 512] = "CaptureArguments";
6568
+ NodeCheckFlags3[NodeCheckFlags3["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
6569
+ NodeCheckFlags3[NodeCheckFlags3["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
6570
+ NodeCheckFlags3[NodeCheckFlags3["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
6571
+ NodeCheckFlags3[NodeCheckFlags3["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
6572
+ NodeCheckFlags3[NodeCheckFlags3["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
6573
+ NodeCheckFlags3[NodeCheckFlags3["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
6574
+ NodeCheckFlags3[NodeCheckFlags3["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter";
6575
+ NodeCheckFlags3[NodeCheckFlags3["AssignmentsMarked"] = 131072] = "AssignmentsMarked";
6576
+ NodeCheckFlags3[NodeCheckFlags3["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference";
6577
+ NodeCheckFlags3[NodeCheckFlags3["ConstructorReference"] = 536870912] = "ConstructorReference";
6578
+ NodeCheckFlags3[NodeCheckFlags3["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers";
6579
+ NodeCheckFlags3[NodeCheckFlags3["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer";
6580
+ NodeCheckFlags3[NodeCheckFlags3["InCheckIdentifier"] = 4194304] = "InCheckIdentifier";
6581
+ NodeCheckFlags3[NodeCheckFlags3["LazyFlags"] = 539358128] = "LazyFlags";
6582
+ return NodeCheckFlags3;
6573
6583
  })(NodeCheckFlags || {});
6574
6584
  var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
6575
6585
  TypeFlags2[TypeFlags2["Any"] = 1] = "Any";
@@ -40326,7 +40336,7 @@ var commandOptionsWithoutBuild = [
40326
40336
  showInSimplifiedHelpView: false,
40327
40337
  category: Diagnostics.Compiler_Diagnostics,
40328
40338
  description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
40329
- transpileOptionValue: void 0,
40339
+ transpileOptionValue: true,
40330
40340
  defaultValueDescription: false,
40331
40341
  affectsSemanticDiagnostics: true,
40332
40342
  affectsBuildInfo: true,
@@ -52472,10 +52482,22 @@ function createTypeChecker(host) {
52472
52482
  return !!aliasDeclarationLinks.typeOnlyDeclaration;
52473
52483
  }
52474
52484
  function getTypeOnlyAliasDeclaration(symbol, include) {
52485
+ var _a;
52475
52486
  if (!(symbol.flags & 2097152 /* Alias */)) {
52476
52487
  return void 0;
52477
52488
  }
52478
52489
  const links = getSymbolLinks(symbol);
52490
+ if (links.typeOnlyDeclaration === void 0) {
52491
+ links.typeOnlyDeclaration = false;
52492
+ const resolved = resolveSymbol(symbol);
52493
+ markSymbolOfAliasDeclarationIfTypeOnly(
52494
+ (_a = symbol.declarations) == null ? void 0 : _a[0],
52495
+ getDeclarationOfAliasSymbol(symbol) && getImmediateAliasedSymbol(symbol),
52496
+ resolved,
52497
+ /*overwriteEmpty*/
52498
+ true
52499
+ );
52500
+ }
52479
52501
  if (include === void 0) {
52480
52502
  return links.typeOnlyDeclaration || void 0;
52481
52503
  }
@@ -73972,9 +73994,6 @@ function createTypeChecker(host) {
73972
73994
  if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) {
73973
73995
  return markJsxAliasReferenced(location);
73974
73996
  }
73975
- if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
73976
- return markAsyncFunctionAliasReferenced(location);
73977
- }
73978
73997
  if (isImportEqualsDeclaration(location)) {
73979
73998
  if (isInternalModuleImportEqualsDeclaration(location) || checkExternalImportOrExportDeclaration(location)) {
73980
73999
  return markImportEqualsAliasReferenced(location);
@@ -73984,6 +74003,9 @@ function createTypeChecker(host) {
73984
74003
  if (isExportSpecifier(location)) {
73985
74004
  return markExportSpecifierAliasReferenced(location);
73986
74005
  }
74006
+ if (isFunctionLikeDeclaration(location) || isMethodSignature(location)) {
74007
+ markAsyncFunctionAliasReferenced(location);
74008
+ }
73987
74009
  if (!compilerOptions.emitDecoratorMetadata) {
73988
74010
  return;
73989
74011
  }
@@ -74321,18 +74343,12 @@ function createTypeChecker(host) {
74321
74343
  }
74322
74344
  return type;
74323
74345
  }
74324
- function checkIdentifier(node, checkMode) {
74325
- if (isThisInTypeQuery(node)) {
74326
- return checkThisExpression(node);
74327
- }
74328
- const symbol = getResolvedSymbol(node);
74329
- if (symbol === unknownSymbol) {
74330
- return errorType;
74331
- }
74346
+ function checkIdentifierCalculateNodeCheckFlags(node, symbol) {
74347
+ if (isThisInTypeQuery(node)) return;
74332
74348
  if (symbol === argumentsSymbol) {
74333
74349
  if (isInPropertyInitializerOrClassStaticBlock(node)) {
74334
74350
  error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
74335
- return errorType;
74351
+ return;
74336
74352
  }
74337
74353
  let container = getContainingFunction(node);
74338
74354
  if (container) {
@@ -74351,17 +74367,14 @@ function createTypeChecker(host) {
74351
74367
  }
74352
74368
  }
74353
74369
  }
74354
- return getTypeOfSymbol(symbol);
74355
- }
74356
- if (shouldMarkIdentifierAliasReferenced(node)) {
74357
- markLinkedReferences(node, 1 /* Identifier */);
74370
+ return;
74358
74371
  }
74359
74372
  const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
74360
74373
  const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);
74361
74374
  if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
74362
74375
  addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
74363
74376
  }
74364
- let declaration = localOrExportSymbol.valueDeclaration;
74377
+ const declaration = localOrExportSymbol.valueDeclaration;
74365
74378
  if (declaration && localOrExportSymbol.flags & 32 /* Class */) {
74366
74379
  if (isClassLike(declaration) && declaration.name !== node) {
74367
74380
  let container = getThisContainer(
@@ -74388,6 +74401,27 @@ function createTypeChecker(host) {
74388
74401
  }
74389
74402
  }
74390
74403
  checkNestedBlockScopedBinding(node, symbol);
74404
+ }
74405
+ function checkIdentifier(node, checkMode) {
74406
+ if (isThisInTypeQuery(node)) {
74407
+ return checkThisExpression(node);
74408
+ }
74409
+ const symbol = getResolvedSymbol(node);
74410
+ if (symbol === unknownSymbol) {
74411
+ return errorType;
74412
+ }
74413
+ checkIdentifierCalculateNodeCheckFlags(node, symbol);
74414
+ if (symbol === argumentsSymbol) {
74415
+ if (isInPropertyInitializerOrClassStaticBlock(node)) {
74416
+ return errorType;
74417
+ }
74418
+ return getTypeOfSymbol(symbol);
74419
+ }
74420
+ if (shouldMarkIdentifierAliasReferenced(node)) {
74421
+ markLinkedReferences(node, 1 /* Identifier */);
74422
+ }
74423
+ const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
74424
+ let declaration = localOrExportSymbol.valueDeclaration;
74391
74425
  let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
74392
74426
  const assignmentKind = getAssignmentTargetKind(node);
74393
74427
  if (assignmentKind) {
@@ -89374,7 +89408,6 @@ function createTypeChecker(host) {
89374
89408
  if (links.isDeclarationWithCollidingName === void 0) {
89375
89409
  const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration);
89376
89410
  if (isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) {
89377
- const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
89378
89411
  if (resolveName(
89379
89412
  container.parent,
89380
89413
  symbol.escapedName,
@@ -89385,8 +89418,8 @@ function createTypeChecker(host) {
89385
89418
  false
89386
89419
  )) {
89387
89420
  links.isDeclarationWithCollidingName = true;
89388
- } else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
89389
- const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
89421
+ } else if (hasNodeCheckFlag(symbol.valueDeclaration, 16384 /* CapturedBlockScopedBinding */)) {
89422
+ const isDeclaredInLoop = hasNodeCheckFlag(symbol.valueDeclaration, 32768 /* BlockScopedBindingInLoop */);
89390
89423
  const inLoopInitializer = isIterationStatement(
89391
89424
  container,
89392
89425
  /*lookInLabeledStatements*/
@@ -89468,6 +89501,9 @@ function createTypeChecker(host) {
89468
89501
  if (!symbol) {
89469
89502
  return false;
89470
89503
  }
89504
+ const container = getSourceFileOfNode(symbol.valueDeclaration);
89505
+ const fileSymbol = container && getSymbolOfDeclaration(container);
89506
+ void resolveExternalModuleSymbol(fileSymbol);
89471
89507
  const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
89472
89508
  if (target === unknownSymbol) {
89473
89509
  return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
@@ -89566,6 +89602,108 @@ function createTypeChecker(host) {
89566
89602
  if (nodeId < 0 || nodeId >= nodeLinks.length) return 0;
89567
89603
  return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0;
89568
89604
  }
89605
+ function hasNodeCheckFlag(node, flag) {
89606
+ calculateNodeCheckFlagWorker(node, flag);
89607
+ return !!(getNodeCheckFlags(node) & flag);
89608
+ }
89609
+ function calculateNodeCheckFlagWorker(node, flag) {
89610
+ if (!compilerOptions.noCheck) {
89611
+ return;
89612
+ }
89613
+ const links = getNodeLinks(node);
89614
+ if (links.calculatedFlags & flag) {
89615
+ return;
89616
+ }
89617
+ switch (flag) {
89618
+ case 16 /* SuperInstance */:
89619
+ case 32 /* SuperStatic */:
89620
+ return checkSingleSuperExpression(node);
89621
+ case 128 /* MethodWithSuperPropertyAccessInAsync */:
89622
+ case 256 /* MethodWithSuperPropertyAssignmentInAsync */:
89623
+ case 2097152 /* ContainsSuperPropertyInStaticInitializer */:
89624
+ return checkChildSuperExpressions(node);
89625
+ case 512 /* CaptureArguments */:
89626
+ case 8192 /* ContainsCapturedBlockScopeBinding */:
89627
+ case 65536 /* NeedsLoopOutParameter */:
89628
+ case 262144 /* ContainsConstructorReference */:
89629
+ return checkChildIdentifiers(node);
89630
+ case 536870912 /* ConstructorReference */:
89631
+ return checkSingleIdentifier(node);
89632
+ case 4096 /* LoopWithCapturedBlockScopedBinding */:
89633
+ case 32768 /* BlockScopedBindingInLoop */:
89634
+ case 16384 /* CapturedBlockScopedBinding */:
89635
+ return checkContainingBlockScopeBindingUses(node);
89636
+ default:
89637
+ return Debug.assertNever(flag, `Unhandled node check flag calculation: ${Debug.formatNodeCheckFlags(flag)}`);
89638
+ }
89639
+ function forEachNodeRecursively(root, cb) {
89640
+ const rootResult = cb(root, root.parent);
89641
+ if (rootResult === "skip") return void 0;
89642
+ if (rootResult) return rootResult;
89643
+ return forEachChildRecursively(root, cb);
89644
+ }
89645
+ function checkSuperExpressions(node2) {
89646
+ const links2 = getNodeLinks(node2);
89647
+ if (links2.calculatedFlags & flag) return "skip";
89648
+ links2.calculatedFlags |= 128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */ | 2097152 /* ContainsSuperPropertyInStaticInitializer */;
89649
+ checkSingleSuperExpression(node2);
89650
+ return void 0;
89651
+ }
89652
+ function checkChildSuperExpressions(node2) {
89653
+ forEachNodeRecursively(node2, checkSuperExpressions);
89654
+ }
89655
+ function checkSingleSuperExpression(node2) {
89656
+ const nodeLinks2 = getNodeLinks(node2);
89657
+ nodeLinks2.calculatedFlags |= 16 /* SuperInstance */ | 32 /* SuperStatic */;
89658
+ if (node2.kind === 108 /* SuperKeyword */) {
89659
+ checkSuperExpression(node2);
89660
+ }
89661
+ }
89662
+ function checkIdentifiers(node2) {
89663
+ const links2 = getNodeLinks(node2);
89664
+ if (links2.calculatedFlags & flag) return "skip";
89665
+ links2.calculatedFlags |= 512 /* CaptureArguments */ | 8192 /* ContainsCapturedBlockScopeBinding */ | 65536 /* NeedsLoopOutParameter */ | 262144 /* ContainsConstructorReference */;
89666
+ checkSingleIdentifier(node2);
89667
+ return void 0;
89668
+ }
89669
+ function checkChildIdentifiers(node2) {
89670
+ forEachNodeRecursively(node2, checkIdentifiers);
89671
+ }
89672
+ function checkSingleIdentifier(node2) {
89673
+ const nodeLinks2 = getNodeLinks(node2);
89674
+ nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */;
89675
+ if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) {
89676
+ const s = getSymbolAtLocation(
89677
+ node2,
89678
+ /*ignoreErrors*/
89679
+ true
89680
+ );
89681
+ if (s && s !== unknownSymbol) {
89682
+ checkIdentifierCalculateNodeCheckFlags(node2, s);
89683
+ }
89684
+ }
89685
+ }
89686
+ function checkBlockScopeBindings(node2) {
89687
+ const links2 = getNodeLinks(node2);
89688
+ if (links2.calculatedFlags & flag) return "skip";
89689
+ links2.calculatedFlags |= 4096 /* LoopWithCapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */;
89690
+ checkSingleBlockScopeBinding(node2);
89691
+ return void 0;
89692
+ }
89693
+ function checkContainingBlockScopeBindingUses(node2) {
89694
+ const scope = getEnclosingBlockScopeContainer(isDeclarationName(node2) ? node2.parent : node2);
89695
+ forEachNodeRecursively(scope, checkBlockScopeBindings);
89696
+ }
89697
+ function checkSingleBlockScopeBinding(node2) {
89698
+ checkSingleIdentifier(node2);
89699
+ if (isComputedPropertyName(node2)) {
89700
+ checkComputedPropertyName(node2);
89701
+ }
89702
+ if (isPrivateIdentifier(node2) && isClassElement(node2.parent)) {
89703
+ setNodeLinksForPrivateIdentifierScope(node2.parent);
89704
+ }
89705
+ }
89706
+ }
89569
89707
  function getEnumMemberValue(node) {
89570
89708
  computeEnumMemberValues(node.parent);
89571
89709
  return getNodeLinks(node).enumMemberValue ?? evaluatorResult(
@@ -89586,7 +89724,15 @@ function createTypeChecker(host) {
89586
89724
  if (node.kind === 306 /* EnumMember */) {
89587
89725
  return getEnumMemberValue(node).value;
89588
89726
  }
89589
- const symbol = getNodeLinks(node).resolvedSymbol;
89727
+ if (!getNodeLinks(node).resolvedSymbol) {
89728
+ void checkExpressionCached(node);
89729
+ }
89730
+ const symbol = getNodeLinks(node).resolvedSymbol || (isEntityNameExpression(node) ? resolveEntityName(
89731
+ node,
89732
+ 111551 /* Value */,
89733
+ /*ignoreErrors*/
89734
+ true
89735
+ ) : void 0);
89590
89736
  if (symbol && symbol.flags & 8 /* EnumMember */) {
89591
89737
  const member = symbol.valueDeclaration;
89592
89738
  if (isEnumConst(member.parent)) {
@@ -89937,9 +90083,10 @@ function createTypeChecker(host) {
89937
90083
  const node = getParseTreeNode(nodeIn);
89938
90084
  return node && canCollectSymbolAliasAccessabilityData ? isReferencedAliasDeclaration(node, checkChildren) : true;
89939
90085
  },
89940
- getNodeCheckFlags: (nodeIn) => {
90086
+ hasNodeCheckFlag: (nodeIn, flag) => {
89941
90087
  const node = getParseTreeNode(nodeIn);
89942
- return node ? getNodeCheckFlags(node) : 0;
90088
+ if (!node) return false;
90089
+ return hasNodeCheckFlag(node, flag);
89943
90090
  },
89944
90091
  isTopLevelValueImportEqualsWithEntityName,
89945
90092
  isDeclarationVisible,
@@ -89962,6 +90109,10 @@ function createTypeChecker(host) {
89962
90109
  return node ? getEnumMemberValue(node) : void 0;
89963
90110
  },
89964
90111
  collectLinkedAliases,
90112
+ markLinkedReferences: (nodeIn) => {
90113
+ const node = getParseTreeNode(nodeIn);
90114
+ return node && markLinkedReferences(node, 0 /* Unspecified */);
90115
+ },
89965
90116
  getReferencedValueDeclaration,
89966
90117
  getReferencedValueDeclarations,
89967
90118
  getTypeReferenceSerializationKind,
@@ -97935,7 +98086,7 @@ function transformClassFields(context) {
97935
98086
  containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
97936
98087
  } else if (isPrivateIdentifierClassElementDeclaration(member)) {
97937
98088
  containsInstancePrivateElements = true;
97938
- if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) {
98089
+ if (resolver.hasNodeCheckFlag(member, 262144 /* ContainsConstructorReference */)) {
97939
98090
  facts |= 2 /* NeedsClassConstructorReference */;
97940
98091
  }
97941
98092
  } else if (isPropertyDeclaration(member)) {
@@ -98042,7 +98193,7 @@ function transformClassFields(context) {
98042
98193
  if ((_b = node.emitNode) == null ? void 0 : _b.classThis) {
98043
98194
  getClassLexicalEnvironment().classThis = node.emitNode.classThis;
98044
98195
  }
98045
- const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */;
98196
+ const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);
98046
98197
  const isExport = hasSyntacticModifier(node, 32 /* Export */);
98047
98198
  const isDefault = hasSyntacticModifier(node, 2048 /* Default */);
98048
98199
  let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier);
@@ -98104,15 +98255,14 @@ function transformClassFields(context) {
98104
98255
  var _a, _b, _c;
98105
98256
  const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
98106
98257
  const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
98107
- const classCheckFlags = resolver.getNodeCheckFlags(node);
98108
- const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */;
98258
+ const isClassWithConstructorReference = resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */);
98259
+ const requiresBlockScopedVar = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);
98109
98260
  let temp;
98110
98261
  function createClassTempVar() {
98111
98262
  var _a2;
98112
98263
  if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) {
98113
98264
  return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;
98114
98265
  }
98115
- const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
98116
98266
  const temp2 = factory2.createTempVariable(
98117
98267
  requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,
98118
98268
  /*reservedInNestedScopes*/
@@ -98680,7 +98830,7 @@ function transformClassFields(context) {
98680
98830
  const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
98681
98831
  if (!alreadyTransformed && !inlinable && shouldHoist) {
98682
98832
  const generatedName = factory2.getGeneratedNameForNode(name);
98683
- if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
98833
+ if (resolver.hasNodeCheckFlag(name, 32768 /* BlockScopedBindingInLoop */)) {
98684
98834
  addBlockScopedVariable(generatedName);
98685
98835
  } else {
98686
98836
  hoistVariableDeclaration(generatedName);
@@ -98834,7 +98984,7 @@ function transformClassFields(context) {
98834
98984
  prefix,
98835
98985
  suffix
98836
98986
  );
98837
- if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
98987
+ if (resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */)) {
98838
98988
  addBlockScopedVariable(identifier);
98839
98989
  } else {
98840
98990
  hoistVariableDeclaration(identifier);
@@ -99073,7 +99223,7 @@ function transformClassFields(context) {
99073
99223
  }
99074
99224
  function trySubstituteClassAlias(node) {
99075
99225
  if (enabledSubstitutions & 1 /* ClassAliases */) {
99076
- if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
99226
+ if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {
99077
99227
  const declaration = resolver.getReferencedValueDeclaration(node);
99078
99228
  if (declaration) {
99079
99229
  const classAlias = classAliases[declaration.id];
@@ -99940,7 +100090,7 @@ function transformLegacyDecorators(context) {
99940
100090
  }
99941
100091
  }
99942
100092
  function getClassAliasIfNeeded(node) {
99943
- if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) {
100093
+ if (resolver.hasNodeCheckFlag(node, 262144 /* ContainsConstructorReference */)) {
99944
100094
  enableSubstitutionForClassAliases();
99945
100095
  const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
99946
100096
  classAliases[getOriginalNodeId(node)] = classAlias;
@@ -99973,7 +100123,7 @@ function transformLegacyDecorators(context) {
99973
100123
  }
99974
100124
  function trySubstituteClassAlias(node) {
99975
100125
  if (classAliases) {
99976
- if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) {
100126
+ if (resolver.hasNodeCheckFlag(node, 536870912 /* ConstructorReference */)) {
99977
100127
  const declaration = resolver.getReferencedValueDeclaration(node);
99978
100128
  if (declaration) {
99979
100129
  const classAlias = classAliases[declaration.id];
@@ -102282,7 +102432,7 @@ function transformES2017(context) {
102282
102432
  hasSuperElementAccess = false;
102283
102433
  let updated = visitFunctionBody(node.body, visitor, context);
102284
102434
  const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
102285
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
102435
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
102286
102436
  if (emitSuperHelpers) {
102287
102437
  enableSubstitutionForAsyncMethodsWithSuper();
102288
102438
  if (capturedSuperProperties.size) {
@@ -102293,9 +102443,9 @@ function transformES2017(context) {
102293
102443
  updated = factory2.updateBlock(updated, statements);
102294
102444
  }
102295
102445
  if (hasSuperElementAccess) {
102296
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
102446
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
102297
102447
  addEmitHelper(updated, advancedAsyncSuperHelper);
102298
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
102448
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
102299
102449
  addEmitHelper(updated, asyncSuperHelper);
102300
102450
  }
102301
102451
  }
@@ -102362,7 +102512,7 @@ function transformES2017(context) {
102362
102512
  const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
102363
102513
  const isArrowFunction2 = node.kind === 219 /* ArrowFunction */;
102364
102514
  const savedLexicalArgumentsBinding = lexicalArgumentsBinding;
102365
- const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
102515
+ const hasLexicalArguments = resolver.hasNodeCheckFlag(node, 512 /* CaptureArguments */);
102366
102516
  const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding;
102367
102517
  if (captureLexicalArguments) {
102368
102518
  lexicalArgumentsBinding = factory2.createUniqueName("arguments");
@@ -102417,7 +102567,7 @@ function transformES2017(context) {
102417
102567
  )
102418
102568
  )
102419
102569
  );
102420
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
102570
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));
102421
102571
  if (emitSuperHelpers) {
102422
102572
  enableSubstitutionForAsyncMethodsWithSuper();
102423
102573
  if (capturedSuperProperties.size) {
@@ -102436,9 +102586,9 @@ function transformES2017(context) {
102436
102586
  );
102437
102587
  setTextRange(block, node.body);
102438
102588
  if (emitSuperHelpers && hasSuperElementAccess) {
102439
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
102589
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
102440
102590
  addEmitHelper(block, advancedAsyncSuperHelper);
102441
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
102591
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
102442
102592
  addEmitHelper(block, asyncSuperHelper);
102443
102593
  }
102444
102594
  }
@@ -102497,7 +102647,7 @@ function transformES2017(context) {
102497
102647
  }
102498
102648
  function onEmitNode(hint, node, emitCallback) {
102499
102649
  if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
102500
- const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
102650
+ const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);
102501
102651
  if (superContainerFlags !== enclosingSuperContainerFlags) {
102502
102652
  const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
102503
102653
  enclosingSuperContainerFlags = superContainerFlags;
@@ -102601,7 +102751,7 @@ function transformES2017(context) {
102601
102751
  }
102602
102752
  }
102603
102753
  function createSuperAccessVariableStatement(factory2, resolver, node, names) {
102604
- const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
102754
+ const hasBinding = resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */);
102605
102755
  const accessors = [];
102606
102756
  names.forEach((_, key) => {
102607
102757
  const name = unescapeLeadingUnderscores(key);
@@ -103696,7 +103846,7 @@ function transformES2018(context) {
103696
103846
  !!(hierarchyFacts & 1 /* HasLexicalThis */)
103697
103847
  )
103698
103848
  );
103699
- const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
103849
+ const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) || resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */));
103700
103850
  if (emitSuperHelpers) {
103701
103851
  enableSubstitutionForAsyncMethodsWithSuper();
103702
103852
  const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
@@ -103706,9 +103856,9 @@ function transformES2018(context) {
103706
103856
  outerStatements.push(returnStatement);
103707
103857
  const block = factory2.updateBlock(node.body, outerStatements);
103708
103858
  if (emitSuperHelpers && hasSuperElementAccess) {
103709
- if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
103859
+ if (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */)) {
103710
103860
  addEmitHelper(block, advancedAsyncSuperHelper);
103711
- } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
103861
+ } else if (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */)) {
103712
103862
  addEmitHelper(block, asyncSuperHelper);
103713
103863
  }
103714
103864
  }
@@ -103841,7 +103991,7 @@ function transformES2018(context) {
103841
103991
  }
103842
103992
  function onEmitNode(hint, node, emitCallback) {
103843
103993
  if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
103844
- const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
103994
+ const superContainerFlags = (resolver.hasNodeCheckFlag(node, 128 /* MethodWithSuperPropertyAccessInAsync */) ? 128 /* MethodWithSuperPropertyAccessInAsync */ : 0) | (resolver.hasNodeCheckFlag(node, 256 /* MethodWithSuperPropertyAssignmentInAsync */) ? 256 /* MethodWithSuperPropertyAssignmentInAsync */ : 0);
103845
103995
  if (superContainerFlags !== enclosingSuperContainerFlags) {
103846
103996
  const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
103847
103997
  enclosingSuperContainerFlags = superContainerFlags;
@@ -107546,9 +107696,8 @@ function transformES2015(context) {
107546
107696
  return createRange(pos, end);
107547
107697
  }
107548
107698
  function shouldEmitExplicitInitializerForLetDeclaration(node) {
107549
- const flags = resolver.getNodeCheckFlags(node);
107550
- const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
107551
- const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
107699
+ const isCapturedInFunction = resolver.hasNodeCheckFlag(node, 16384 /* CapturedBlockScopedBinding */);
107700
+ const isDeclaredInLoop = resolver.hasNodeCheckFlag(node, 32768 /* BlockScopedBindingInLoop */);
107552
107701
  const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
107553
107702
  const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
107554
107703
  return emitExplicitInitializer;
@@ -107999,7 +108148,7 @@ function transformES2015(context) {
107999
108148
  return factory2.inlineExpressions(expressions);
108000
108149
  }
108001
108150
  function shouldConvertPartOfIterationStatement(node) {
108002
- return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
108151
+ return resolver.hasNodeCheckFlag(node, 8192 /* ContainsCapturedBlockScopeBinding */);
108003
108152
  }
108004
108153
  function shouldConvertInitializerOfForStatement(node) {
108005
108154
  return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
@@ -108014,7 +108163,7 @@ function transformES2015(context) {
108014
108163
  return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
108015
108164
  }
108016
108165
  function shouldConvertBodyOfIterationStatement(node) {
108017
- return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
108166
+ return resolver.hasNodeCheckFlag(node, 4096 /* LoopWithCapturedBlockScopedBinding */);
108018
108167
  }
108019
108168
  function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
108020
108169
  if (!state.hoistedLocalVariables) {
@@ -108563,11 +108712,11 @@ function transformES2015(context) {
108563
108712
  void 0,
108564
108713
  name
108565
108714
  ));
108566
- const checkFlags = resolver.getNodeCheckFlags(decl);
108567
- if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
108715
+ const needsOutParam = resolver.hasNodeCheckFlag(decl, 65536 /* NeedsLoopOutParameter */);
108716
+ if (needsOutParam || hasCapturedBindingsInForHead) {
108568
108717
  const outParamName = factory2.createUniqueName("out_" + idText(name));
108569
108718
  let flags = 0 /* None */;
108570
- if (checkFlags & 65536 /* NeedsLoopOutParameter */) {
108719
+ if (needsOutParam) {
108571
108720
  flags |= 1 /* Body */;
108572
108721
  }
108573
108722
  if (isForStatement(container)) {
@@ -117607,6 +117756,9 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
117607
117756
  emitSkipped = true;
117608
117757
  return;
117609
117758
  }
117759
+ if (compilerOptions.noCheck) {
117760
+ (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(markLinkedReferences);
117761
+ }
117610
117762
  const transform2 = transformNodes(
117611
117763
  resolver,
117612
117764
  host,
@@ -117741,6 +117893,13 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
117741
117893
  }
117742
117894
  forEachChild(node, collectLinkedAliases);
117743
117895
  }
117896
+ function markLinkedReferences(file) {
117897
+ forEachChildRecursively(file, (n) => {
117898
+ if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32 /* Export */)) return "skip";
117899
+ if (isImportDeclaration(n)) return "skip";
117900
+ resolver.markLinkedReferences(n);
117901
+ });
117902
+ }
117744
117903
  function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) {
117745
117904
  const sourceFileOrBundle = transform2.transformed[0];
117746
117905
  const bundle = sourceFileOrBundle.kind === 308 /* Bundle */ ? sourceFileOrBundle : void 0;
@@ -117872,10 +118031,11 @@ var notImplementedResolver = {
117872
118031
  isValueAliasDeclaration: notImplemented,
117873
118032
  isReferencedAliasDeclaration: notImplemented,
117874
118033
  isTopLevelValueImportEqualsWithEntityName: notImplemented,
117875
- getNodeCheckFlags: notImplemented,
118034
+ hasNodeCheckFlag: notImplemented,
117876
118035
  isDeclarationVisible: notImplemented,
117877
118036
  isLateBound: (_node) => false,
117878
118037
  collectLinkedAliases: notImplemented,
118038
+ markLinkedReferences: notImplemented,
117879
118039
  isImplementationOfOverload: notImplemented,
117880
118040
  requiresAddingImplicitUndefined: notImplemented,
117881
118041
  isExpandoFunctionDeclaration: notImplemented,
@@ -126011,9 +126171,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126011
126171
  if (options.noEmit) {
126012
126172
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
126013
126173
  }
126014
- if (!options.emitDeclarationOnly) {
126015
- createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
126016
- }
126017
126174
  }
126018
126175
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
126019
126176
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
@@ -141139,7 +141296,6 @@ function transpileWorker(input, transpileOptions, declaration) {
141139
141296
  options.declaration = true;
141140
141297
  options.emitDeclarationOnly = true;
141141
141298
  options.isolatedDeclarations = true;
141142
- options.noCheck = true;
141143
141299
  } else {
141144
141300
  options.declaration = false;
141145
141301
  }
@@ -167615,7 +167771,7 @@ function entryToDocumentSpan(entry) {
167615
167771
  }
167616
167772
  }
167617
167773
  function getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) {
167618
- if (entry.kind !== 0 /* Span */ && (isIdentifier(originalNode) || isStringLiteralLike(originalNode))) {
167774
+ if (entry.kind !== 0 /* Span */ && isIdentifier(originalNode)) {
167619
167775
  const { node, kind } = entry;
167620
167776
  const parent2 = node.parent;
167621
167777
  const name = originalNode.text;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.5.0-pr-57201-2",
5
+ "version": "5.5.0-pr-58364-29",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [