@typescript-deploys/pr-build 6.0.0-pr-62243-37 → 6.0.0-pr-62876-10

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 CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "6.0";
21
- var version = `${versionMajorMinor}.0-insiders.20251208`;
21
+ var version = `${versionMajorMinor}.0-insiders.20251211`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6221,18 +6221,7 @@ var Diagnostics = {
6221
6221
  Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."),
6222
6222
  Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1538, 1 /* Error */, "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),
6223
6223
  A_bigint_literal_cannot_be_used_as_a_property_name: diag(1539, 1 /* Error */, "A_bigint_literal_cannot_be_used_as_a_property_name_1539", "A 'bigint' literal cannot be used as a property name."),
6224
- A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(
6225
- 1540,
6226
- 2 /* Suggestion */,
6227
- "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540",
6228
- "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",
6229
- /*reportsUnnecessary*/
6230
- void 0,
6231
- /*elidedInCompatabilityPyramid*/
6232
- void 0,
6233
- /*reportsDeprecated*/
6234
- true
6235
- ),
6224
+ A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(1540, 1 /* Error */, "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead."),
6236
6225
  Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1541, 1 /* Error */, "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),
6237
6226
  Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1542, 1 /* Error */, "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),
6238
6227
  Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: diag(1543, 1 /* Error */, "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", `Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`),
@@ -13019,13 +13008,6 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
13019
13008
  isInJSDoc(node)
13020
13009
  );
13021
13010
  }
13022
- function getNonModifierTokenPosOfNode(node, sourceFile) {
13023
- const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
13024
- if (!lastModifier) {
13025
- return getTokenPosOfNode(node, sourceFile);
13026
- }
13027
- return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
13028
- }
13029
13011
  function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
13030
13012
  return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
13031
13013
  }
@@ -40025,7 +40007,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
40025
40007
  const affectingLocations = [];
40026
40008
  let features = getNodeResolutionFeatures(options);
40027
40009
  if (resolutionMode !== void 0) {
40028
- features |= 30 /* AllFeatures */;
40010
+ features |= 94 /* AllFeatures */;
40029
40011
  }
40030
40012
  const moduleResolution = getEmitModuleResolutionKind(options);
40031
40013
  if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
@@ -40180,10 +40162,10 @@ function getNodeResolutionFeatures(options) {
40180
40162
  features = 30 /* Node16Default */;
40181
40163
  break;
40182
40164
  case 99 /* NodeNext */:
40183
- features = 30 /* NodeNextDefault */;
40165
+ features = 94 /* NodeNextDefault */;
40184
40166
  break;
40185
40167
  case 100 /* Bundler */:
40186
- features = 30 /* BundlerDefault */;
40168
+ features = 94 /* BundlerDefault */;
40187
40169
  break;
40188
40170
  }
40189
40171
  if (options.resolvePackageJsonExports) {
@@ -40766,7 +40748,7 @@ function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, h
40766
40748
  }
40767
40749
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
40768
40750
  return nodeNextModuleNameResolverWorker(
40769
- 30 /* NodeNextDefault */,
40751
+ 94 /* NodeNextDefault */,
40770
40752
  moduleName,
40771
40753
  containingFile,
40772
40754
  compilerOptions,
@@ -40845,11 +40827,11 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
40845
40827
  } else {
40846
40828
  extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
40847
40829
  }
40848
- return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
40830
+ return nodeModuleNameResolverWorker(conditions ? 94 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
40849
40831
  }
40850
40832
  function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
40851
40833
  return nodeModuleNameResolverWorker(
40852
- 30 /* NodeNextDefault */,
40834
+ 94 /* NodeNextDefault */,
40853
40835
  moduleName,
40854
40836
  getDirectoryPath(containingFile),
40855
40837
  { moduleResolution: 99 /* NodeNext */ },
@@ -40922,7 +40904,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
40922
40904
  const diagnosticState = {
40923
40905
  ...state,
40924
40906
  compilerOptions: diagnosticsCompilerOptions,
40925
- features: 30 /* BundlerDefault */,
40907
+ features: 94 /* BundlerDefault */,
40926
40908
  conditions: getConditions(diagnosticsCompilerOptions),
40927
40909
  reportDiagnostic: noop
40928
40910
  };
@@ -41458,7 +41440,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec
41458
41440
  }
41459
41441
  function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
41460
41442
  var _a, _b;
41461
- if (moduleName === "#" || startsWith(moduleName, "#/")) {
41443
+ if (moduleName === "#" || startsWith(moduleName, "#/") && !(state.features & 64 /* ImportsPatternRoot */)) {
41462
41444
  if (state.traceEnabled) {
41463
41445
  trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
41464
41446
  }
@@ -63731,7 +63713,7 @@ function createTypeChecker(host) {
63731
63713
  return false;
63732
63714
  }
63733
63715
  function isContextSensitiveFunctionLikeDeclaration(node) {
63734
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
63716
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || hasContextSensitiveYieldExpression(node);
63735
63717
  }
63736
63718
  function hasContextSensitiveReturnExpression(node) {
63737
63719
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -63742,6 +63724,9 @@ function createTypeChecker(host) {
63742
63724
  }
63743
63725
  return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
63744
63726
  }
63727
+ function hasContextSensitiveYieldExpression(node) {
63728
+ return !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
63729
+ }
63745
63730
  function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
63746
63731
  return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
63747
63732
  }
@@ -73296,7 +73281,9 @@ function createTypeChecker(host) {
73296
73281
  }
73297
73282
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
73298
73283
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
73299
- return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
73284
+ if (!(type.flags & 3 /* AnyOrUnknown */)) {
73285
+ return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
73286
+ }
73300
73287
  }
73301
73288
  }
73302
73289
  return contextualType;
@@ -85725,12 +85712,7 @@ function createTypeChecker(host) {
85725
85712
  if (isIdentifier(node.name)) {
85726
85713
  checkCollisionsForDeclarationName(node, node.name);
85727
85714
  if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
85728
- const sourceFile = getSourceFileOfNode(node);
85729
- const pos = getNonModifierTokenPosOfNode(node);
85730
- const span = getSpanOfTokenAtPosition(sourceFile, pos);
85731
- suggestionDiagnostics.add(
85732
- createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
85733
- );
85715
+ error(node.name, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead);
85734
85716
  }
85735
85717
  }
85736
85718
  checkExportsOnMergedDeclarations(node);
package/lib/typescript.js CHANGED
@@ -913,7 +913,6 @@ __export(typescript_exports, {
913
913
  getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
914
914
  getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
915
915
  getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,
916
- getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
917
916
  getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
918
917
  getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
919
918
  getNormalizedPathComponents: () => getNormalizedPathComponents,
@@ -2286,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2285
 
2287
2286
  // src/compiler/corePublic.ts
2288
2287
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-insiders.20251208`;
2288
+ var version = `${versionMajorMinor}.0-insiders.20251211`;
2290
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9622,18 +9621,7 @@ var Diagnostics = {
9622
9621
  Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."),
9623
9622
  Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1538, 1 /* Error */, "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),
9624
9623
  A_bigint_literal_cannot_be_used_as_a_property_name: diag(1539, 1 /* Error */, "A_bigint_literal_cannot_be_used_as_a_property_name_1539", "A 'bigint' literal cannot be used as a property name."),
9625
- A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(
9626
- 1540,
9627
- 2 /* Suggestion */,
9628
- "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540",
9629
- "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",
9630
- /*reportsUnnecessary*/
9631
- void 0,
9632
- /*elidedInCompatabilityPyramid*/
9633
- void 0,
9634
- /*reportsDeprecated*/
9635
- true
9636
- ),
9624
+ A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(1540, 1 /* Error */, "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead."),
9637
9625
  Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1541, 1 /* Error */, "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),
9638
9626
  Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1542, 1 /* Error */, "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),
9639
9627
  Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: diag(1543, 1 /* Error */, "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", `Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`),
@@ -16667,13 +16655,6 @@ function getNonDecoratorTokenPosOfNode(node, sourceFile) {
16667
16655
  }
16668
16656
  return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);
16669
16657
  }
16670
- function getNonModifierTokenPosOfNode(node, sourceFile) {
16671
- const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
16672
- if (!lastModifier) {
16673
- return getTokenPosOfNode(node, sourceFile);
16674
- }
16675
- return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
16676
- }
16677
16658
  function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
16678
16659
  return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
16679
16660
  }
@@ -44383,7 +44364,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
44383
44364
  const affectingLocations = [];
44384
44365
  let features = getNodeResolutionFeatures(options);
44385
44366
  if (resolutionMode !== void 0) {
44386
- features |= 30 /* AllFeatures */;
44367
+ features |= 94 /* AllFeatures */;
44387
44368
  }
44388
44369
  const moduleResolution = getEmitModuleResolutionKind(options);
44389
44370
  if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
@@ -44538,10 +44519,10 @@ function getNodeResolutionFeatures(options) {
44538
44519
  features = 30 /* Node16Default */;
44539
44520
  break;
44540
44521
  case 99 /* NodeNext */:
44541
- features = 30 /* NodeNextDefault */;
44522
+ features = 94 /* NodeNextDefault */;
44542
44523
  break;
44543
44524
  case 100 /* Bundler */:
44544
- features = 30 /* BundlerDefault */;
44525
+ features = 94 /* BundlerDefault */;
44545
44526
  break;
44546
44527
  }
44547
44528
  if (options.resolvePackageJsonExports) {
@@ -45141,10 +45122,11 @@ var NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => {
45141
45122
  NodeResolutionFeatures2[NodeResolutionFeatures2["SelfName"] = 4] = "SelfName";
45142
45123
  NodeResolutionFeatures2[NodeResolutionFeatures2["Exports"] = 8] = "Exports";
45143
45124
  NodeResolutionFeatures2[NodeResolutionFeatures2["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
45144
- NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 30] = "AllFeatures";
45125
+ NodeResolutionFeatures2[NodeResolutionFeatures2["ImportsPatternRoot"] = 64] = "ImportsPatternRoot";
45126
+ NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 94] = "AllFeatures";
45145
45127
  NodeResolutionFeatures2[NodeResolutionFeatures2["Node16Default"] = 30] = "Node16Default";
45146
- NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 30 /* AllFeatures */] = "NodeNextDefault";
45147
- NodeResolutionFeatures2[NodeResolutionFeatures2["BundlerDefault"] = 30] = "BundlerDefault";
45128
+ NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 94 /* AllFeatures */] = "NodeNextDefault";
45129
+ NodeResolutionFeatures2[NodeResolutionFeatures2["BundlerDefault"] = 94] = "BundlerDefault";
45148
45130
  NodeResolutionFeatures2[NodeResolutionFeatures2["EsmMode"] = 32] = "EsmMode";
45149
45131
  return NodeResolutionFeatures2;
45150
45132
  })(NodeResolutionFeatures || {});
@@ -45162,7 +45144,7 @@ function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, h
45162
45144
  }
45163
45145
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
45164
45146
  return nodeNextModuleNameResolverWorker(
45165
- 30 /* NodeNextDefault */,
45147
+ 94 /* NodeNextDefault */,
45166
45148
  moduleName,
45167
45149
  containingFile,
45168
45150
  compilerOptions,
@@ -45241,11 +45223,11 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
45241
45223
  } else {
45242
45224
  extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
45243
45225
  }
45244
- return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
45226
+ return nodeModuleNameResolverWorker(conditions ? 94 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
45245
45227
  }
45246
45228
  function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
45247
45229
  return nodeModuleNameResolverWorker(
45248
- 30 /* NodeNextDefault */,
45230
+ 94 /* NodeNextDefault */,
45249
45231
  moduleName,
45250
45232
  getDirectoryPath(containingFile),
45251
45233
  { moduleResolution: 99 /* NodeNext */ },
@@ -45318,7 +45300,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
45318
45300
  const diagnosticState = {
45319
45301
  ...state,
45320
45302
  compilerOptions: diagnosticsCompilerOptions,
45321
- features: 30 /* BundlerDefault */,
45303
+ features: 94 /* BundlerDefault */,
45322
45304
  conditions: getConditions(diagnosticsCompilerOptions),
45323
45305
  reportDiagnostic: noop
45324
45306
  };
@@ -45968,7 +45950,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec
45968
45950
  }
45969
45951
  function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
45970
45952
  var _a, _b;
45971
- if (moduleName === "#" || startsWith(moduleName, "#/")) {
45953
+ if (moduleName === "#" || startsWith(moduleName, "#/") && !(state.features & 64 /* ImportsPatternRoot */)) {
45972
45954
  if (state.traceEnabled) {
45973
45955
  trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
45974
45956
  }
@@ -68359,7 +68341,7 @@ function createTypeChecker(host) {
68359
68341
  return false;
68360
68342
  }
68361
68343
  function isContextSensitiveFunctionLikeDeclaration(node) {
68362
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
68344
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || hasContextSensitiveYieldExpression(node);
68363
68345
  }
68364
68346
  function hasContextSensitiveReturnExpression(node) {
68365
68347
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -68370,6 +68352,9 @@ function createTypeChecker(host) {
68370
68352
  }
68371
68353
  return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression));
68372
68354
  }
68355
+ function hasContextSensitiveYieldExpression(node) {
68356
+ return !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
68357
+ }
68373
68358
  function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
68374
68359
  return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func);
68375
68360
  }
@@ -77924,7 +77909,9 @@ function createTypeChecker(host) {
77924
77909
  }
77925
77910
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
77926
77911
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
77927
- return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
77912
+ if (!(type.flags & 3 /* AnyOrUnknown */)) {
77913
+ return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type;
77914
+ }
77928
77915
  }
77929
77916
  }
77930
77917
  return contextualType;
@@ -90353,12 +90340,7 @@ function createTypeChecker(host) {
90353
90340
  if (isIdentifier(node.name)) {
90354
90341
  checkCollisionsForDeclarationName(node, node.name);
90355
90342
  if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
90356
- const sourceFile = getSourceFileOfNode(node);
90357
- const pos = getNonModifierTokenPosOfNode(node);
90358
- const span = getSpanOfTokenAtPosition(sourceFile, pos);
90359
- suggestionDiagnostics.add(
90360
- createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
90361
- );
90343
+ error2(node.name, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead);
90362
90344
  }
90363
90345
  }
90364
90346
  checkExportsOnMergedDeclarations(node);
@@ -184309,7 +184291,6 @@ __export(ts_exports2, {
184309
184291
  getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
184310
184292
  getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
184311
184293
  getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots,
184312
- getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
184313
184294
  getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
184314
184295
  getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
184315
184296
  getNormalizedPathComponents: () => getNormalizedPathComponents,
@@ -199071,7 +199052,6 @@ if (typeof console !== "undefined") {
199071
199052
  getNonAugmentationDeclaration,
199072
199053
  getNonDecoratorTokenPosOfNode,
199073
199054
  getNonIncrementalBuildInfoRoots,
199074
- getNonModifierTokenPosOfNode,
199075
199055
  getNormalizedAbsolutePath,
199076
199056
  getNormalizedAbsolutePathWithoutRoot,
199077
199057
  getNormalizedPathComponents,
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": "6.0.0-pr-62243-37",
5
+ "version": "6.0.0-pr-62876-10",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [