typescript 6.0.0-dev.20260204 → 6.0.0-dev.20260206

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-dev.20260204`;
21
+ var version = `${versionMajorMinor}.0-dev.20260206`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7518,7 +7518,7 @@ var Diagnostics = {
7518
7518
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7519
7519
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
7520
7520
  default_Colon: diag(6903, 3 /* Message */, "default_Colon_6903", "default:"),
7521
- false_unless_strict_is_set: diag(6905, 3 /* Message */, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"),
7521
+ true_unless_strict_is_false: diag(6905, 3 /* Message */, "true_unless_strict_is_false_6905", "`true`, unless `strict` is `false`"),
7522
7522
  false_unless_composite_is_set: diag(6906, 3 /* Message */, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"),
7523
7523
  node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, 3 /* Message */, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", '`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),
7524
7524
  if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, 3 /* Message */, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", '`[]` if `files` is specified, otherwise `["**/*"]`'),
@@ -13717,7 +13717,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
13717
13717
  if (node.isDeclarationFile) {
13718
13718
  return false;
13719
13719
  }
13720
- if (getStrictOptionValue(compilerOptions, "alwaysStrict")) {
13720
+ if (getAlwaysStrict(compilerOptions)) {
13721
13721
  return true;
13722
13722
  }
13723
13723
  if (startsWithUseStrict(node.statements)) {
@@ -17943,6 +17943,9 @@ function importSyntaxAffectsModuleResolution(options) {
17943
17943
  const moduleResolution = getEmitModuleResolutionKind(options);
17944
17944
  return 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || getResolvePackageJsonExports(options) || getResolvePackageJsonImports(options);
17945
17945
  }
17946
+ function usesWildcardTypes(options) {
17947
+ return some(options.types, (t) => t === "*");
17948
+ }
17946
17949
  function createComputedCompilerOptions(options) {
17947
17950
  return options;
17948
17951
  }
@@ -18171,10 +18174,11 @@ var _computedOptions = createComputedCompilerOptions({
18171
18174
  return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn");
18172
18175
  }
18173
18176
  },
18177
+ // Previously a strict-mode flag, but no longer.
18174
18178
  alwaysStrict: {
18175
- dependencies: ["strict"],
18179
+ dependencies: [],
18176
18180
  computeValue: (compilerOptions) => {
18177
- return getStrictOptionValue(compilerOptions, "alwaysStrict");
18181
+ return compilerOptions.alwaysStrict !== false;
18178
18182
  }
18179
18183
  },
18180
18184
  useUnknownInCatchVariables: {
@@ -18202,6 +18206,7 @@ var isIncrementalCompilation = _computedOptions.incremental.computeValue;
18202
18206
  var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;
18203
18207
  var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;
18204
18208
  var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;
18209
+ var getAlwaysStrict = _computedOptions.alwaysStrict.computeValue;
18205
18210
  function emitModuleKindIsNonNodeESM(moduleKind) {
18206
18211
  return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
18207
18212
  }
@@ -37098,7 +37103,7 @@ var commandOptionsWithoutBuild = [
37098
37103
  strictFlag: true,
37099
37104
  category: Diagnostics.Type_Checking,
37100
37105
  description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
37101
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37106
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37102
37107
  },
37103
37108
  {
37104
37109
  name: "strictNullChecks",
@@ -37108,7 +37113,7 @@ var commandOptionsWithoutBuild = [
37108
37113
  strictFlag: true,
37109
37114
  category: Diagnostics.Type_Checking,
37110
37115
  description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
37111
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37116
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37112
37117
  },
37113
37118
  {
37114
37119
  name: "strictFunctionTypes",
@@ -37118,7 +37123,7 @@ var commandOptionsWithoutBuild = [
37118
37123
  strictFlag: true,
37119
37124
  category: Diagnostics.Type_Checking,
37120
37125
  description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
37121
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37126
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37122
37127
  },
37123
37128
  {
37124
37129
  name: "strictBindCallApply",
@@ -37128,7 +37133,7 @@ var commandOptionsWithoutBuild = [
37128
37133
  strictFlag: true,
37129
37134
  category: Diagnostics.Type_Checking,
37130
37135
  description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
37131
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37136
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37132
37137
  },
37133
37138
  {
37134
37139
  name: "strictPropertyInitialization",
@@ -37138,7 +37143,7 @@ var commandOptionsWithoutBuild = [
37138
37143
  strictFlag: true,
37139
37144
  category: Diagnostics.Type_Checking,
37140
37145
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
37141
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37146
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37142
37147
  },
37143
37148
  {
37144
37149
  name: "strictBuiltinIteratorReturn",
@@ -37148,7 +37153,7 @@ var commandOptionsWithoutBuild = [
37148
37153
  strictFlag: true,
37149
37154
  category: Diagnostics.Type_Checking,
37150
37155
  description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
37151
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37156
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37152
37157
  },
37153
37158
  {
37154
37159
  name: "noImplicitThis",
@@ -37158,7 +37163,7 @@ var commandOptionsWithoutBuild = [
37158
37163
  strictFlag: true,
37159
37164
  category: Diagnostics.Type_Checking,
37160
37165
  description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
37161
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37166
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37162
37167
  },
37163
37168
  {
37164
37169
  name: "useUnknownInCatchVariables",
@@ -37168,7 +37173,7 @@ var commandOptionsWithoutBuild = [
37168
37173
  strictFlag: true,
37169
37174
  category: Diagnostics.Type_Checking,
37170
37175
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
37171
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37176
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37172
37177
  },
37173
37178
  {
37174
37179
  name: "alwaysStrict",
@@ -37176,10 +37181,9 @@ var commandOptionsWithoutBuild = [
37176
37181
  affectsSourceFile: true,
37177
37182
  affectsEmit: true,
37178
37183
  affectsBuildInfo: true,
37179
- strictFlag: true,
37180
37184
  category: Diagnostics.Type_Checking,
37181
37185
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
37182
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37186
+ defaultValueDescription: true
37183
37187
  },
37184
37188
  // Additional Checks
37185
37189
  {
@@ -40216,10 +40220,10 @@ function getConditions(options, resolutionMode) {
40216
40220
  return concatenate(conditions, options.customConditions);
40217
40221
  }
40218
40222
  function getAutomaticTypeDirectiveNames(options, host) {
40219
- if (options.types) {
40220
- return options.types;
40223
+ if (!usesWildcardTypes(options)) {
40224
+ return options.types ?? [];
40221
40225
  }
40222
- const result = [];
40226
+ const wildcardMatches = [];
40223
40227
  if (host.directoryExists && host.getDirectories) {
40224
40228
  const typeRoots = getEffectiveTypeRoots(options, host);
40225
40229
  if (typeRoots) {
@@ -40232,7 +40236,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
40232
40236
  if (!isNotNeededPackage) {
40233
40237
  const baseFileName = getBaseFileName(normalized);
40234
40238
  if (baseFileName.charCodeAt(0) !== 46 /* dot */) {
40235
- result.push(baseFileName);
40239
+ wildcardMatches.push(baseFileName);
40236
40240
  }
40237
40241
  }
40238
40242
  }
@@ -40240,7 +40244,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
40240
40244
  }
40241
40245
  }
40242
40246
  }
40243
- return result;
40247
+ return deduplicate(flatten(options.types.map((t) => t === "*" ? wildcardMatches : t)), equateValues);
40244
40248
  }
40245
40249
  function isPackageJsonInfo(entry) {
40246
40250
  return !!(entry == null ? void 0 : entry.contents);
@@ -42428,7 +42432,7 @@ function createBinder() {
42428
42432
  emitFlags = 0 /* None */;
42429
42433
  }
42430
42434
  function bindInStrictMode(file2, opts) {
42431
- if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) {
42435
+ if (getAlwaysStrict(opts) && !file2.isDeclarationFile) {
42432
42436
  return true;
42433
42437
  } else {
42434
42438
  return !!file2.externalModuleIndicator;
@@ -49384,7 +49388,7 @@ function createTypeChecker(host) {
49384
49388
  }
49385
49389
  function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
49386
49390
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
49387
- errorMessage ?? (errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations);
49391
+ errorMessage ?? (errorMessage = getCannotResolveModuleNameErrorForSpecificModule(moduleReferenceExpression) ?? (isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations));
49388
49392
  return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
49389
49393
  }
49390
49394
  function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
@@ -69208,19 +69212,21 @@ function createTypeChecker(host) {
69208
69212
  case "console":
69209
69213
  return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;
69210
69214
  case "$":
69211
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery;
69215
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig;
69216
+ case "beforeEach":
69212
69217
  case "describe":
69213
69218
  case "suite":
69214
69219
  case "it":
69215
69220
  case "test":
69216
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha;
69221
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig;
69217
69222
  case "process":
69218
69223
  case "require":
69219
69224
  case "Buffer":
69220
69225
  case "module":
69221
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;
69226
+ case "NodeJS":
69227
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig;
69222
69228
  case "Bun":
69223
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun;
69229
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig;
69224
69230
  case "Map":
69225
69231
  case "Set":
69226
69232
  case "Promise":
@@ -69253,6 +69259,18 @@ function createTypeChecker(host) {
69253
69259
  }
69254
69260
  }
69255
69261
  }
69262
+ function getCannotResolveModuleNameErrorForSpecificModule(moduleName) {
69263
+ if (moduleName.kind === 11 /* StringLiteral */) {
69264
+ if (nodeCoreModules.has(moduleName.text)) {
69265
+ if (usesWildcardTypes(compilerOptions)) {
69266
+ return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;
69267
+ } else {
69268
+ return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig;
69269
+ }
69270
+ }
69271
+ }
69272
+ return void 0;
69273
+ }
69256
69274
  function getResolvedSymbol(node) {
69257
69275
  const links = getNodeLinks(node);
69258
69276
  if (!links.resolvedSymbol) {
@@ -93917,7 +93935,7 @@ function transformTypeScript(context) {
93917
93935
  }
93918
93936
  }
93919
93937
  function visitSourceFile(node) {
93920
- const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
93938
+ const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
93921
93939
  return factory2.updateSourceFile(
93922
93940
  node,
93923
93941
  visitLexicalEnvironment(
@@ -103599,7 +103617,7 @@ function transformJsx(context) {
103599
103617
  node.children,
103600
103618
  isChild,
103601
103619
  /*location*/
103602
- node
103620
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
103603
103621
  );
103604
103622
  }
103605
103623
  function visitJsxSelfClosingElement(node, isChild) {
@@ -103610,7 +103628,7 @@ function transformJsx(context) {
103610
103628
  void 0,
103611
103629
  isChild,
103612
103630
  /*location*/
103613
- node
103631
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
103614
103632
  );
103615
103633
  }
103616
103634
  function visitJsxFragment(node, isChild) {
@@ -103620,7 +103638,7 @@ function transformJsx(context) {
103620
103638
  node.children,
103621
103639
  isChild,
103622
103640
  /*location*/
103623
- node
103641
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
103624
103642
  );
103625
103643
  }
103626
103644
  function convertJsxChildrenToChildrenPropObject(children) {
@@ -109696,7 +109714,7 @@ function transformModule(context) {
109696
109714
  function transformCommonJSModule(node) {
109697
109715
  startLexicalEnvironment();
109698
109716
  const statements = [];
109699
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
109717
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
109700
109718
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);
109701
109719
  if (shouldEmitUnderscoreUnderscoreESModule()) {
109702
109720
  append(statements, createUnderscoreUnderscoreESModule());
@@ -111709,7 +111727,7 @@ function transformSystemModule(context) {
111709
111727
  function createSystemModuleBody(node, dependencyGroups) {
111710
111728
  const statements = [];
111711
111729
  startLexicalEnvironment();
111712
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
111730
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
111713
111731
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
111714
111732
  statements.push(
111715
111733
  factory2.createVariableStatement(
@@ -124689,6 +124707,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124689
124707
  }
124690
124708
  });
124691
124709
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
124710
+ if (options.alwaysStrict === false) {
124711
+ createDeprecatedDiagnostic(
124712
+ "alwaysStrict",
124713
+ "false",
124714
+ /*useInstead*/
124715
+ void 0,
124716
+ /*related*/
124717
+ void 0
124718
+ );
124719
+ }
124692
124720
  if (options.target === 1 /* ES5 */) {
124693
124721
  createDeprecatedDiagnostic("target", "ES5");
124694
124722
  }
@@ -124754,6 +124782,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124754
124782
  void 0
124755
124783
  );
124756
124784
  }
124785
+ if (options.downlevelIteration !== void 0) {
124786
+ createDeprecatedDiagnostic("downlevelIteration");
124787
+ }
124757
124788
  });
124758
124789
  }
124759
124790
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
@@ -125510,8 +125541,7 @@ function createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax) {
125510
125541
  reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
125511
125542
  ) : void 0;
125512
125543
  case 8 /* AutomaticTypeDirectiveFile */:
125513
- if (!options.types) return void 0;
125514
- configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", reason.typeReference);
125544
+ configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", usesWildcardTypes(options) ? "*" : reason.typeReference);
125515
125545
  message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
125516
125546
  break;
125517
125547
  case 6 /* LibFile */:
@@ -128531,7 +128561,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
128531
128561
  function updateTypeRootsWatch() {
128532
128562
  var _a;
128533
128563
  const options = resolutionHost.getCompilationSettings();
128534
- if (options.types) {
128564
+ if (!usesWildcardTypes(options)) {
128535
128565
  closeTypeRootsWatch();
128536
128566
  return;
128537
128567
  }
@@ -128888,7 +128918,7 @@ function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
128888
128918
  options.outFile ? "--outFile" : "--out"
128889
128919
  );
128890
128920
  case 8 /* AutomaticTypeDirectiveFile */: {
128891
- const messageAndArgs = options.types ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference];
128921
+ const messageAndArgs = !usesWildcardTypes(options) ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference];
128892
128922
  return chainDiagnosticMessages(
128893
128923
  /*details*/
128894
128924
  void 0,
@@ -7033,6 +7033,7 @@ declare namespace ts {
7033
7033
  disableSourceOfProjectReferenceRedirect?: boolean;
7034
7034
  disableSolutionSearching?: boolean;
7035
7035
  disableReferencedProjectLoad?: boolean;
7036
+ /** @deprecated */
7036
7037
  downlevelIteration?: boolean;
7037
7038
  emitBOM?: boolean;
7038
7039
  emitDecoratorMetadata?: boolean;
@@ -9326,7 +9327,7 @@ declare namespace ts {
9326
9327
  * Given a set of options, returns the set of type directive names
9327
9328
  * that should be included for this program automatically.
9328
9329
  * This list could either come from the config file,
9329
- * or from enumerating the types root + initial secondary types lookup location.
9330
+ * and/or from enumerating the types root + initial secondary types lookup location given "*" compat wildcard.
9330
9331
  * More type directives might appear in the program later as a result of loading actual source files;
9331
9332
  * this list is only the set of defaults that are implicitly included.
9332
9333
  */
package/lib/typescript.js CHANGED
@@ -644,6 +644,7 @@ __export(typescript_exports, {
644
644
  getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,
645
645
  getAllowJSCompilerOption: () => getAllowJSCompilerOption,
646
646
  getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,
647
+ getAlwaysStrict: () => getAlwaysStrict,
647
648
  getAncestor: () => getAncestor,
648
649
  getAnyExtensionFromPath: () => getAnyExtensionFromPath,
649
650
  getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,
@@ -2257,6 +2258,7 @@ __export(typescript_exports, {
2257
2258
  updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher,
2258
2259
  updateSourceFile: () => updateSourceFile,
2259
2260
  updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories,
2261
+ usesWildcardTypes: () => usesWildcardTypes,
2260
2262
  usingSingleLineStringWriter: () => usingSingleLineStringWriter,
2261
2263
  utf16EncodeAsString: () => utf16EncodeAsString,
2262
2264
  validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
@@ -2286,7 +2288,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2288
 
2287
2289
  // src/compiler/corePublic.ts
2288
2290
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-dev.20260204`;
2291
+ var version = `${versionMajorMinor}.0-dev.20260206`;
2290
2292
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2293
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2294
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10920,7 +10922,7 @@ var Diagnostics = {
10920
10922
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
10921
10923
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
10922
10924
  default_Colon: diag(6903, 3 /* Message */, "default_Colon_6903", "default:"),
10923
- false_unless_strict_is_set: diag(6905, 3 /* Message */, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"),
10925
+ true_unless_strict_is_false: diag(6905, 3 /* Message */, "true_unless_strict_is_false_6905", "`true`, unless `strict` is `false`"),
10924
10926
  false_unless_composite_is_set: diag(6906, 3 /* Message */, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"),
10925
10927
  node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, 3 /* Message */, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", '`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),
10926
10928
  if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, 3 /* Message */, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", '`[]` if `files` is specified, otherwise `["**/*"]`'),
@@ -17377,7 +17379,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
17377
17379
  if (node.isDeclarationFile) {
17378
17380
  return false;
17379
17381
  }
17380
- if (getStrictOptionValue(compilerOptions, "alwaysStrict")) {
17382
+ if (getAlwaysStrict(compilerOptions)) {
17381
17383
  return true;
17382
17384
  }
17383
17385
  if (startsWithUseStrict(node.statements)) {
@@ -21914,6 +21916,9 @@ function importSyntaxAffectsModuleResolution(options) {
21914
21916
  const moduleResolution = getEmitModuleResolutionKind(options);
21915
21917
  return 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || getResolvePackageJsonExports(options) || getResolvePackageJsonImports(options);
21916
21918
  }
21919
+ function usesWildcardTypes(options) {
21920
+ return some(options.types, (t) => t === "*");
21921
+ }
21917
21922
  function createComputedCompilerOptions(options) {
21918
21923
  return options;
21919
21924
  }
@@ -22142,10 +22147,11 @@ var _computedOptions = createComputedCompilerOptions({
22142
22147
  return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn");
22143
22148
  }
22144
22149
  },
22150
+ // Previously a strict-mode flag, but no longer.
22145
22151
  alwaysStrict: {
22146
- dependencies: ["strict"],
22152
+ dependencies: [],
22147
22153
  computeValue: (compilerOptions) => {
22148
- return getStrictOptionValue(compilerOptions, "alwaysStrict");
22154
+ return compilerOptions.alwaysStrict !== false;
22149
22155
  }
22150
22156
  },
22151
22157
  useUnknownInCatchVariables: {
@@ -22173,6 +22179,7 @@ var isIncrementalCompilation = _computedOptions.incremental.computeValue;
22173
22179
  var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;
22174
22180
  var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;
22175
22181
  var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;
22182
+ var getAlwaysStrict = _computedOptions.alwaysStrict.computeValue;
22176
22183
  function emitModuleKindIsNonNodeESM(moduleKind) {
22177
22184
  return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
22178
22185
  }
@@ -41377,7 +41384,7 @@ var commandOptionsWithoutBuild = [
41377
41384
  strictFlag: true,
41378
41385
  category: Diagnostics.Type_Checking,
41379
41386
  description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
41380
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41387
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41381
41388
  },
41382
41389
  {
41383
41390
  name: "strictNullChecks",
@@ -41387,7 +41394,7 @@ var commandOptionsWithoutBuild = [
41387
41394
  strictFlag: true,
41388
41395
  category: Diagnostics.Type_Checking,
41389
41396
  description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
41390
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41397
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41391
41398
  },
41392
41399
  {
41393
41400
  name: "strictFunctionTypes",
@@ -41397,7 +41404,7 @@ var commandOptionsWithoutBuild = [
41397
41404
  strictFlag: true,
41398
41405
  category: Diagnostics.Type_Checking,
41399
41406
  description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
41400
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41407
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41401
41408
  },
41402
41409
  {
41403
41410
  name: "strictBindCallApply",
@@ -41407,7 +41414,7 @@ var commandOptionsWithoutBuild = [
41407
41414
  strictFlag: true,
41408
41415
  category: Diagnostics.Type_Checking,
41409
41416
  description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
41410
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41417
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41411
41418
  },
41412
41419
  {
41413
41420
  name: "strictPropertyInitialization",
@@ -41417,7 +41424,7 @@ var commandOptionsWithoutBuild = [
41417
41424
  strictFlag: true,
41418
41425
  category: Diagnostics.Type_Checking,
41419
41426
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
41420
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41427
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41421
41428
  },
41422
41429
  {
41423
41430
  name: "strictBuiltinIteratorReturn",
@@ -41427,7 +41434,7 @@ var commandOptionsWithoutBuild = [
41427
41434
  strictFlag: true,
41428
41435
  category: Diagnostics.Type_Checking,
41429
41436
  description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
41430
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41437
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41431
41438
  },
41432
41439
  {
41433
41440
  name: "noImplicitThis",
@@ -41437,7 +41444,7 @@ var commandOptionsWithoutBuild = [
41437
41444
  strictFlag: true,
41438
41445
  category: Diagnostics.Type_Checking,
41439
41446
  description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
41440
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41447
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41441
41448
  },
41442
41449
  {
41443
41450
  name: "useUnknownInCatchVariables",
@@ -41447,7 +41454,7 @@ var commandOptionsWithoutBuild = [
41447
41454
  strictFlag: true,
41448
41455
  category: Diagnostics.Type_Checking,
41449
41456
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
41450
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41457
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
41451
41458
  },
41452
41459
  {
41453
41460
  name: "alwaysStrict",
@@ -41455,10 +41462,9 @@ var commandOptionsWithoutBuild = [
41455
41462
  affectsSourceFile: true,
41456
41463
  affectsEmit: true,
41457
41464
  affectsBuildInfo: true,
41458
- strictFlag: true,
41459
41465
  category: Diagnostics.Type_Checking,
41460
41466
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
41461
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41467
+ defaultValueDescription: true
41462
41468
  },
41463
41469
  // Additional Checks
41464
41470
  {
@@ -44590,10 +44596,10 @@ function resolvePackageNameToPackageJson(packageName, containingDirectory, optio
44590
44596
  });
44591
44597
  }
44592
44598
  function getAutomaticTypeDirectiveNames(options, host) {
44593
- if (options.types) {
44594
- return options.types;
44599
+ if (!usesWildcardTypes(options)) {
44600
+ return options.types ?? [];
44595
44601
  }
44596
- const result = [];
44602
+ const wildcardMatches = [];
44597
44603
  if (host.directoryExists && host.getDirectories) {
44598
44604
  const typeRoots = getEffectiveTypeRoots(options, host);
44599
44605
  if (typeRoots) {
@@ -44606,7 +44612,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
44606
44612
  if (!isNotNeededPackage) {
44607
44613
  const baseFileName = getBaseFileName(normalized);
44608
44614
  if (baseFileName.charCodeAt(0) !== 46 /* dot */) {
44609
- result.push(baseFileName);
44615
+ wildcardMatches.push(baseFileName);
44610
44616
  }
44611
44617
  }
44612
44618
  }
@@ -44614,7 +44620,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
44614
44620
  }
44615
44621
  }
44616
44622
  }
44617
- return result;
44623
+ return deduplicate(flatten(options.types.map((t) => t === "*" ? wildcardMatches : t)), equateValues);
44618
44624
  }
44619
44625
  function isPackageJsonInfo(entry) {
44620
44626
  return !!(entry == null ? void 0 : entry.contents);
@@ -46959,7 +46965,7 @@ function createBinder() {
46959
46965
  emitFlags = 0 /* None */;
46960
46966
  }
46961
46967
  function bindInStrictMode(file2, opts) {
46962
- if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) {
46968
+ if (getAlwaysStrict(opts) && !file2.isDeclarationFile) {
46963
46969
  return true;
46964
46970
  } else {
46965
46971
  return !!file2.externalModuleIndicator;
@@ -54015,7 +54021,7 @@ function createTypeChecker(host) {
54015
54021
  }
54016
54022
  function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
54017
54023
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
54018
- errorMessage ?? (errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations);
54024
+ errorMessage ?? (errorMessage = getCannotResolveModuleNameErrorForSpecificModule(moduleReferenceExpression) ?? (isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations));
54019
54025
  return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
54020
54026
  }
54021
54027
  function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
@@ -73839,19 +73845,21 @@ function createTypeChecker(host) {
73839
73845
  case "console":
73840
73846
  return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;
73841
73847
  case "$":
73842
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery;
73848
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig;
73849
+ case "beforeEach":
73843
73850
  case "describe":
73844
73851
  case "suite":
73845
73852
  case "it":
73846
73853
  case "test":
73847
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha;
73854
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig;
73848
73855
  case "process":
73849
73856
  case "require":
73850
73857
  case "Buffer":
73851
73858
  case "module":
73852
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;
73859
+ case "NodeJS":
73860
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig;
73853
73861
  case "Bun":
73854
- return compilerOptions.types ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun;
73862
+ return usesWildcardTypes(compilerOptions) ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig;
73855
73863
  case "Map":
73856
73864
  case "Set":
73857
73865
  case "Promise":
@@ -73884,6 +73892,18 @@ function createTypeChecker(host) {
73884
73892
  }
73885
73893
  }
73886
73894
  }
73895
+ function getCannotResolveModuleNameErrorForSpecificModule(moduleName) {
73896
+ if (moduleName.kind === 11 /* StringLiteral */) {
73897
+ if (nodeCoreModules.has(moduleName.text)) {
73898
+ if (usesWildcardTypes(compilerOptions)) {
73899
+ return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;
73900
+ } else {
73901
+ return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig;
73902
+ }
73903
+ }
73904
+ }
73905
+ return void 0;
73906
+ }
73887
73907
  function getResolvedSymbol(node) {
73888
73908
  const links = getNodeLinks(node);
73889
73909
  if (!links.resolvedSymbol) {
@@ -98730,7 +98750,7 @@ function transformTypeScript(context) {
98730
98750
  }
98731
98751
  }
98732
98752
  function visitSourceFile(node) {
98733
- const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
98753
+ const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
98734
98754
  return factory2.updateSourceFile(
98735
98755
  node,
98736
98756
  visitLexicalEnvironment(
@@ -108412,7 +108432,7 @@ function transformJsx(context) {
108412
108432
  node.children,
108413
108433
  isChild,
108414
108434
  /*location*/
108415
- node
108435
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
108416
108436
  );
108417
108437
  }
108418
108438
  function visitJsxSelfClosingElement(node, isChild) {
@@ -108423,7 +108443,7 @@ function transformJsx(context) {
108423
108443
  void 0,
108424
108444
  isChild,
108425
108445
  /*location*/
108426
- node
108446
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
108427
108447
  );
108428
108448
  }
108429
108449
  function visitJsxFragment(node, isChild) {
@@ -108433,7 +108453,7 @@ function transformJsx(context) {
108433
108453
  node.children,
108434
108454
  isChild,
108435
108455
  /*location*/
108436
- node
108456
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
108437
108457
  );
108438
108458
  }
108439
108459
  function convertJsxChildrenToChildrenPropObject(children) {
@@ -114509,7 +114529,7 @@ function transformModule(context) {
114509
114529
  function transformCommonJSModule(node) {
114510
114530
  startLexicalEnvironment();
114511
114531
  const statements = [];
114512
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
114532
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
114513
114533
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);
114514
114534
  if (shouldEmitUnderscoreUnderscoreESModule()) {
114515
114535
  append(statements, createUnderscoreUnderscoreESModule());
@@ -116522,7 +116542,7 @@ function transformSystemModule(context) {
116522
116542
  function createSystemModuleBody(node, dependencyGroups) {
116523
116543
  const statements = [];
116524
116544
  startLexicalEnvironment();
116525
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
116545
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
116526
116546
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
116527
116547
  statements.push(
116528
116548
  factory2.createVariableStatement(
@@ -129559,6 +129579,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129559
129579
  }
129560
129580
  });
129561
129581
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
129582
+ if (options.alwaysStrict === false) {
129583
+ createDeprecatedDiagnostic(
129584
+ "alwaysStrict",
129585
+ "false",
129586
+ /*useInstead*/
129587
+ void 0,
129588
+ /*related*/
129589
+ void 0
129590
+ );
129591
+ }
129562
129592
  if (options.target === 1 /* ES5 */) {
129563
129593
  createDeprecatedDiagnostic("target", "ES5");
129564
129594
  }
@@ -129624,6 +129654,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129624
129654
  void 0
129625
129655
  );
129626
129656
  }
129657
+ if (options.downlevelIteration !== void 0) {
129658
+ createDeprecatedDiagnostic("downlevelIteration");
129659
+ }
129627
129660
  });
129628
129661
  }
129629
129662
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
@@ -130380,8 +130413,7 @@ function createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax) {
130380
130413
  reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
130381
130414
  ) : void 0;
130382
130415
  case 8 /* AutomaticTypeDirectiveFile */:
130383
- if (!options.types) return void 0;
130384
- configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", reason.typeReference);
130416
+ configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", usesWildcardTypes(options) ? "*" : reason.typeReference);
130385
130417
  message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
130386
130418
  break;
130387
130419
  case 6 /* LibFile */:
@@ -133462,7 +133494,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
133462
133494
  function updateTypeRootsWatch() {
133463
133495
  var _a;
133464
133496
  const options = resolutionHost.getCompilationSettings();
133465
- if (options.types) {
133497
+ if (!usesWildcardTypes(options)) {
133466
133498
  closeTypeRootsWatch();
133467
133499
  return;
133468
133500
  }
@@ -133819,7 +133851,7 @@ function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
133819
133851
  options.outFile ? "--outFile" : "--out"
133820
133852
  );
133821
133853
  case 8 /* AutomaticTypeDirectiveFile */: {
133822
- const messageAndArgs = options.types ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference];
133854
+ const messageAndArgs = !usesWildcardTypes(options) ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference];
133823
133855
  return chainDiagnosticMessages(
133824
133856
  /*details*/
133825
133857
  void 0,
@@ -139027,7 +139059,7 @@ function discoverTypings(host, log, fileNames, projectRootPath, safeList, packag
139027
139059
  const filesToWatch = [];
139028
139060
  if (typeAcquisition.include) addInferredTypings(typeAcquisition.include, "Explicitly included types");
139029
139061
  const exclude = typeAcquisition.exclude || [];
139030
- if (!compilerOptions.types) {
139062
+ if (!compilerOptions.types || usesWildcardTypes(compilerOptions)) {
139031
139063
  const possibleSearchDirs = new Set(fileNames.map(getDirectoryPath));
139032
139064
  possibleSearchDirs.add(projectRootPath);
139033
139065
  possibleSearchDirs.forEach((searchDir) => {
@@ -161836,6 +161868,8 @@ var errorCannotFindImplicitJsxImport = Diagnostics.This_JSX_tag_requires_the_mod
161836
161868
  var errorCodes31 = [
161837
161869
  errorCodeCannotFindModule,
161838
161870
  Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,
161871
+ Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,
161872
+ Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,
161839
161873
  errorCannotFindImplicitJsxImport
161840
161874
  ];
161841
161875
  registerCodeFix({
@@ -161886,7 +161920,13 @@ function tryGetImportedPackageName(sourceFile, pos) {
161886
161920
  }
161887
161921
  function getTypesPackageNameToInstall(packageName, host, diagCode) {
161888
161922
  var _a;
161889
- return diagCode === errorCodeCannotFindModule ? nodeCoreModules.has(packageName) ? "@types/node" : void 0 : ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0;
161923
+ if (nodeCoreModules.has(packageName)) {
161924
+ return "@types/node";
161925
+ }
161926
+ if (diagCode !== errorCodeCannotFindModule) {
161927
+ return ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0;
161928
+ }
161929
+ return void 0;
161890
161930
  }
161891
161931
 
161892
161932
  // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
@@ -184091,6 +184131,7 @@ __export(ts_exports2, {
184091
184131
  getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,
184092
184132
  getAllowJSCompilerOption: () => getAllowJSCompilerOption,
184093
184133
  getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,
184134
+ getAlwaysStrict: () => getAlwaysStrict,
184094
184135
  getAncestor: () => getAncestor,
184095
184136
  getAnyExtensionFromPath: () => getAnyExtensionFromPath,
184096
184137
  getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,
@@ -185704,6 +185745,7 @@ __export(ts_exports2, {
185704
185745
  updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher,
185705
185746
  updateSourceFile: () => updateSourceFile,
185706
185747
  updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories,
185748
+ usesWildcardTypes: () => usesWildcardTypes,
185707
185749
  usingSingleLineStringWriter: () => usingSingleLineStringWriter,
185708
185750
  utf16EncodeAsString: () => utf16EncodeAsString,
185709
185751
  validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
@@ -198869,6 +198911,7 @@ if (typeof console !== "undefined") {
198869
198911
  getAllowImportingTsExtensions,
198870
198912
  getAllowJSCompilerOption,
198871
198913
  getAllowSyntheticDefaultImports,
198914
+ getAlwaysStrict,
198872
198915
  getAncestor,
198873
198916
  getAnyExtensionFromPath,
198874
198917
  getAreDeclarationMapsEnabled,
@@ -200482,6 +200525,7 @@ if (typeof console !== "undefined") {
200482
200525
  updateSharedExtendedConfigFileWatcher,
200483
200526
  updateSourceFile,
200484
200527
  updateWatchingWildcardDirectories,
200528
+ usesWildcardTypes,
200485
200529
  usingSingleLineStringWriter,
200486
200530
  utf16EncodeAsString,
200487
200531
  validateLocaleAndSetLanguage,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "6.0.0-dev.20260204",
5
+ "version": "6.0.0-dev.20260206",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "01c23d68b1113a4b71acb8484f1bf78a98307933"
118
+ "gitHead": "d67f0af5e4641c0fda56f920368528a2633580e5"
119
119
  }