@typescript-deploys/pr-build 6.0.0-pr-62556-14 → 6.0.0-pr-63239-2

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,9 +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.20260203`;
22
- var tsgoCompatEnv = typeof process !== "undefined" && process.env ? process.env.TSGO_COMPAT : void 0;
23
- var TSGO_COMPAT = tsgoCompatEnv ? tsgoCompatEnv === "true" : true;
21
+ var version = `${versionMajorMinor}.0-insiders.20260311`;
24
22
 
25
23
  // src/compiler/core.ts
26
24
  var emptyArray = [];
@@ -6815,6 +6813,7 @@ var Diagnostics = {
6815
6813
  Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."),
6816
6814
  This_expression_is_never_nullish: diag(2881, 1 /* Error */, "This_expression_is_never_nullish_2881", "This expression is never nullish."),
6817
6815
  Cannot_find_module_or_type_declarations_for_side_effect_import_of_0: diag(2882, 1 /* Error */, "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882", "Cannot find module or type declarations for side-effect import of '{0}'."),
6816
+ The_inferred_type_of_0_cannot_be_named_without_a_reference_to_2_from_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2883, 1 /* Error */, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_2_from_1_This_is_likely_not_portable_A_2883", "The inferred type of '{0}' cannot be named without a reference to '{2}' from '{1}'. This is likely not portable. A type annotation is necessary."),
6818
6817
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6819
6818
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6820
6819
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -7517,11 +7516,12 @@ var Diagnostics = {
7517
7516
  Check_side_effect_imports: diag(6806, 3 /* Message */, "Check_side_effect_imports_6806", "Check side effect imports."),
7518
7517
  This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1 /* Error */, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."),
7519
7518
  Enable_lib_replacement: diag(6808, 3 /* Message */, "Enable_lib_replacement_6808", "Enable lib replacement."),
7519
+ Ensure_types_are_ordered_stably_and_deterministically_across_compilations: diag(6809, 3 /* Message */, "Ensure_types_are_ordered_stably_and_deterministically_across_compilations_6809", "Ensure types are ordered stably and deterministically across compilations."),
7520
7520
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
7521
7521
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7522
7522
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
7523
7523
  default_Colon: diag(6903, 3 /* Message */, "default_Colon_6903", "default:"),
7524
- false_unless_strict_is_set: diag(6905, 3 /* Message */, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"),
7524
+ true_unless_strict_is_false: diag(6905, 3 /* Message */, "true_unless_strict_is_false_6905", "`true`, unless `strict` is `false`"),
7525
7525
  false_unless_composite_is_set: diag(6906, 3 /* Message */, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"),
7526
7526
  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.'),
7527
7527
  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 `["**/*"]`'),
@@ -11239,6 +11239,7 @@ function sortAndDeduplicateDiagnostics(diagnostics) {
11239
11239
  }
11240
11240
  var targetToLibMap = /* @__PURE__ */ new Map([
11241
11241
  [99 /* ESNext */, "lib.esnext.full.d.ts"],
11242
+ [12 /* ES2025 */, "lib.es2025.full.d.ts"],
11242
11243
  [11 /* ES2024 */, "lib.es2024.full.d.ts"],
11243
11244
  [10 /* ES2023 */, "lib.es2023.full.d.ts"],
11244
11245
  [9 /* ES2022 */, "lib.es2022.full.d.ts"],
@@ -11255,6 +11256,7 @@ function getDefaultLibFileName(options) {
11255
11256
  const target = getEmitScriptTarget(options);
11256
11257
  switch (target) {
11257
11258
  case 99 /* ESNext */:
11259
+ case 12 /* ES2025 */:
11258
11260
  case 11 /* ES2024 */:
11259
11261
  case 10 /* ES2023 */:
11260
11262
  case 9 /* ES2022 */:
@@ -13162,6 +13164,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13162
13164
  "unicodeSets"
13163
13165
  ]
13164
13166
  })),
13167
+ RegExpConstructor: new Map(Object.entries({
13168
+ es2025: [
13169
+ "escape"
13170
+ ]
13171
+ })),
13165
13172
  Reflect: new Map(Object.entries({
13166
13173
  es2015: [
13167
13174
  "apply",
@@ -13241,7 +13248,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13241
13248
  "fround",
13242
13249
  "cbrt"
13243
13250
  ],
13244
- esnext: [
13251
+ es2025: [
13245
13252
  "f16round"
13246
13253
  ]
13247
13254
  })),
@@ -13250,6 +13257,10 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13250
13257
  "entries",
13251
13258
  "keys",
13252
13259
  "values"
13260
+ ],
13261
+ esnext: [
13262
+ "getOrInsert",
13263
+ "getOrInsertComputed"
13253
13264
  ]
13254
13265
  })),
13255
13266
  MapConstructor: new Map(Object.entries({
@@ -13263,7 +13274,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13263
13274
  "keys",
13264
13275
  "values"
13265
13276
  ],
13266
- esnext: [
13277
+ es2025: [
13267
13278
  "union",
13268
13279
  "intersection",
13269
13280
  "difference",
@@ -13288,6 +13299,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13288
13299
  ],
13289
13300
  es2024: [
13290
13301
  "withResolvers"
13302
+ ],
13303
+ es2025: [
13304
+ "try"
13291
13305
  ]
13292
13306
  })),
13293
13307
  Symbol: new Map(Object.entries({
@@ -13304,6 +13318,10 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13304
13318
  "entries",
13305
13319
  "keys",
13306
13320
  "values"
13321
+ ],
13322
+ esnext: [
13323
+ "getOrInsert",
13324
+ "getOrInsertComputed"
13307
13325
  ]
13308
13326
  })),
13309
13327
  WeakSet: new Map(Object.entries({
@@ -13389,6 +13407,21 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13389
13407
  Intl: new Map(Object.entries({
13390
13408
  es2018: [
13391
13409
  "PluralRules"
13410
+ ],
13411
+ es2020: [
13412
+ "RelativeTimeFormat",
13413
+ "Locale",
13414
+ "DisplayNames"
13415
+ ],
13416
+ es2021: [
13417
+ "ListFormat",
13418
+ "DateTimeFormat"
13419
+ ],
13420
+ es2022: [
13421
+ "Segmenter"
13422
+ ],
13423
+ es2025: [
13424
+ "DurationFormat"
13392
13425
  ]
13393
13426
  })),
13394
13427
  NumberFormat: new Map(Object.entries({
@@ -13413,7 +13446,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13413
13446
  "getBigInt64",
13414
13447
  "getBigUint64"
13415
13448
  ],
13416
- esnext: [
13449
+ es2025: [
13417
13450
  "setFloat16",
13418
13451
  "getFloat16"
13419
13452
  ]
@@ -13526,7 +13559,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13526
13559
  ]
13527
13560
  })),
13528
13561
  Float16Array: new Map(Object.entries({
13529
- esnext: emptyArray
13562
+ es2025: emptyArray
13530
13563
  })),
13531
13564
  Float32Array: new Map(Object.entries({
13532
13565
  es2022: [
@@ -13587,11 +13620,27 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13587
13620
  "cause"
13588
13621
  ]
13589
13622
  })),
13623
+ ErrorConstructor: new Map(Object.entries({
13624
+ esnext: [
13625
+ "isError"
13626
+ ]
13627
+ })),
13590
13628
  Uint8ArrayConstructor: new Map(Object.entries({
13591
13629
  esnext: [
13592
13630
  "fromBase64",
13593
13631
  "fromHex"
13594
13632
  ]
13633
+ })),
13634
+ Date: new Map(Object.entries({
13635
+ esnext: [
13636
+ "toTemporalInstant"
13637
+ ]
13638
+ })),
13639
+ DisposableStack: new Map(Object.entries({
13640
+ esnext: emptyArray
13641
+ })),
13642
+ AsyncDisposableStack: new Map(Object.entries({
13643
+ esnext: emptyArray
13595
13644
  }))
13596
13645
  }))
13597
13646
  );
@@ -13720,7 +13769,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
13720
13769
  if (node.isDeclarationFile) {
13721
13770
  return false;
13722
13771
  }
13723
- if (getStrictOptionValue(compilerOptions, "alwaysStrict")) {
13772
+ if (getAlwaysStrict(compilerOptions)) {
13724
13773
  return true;
13725
13774
  }
13726
13775
  if (startsWithUseStrict(node.statements)) {
@@ -17946,6 +17995,9 @@ function importSyntaxAffectsModuleResolution(options) {
17946
17995
  const moduleResolution = getEmitModuleResolutionKind(options);
17947
17996
  return 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || getResolvePackageJsonExports(options) || getResolvePackageJsonImports(options);
17948
17997
  }
17998
+ function usesWildcardTypes(options) {
17999
+ return some(options.types, (t) => t === "*");
18000
+ }
17949
18001
  function createComputedCompilerOptions(options) {
17950
18002
  return options;
17951
18003
  }
@@ -17960,7 +18012,7 @@ var _computedOptions = createComputedCompilerOptions({
17960
18012
  dependencies: [],
17961
18013
  computeValue: (compilerOptions) => {
17962
18014
  const target = compilerOptions.target === 0 /* ES3 */ ? void 0 : compilerOptions.target;
17963
- return target ?? 11 /* LatestStandard */;
18015
+ return target ?? 12 /* LatestStandard */;
17964
18016
  }
17965
18017
  },
17966
18018
  module: {
@@ -18174,10 +18226,11 @@ var _computedOptions = createComputedCompilerOptions({
18174
18226
  return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn");
18175
18227
  }
18176
18228
  },
18229
+ // Previously a strict-mode flag, but no longer.
18177
18230
  alwaysStrict: {
18178
- dependencies: ["strict"],
18231
+ dependencies: [],
18179
18232
  computeValue: (compilerOptions) => {
18180
- return getStrictOptionValue(compilerOptions, "alwaysStrict");
18233
+ return compilerOptions.alwaysStrict !== false;
18181
18234
  }
18182
18235
  },
18183
18236
  useUnknownInCatchVariables: {
@@ -18205,6 +18258,7 @@ var isIncrementalCompilation = _computedOptions.incremental.computeValue;
18205
18258
  var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;
18206
18259
  var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;
18207
18260
  var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;
18261
+ var getAlwaysStrict = _computedOptions.alwaysStrict.computeValue;
18208
18262
  function emitModuleKindIsNonNodeESM(moduleKind) {
18209
18263
  return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
18210
18264
  }
@@ -18224,7 +18278,7 @@ function moduleSupportsImportAttributes(moduleKind) {
18224
18278
  return 101 /* Node18 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */ || moduleKind === 99 /* ESNext */;
18225
18279
  }
18226
18280
  function getStrictOptionValue(compilerOptions, flag) {
18227
- return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
18281
+ return compilerOptions[flag] === void 0 ? compilerOptions.strict !== false : !!compilerOptions[flag];
18228
18282
  }
18229
18283
  function getNameOfScriptTarget(scriptTarget) {
18230
18284
  return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : void 0);
@@ -24158,7 +24212,7 @@ function createNodeFactory(flags, baseFactory2) {
24158
24212
  node.path = "";
24159
24213
  node.resolvedPath = "";
24160
24214
  node.originalFileName = "";
24161
- node.languageVersion = 11 /* LatestStandard */;
24215
+ node.languageVersion = 12 /* LatestStandard */;
24162
24216
  node.languageVariant = 0;
24163
24217
  node.scriptKind = 0;
24164
24218
  node.isDeclarationFile = false;
@@ -36384,6 +36438,7 @@ var libEntries = [
36384
36438
  ["es2022", "lib.es2022.d.ts"],
36385
36439
  ["es2023", "lib.es2023.d.ts"],
36386
36440
  ["es2024", "lib.es2024.d.ts"],
36441
+ ["es2025", "lib.es2025.d.ts"],
36387
36442
  ["esnext", "lib.esnext.d.ts"],
36388
36443
  // Host only
36389
36444
  ["dom", "lib.dom.d.ts"],
@@ -36394,7 +36449,7 @@ var libEntries = [
36394
36449
  ["webworker.iterable", "lib.webworker.iterable.d.ts"],
36395
36450
  ["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
36396
36451
  ["scripthost", "lib.scripthost.d.ts"],
36397
- // ES2015 Or ESNext By-feature options
36452
+ // ES2015 and later By-feature options
36398
36453
  ["es2015.core", "lib.es2015.core.d.ts"],
36399
36454
  ["es2015.collection", "lib.es2015.collection.d.ts"],
36400
36455
  ["es2015.generator", "lib.es2015.generator.d.ts"],
@@ -36451,27 +36506,35 @@ var libEntries = [
36451
36506
  ["es2024.regexp", "lib.es2024.regexp.d.ts"],
36452
36507
  ["es2024.sharedmemory", "lib.es2024.sharedmemory.d.ts"],
36453
36508
  ["es2024.string", "lib.es2024.string.d.ts"],
36454
- ["esnext.array", "lib.es2023.array.d.ts"],
36455
- ["esnext.collection", "lib.esnext.collection.d.ts"],
36456
- ["esnext.symbol", "lib.es2019.symbol.d.ts"],
36509
+ ["es2025.collection", "lib.es2025.collection.d.ts"],
36510
+ ["es2025.float16", "lib.es2025.float16.d.ts"],
36511
+ ["es2025.intl", "lib.es2025.intl.d.ts"],
36512
+ ["es2025.iterator", "lib.es2025.iterator.d.ts"],
36513
+ ["es2025.promise", "lib.es2025.promise.d.ts"],
36514
+ ["es2025.regexp", "lib.es2025.regexp.d.ts"],
36515
+ // Fallback for backward compatibility
36457
36516
  ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
36458
- ["esnext.intl", "lib.esnext.intl.d.ts"],
36459
- ["esnext.disposable", "lib.esnext.disposable.d.ts"],
36517
+ ["esnext.symbol", "lib.es2019.symbol.d.ts"],
36460
36518
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
36461
- ["esnext.string", "lib.es2022.string.d.ts"],
36462
- ["esnext.promise", "lib.es2024.promise.d.ts"],
36463
36519
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
36464
- ["esnext.decorators", "lib.esnext.decorators.d.ts"],
36465
36520
  ["esnext.object", "lib.es2024.object.d.ts"],
36466
- ["esnext.array", "lib.esnext.array.d.ts"],
36467
36521
  ["esnext.regexp", "lib.es2024.regexp.d.ts"],
36468
36522
  ["esnext.string", "lib.es2024.string.d.ts"],
36469
- ["esnext.iterator", "lib.esnext.iterator.d.ts"],
36470
- ["esnext.promise", "lib.esnext.promise.d.ts"],
36471
- ["esnext.float16", "lib.esnext.float16.d.ts"],
36472
- ["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
36523
+ ["esnext.float16", "lib.es2025.float16.d.ts"],
36524
+ ["esnext.iterator", "lib.es2025.iterator.d.ts"],
36525
+ ["esnext.promise", "lib.es2025.promise.d.ts"],
36526
+ // ESNext By-feature options
36527
+ ["esnext.array", "lib.esnext.array.d.ts"],
36528
+ ["esnext.collection", "lib.esnext.collection.d.ts"],
36529
+ ["esnext.date", "lib.esnext.date.d.ts"],
36530
+ ["esnext.decorators", "lib.esnext.decorators.d.ts"],
36531
+ ["esnext.disposable", "lib.esnext.disposable.d.ts"],
36473
36532
  ["esnext.error", "lib.esnext.error.d.ts"],
36533
+ ["esnext.intl", "lib.esnext.intl.d.ts"],
36474
36534
  ["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
36535
+ ["esnext.temporal", "lib.esnext.temporal.d.ts"],
36536
+ ["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
36537
+ // Decorators
36475
36538
  ["decorators", "lib.decorators.d.ts"],
36476
36539
  ["decorators.legacy", "lib.decorators.legacy.d.ts"]
36477
36540
  ];
@@ -36770,6 +36833,7 @@ var targetOptionDeclaration = {
36770
36833
  es2022: 9 /* ES2022 */,
36771
36834
  es2023: 10 /* ES2023 */,
36772
36835
  es2024: 11 /* ES2024 */,
36836
+ es2025: 12 /* ES2025 */,
36773
36837
  esnext: 99 /* ESNext */
36774
36838
  })),
36775
36839
  affectsSourceFile: true,
@@ -36781,7 +36845,7 @@ var targetOptionDeclaration = {
36781
36845
  showInSimplifiedHelpView: true,
36782
36846
  category: Diagnostics.Language_and_Environment,
36783
36847
  description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
36784
- defaultValueDescription: 11 /* LatestStandard */
36848
+ defaultValueDescription: 12 /* LatestStandard */
36785
36849
  };
36786
36850
  var moduleOptionDeclaration = {
36787
36851
  name: "module",
@@ -37091,7 +37155,7 @@ var commandOptionsWithoutBuild = [
37091
37155
  showInSimplifiedHelpView: true,
37092
37156
  category: Diagnostics.Type_Checking,
37093
37157
  description: Diagnostics.Enable_all_strict_type_checking_options,
37094
- defaultValueDescription: false
37158
+ defaultValueDescription: true
37095
37159
  },
37096
37160
  {
37097
37161
  name: "noImplicitAny",
@@ -37101,7 +37165,7 @@ var commandOptionsWithoutBuild = [
37101
37165
  strictFlag: true,
37102
37166
  category: Diagnostics.Type_Checking,
37103
37167
  description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
37104
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37168
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37105
37169
  },
37106
37170
  {
37107
37171
  name: "strictNullChecks",
@@ -37111,7 +37175,7 @@ var commandOptionsWithoutBuild = [
37111
37175
  strictFlag: true,
37112
37176
  category: Diagnostics.Type_Checking,
37113
37177
  description: Diagnostics.When_type_checking_take_into_account_null_and_undefined,
37114
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37178
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37115
37179
  },
37116
37180
  {
37117
37181
  name: "strictFunctionTypes",
@@ -37121,7 +37185,7 @@ var commandOptionsWithoutBuild = [
37121
37185
  strictFlag: true,
37122
37186
  category: Diagnostics.Type_Checking,
37123
37187
  description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
37124
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37188
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37125
37189
  },
37126
37190
  {
37127
37191
  name: "strictBindCallApply",
@@ -37131,7 +37195,7 @@ var commandOptionsWithoutBuild = [
37131
37195
  strictFlag: true,
37132
37196
  category: Diagnostics.Type_Checking,
37133
37197
  description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
37134
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37198
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37135
37199
  },
37136
37200
  {
37137
37201
  name: "strictPropertyInitialization",
@@ -37141,7 +37205,7 @@ var commandOptionsWithoutBuild = [
37141
37205
  strictFlag: true,
37142
37206
  category: Diagnostics.Type_Checking,
37143
37207
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
37144
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37208
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37145
37209
  },
37146
37210
  {
37147
37211
  name: "strictBuiltinIteratorReturn",
@@ -37151,7 +37215,17 @@ var commandOptionsWithoutBuild = [
37151
37215
  strictFlag: true,
37152
37216
  category: Diagnostics.Type_Checking,
37153
37217
  description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
37154
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37218
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37219
+ },
37220
+ {
37221
+ name: "stableTypeOrdering",
37222
+ type: "boolean",
37223
+ affectsSemanticDiagnostics: true,
37224
+ affectsBuildInfo: true,
37225
+ showInHelp: false,
37226
+ category: Diagnostics.Type_Checking,
37227
+ description: Diagnostics.Ensure_types_are_ordered_stably_and_deterministically_across_compilations,
37228
+ defaultValueDescription: false
37155
37229
  },
37156
37230
  {
37157
37231
  name: "noImplicitThis",
@@ -37161,7 +37235,7 @@ var commandOptionsWithoutBuild = [
37161
37235
  strictFlag: true,
37162
37236
  category: Diagnostics.Type_Checking,
37163
37237
  description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
37164
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37238
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37165
37239
  },
37166
37240
  {
37167
37241
  name: "useUnknownInCatchVariables",
@@ -37171,7 +37245,7 @@ var commandOptionsWithoutBuild = [
37171
37245
  strictFlag: true,
37172
37246
  category: Diagnostics.Type_Checking,
37173
37247
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
37174
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37248
+ defaultValueDescription: Diagnostics.true_unless_strict_is_false
37175
37249
  },
37176
37250
  {
37177
37251
  name: "alwaysStrict",
@@ -37179,10 +37253,9 @@ var commandOptionsWithoutBuild = [
37179
37253
  affectsSourceFile: true,
37180
37254
  affectsEmit: true,
37181
37255
  affectsBuildInfo: true,
37182
- strictFlag: true,
37183
37256
  category: Diagnostics.Type_Checking,
37184
37257
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
37185
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37258
+ defaultValueDescription: true
37186
37259
  },
37187
37260
  // Additional Checks
37188
37261
  {
@@ -40219,10 +40292,10 @@ function getConditions(options, resolutionMode) {
40219
40292
  return concatenate(conditions, options.customConditions);
40220
40293
  }
40221
40294
  function getAutomaticTypeDirectiveNames(options, host) {
40222
- if (options.types) {
40223
- return options.types;
40295
+ if (!usesWildcardTypes(options)) {
40296
+ return options.types ?? [];
40224
40297
  }
40225
- const result = [];
40298
+ const wildcardMatches = [];
40226
40299
  if (host.directoryExists && host.getDirectories) {
40227
40300
  const typeRoots = getEffectiveTypeRoots(options, host);
40228
40301
  if (typeRoots) {
@@ -40235,7 +40308,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
40235
40308
  if (!isNotNeededPackage) {
40236
40309
  const baseFileName = getBaseFileName(normalized);
40237
40310
  if (baseFileName.charCodeAt(0) !== 46 /* dot */) {
40238
- result.push(baseFileName);
40311
+ wildcardMatches.push(baseFileName);
40239
40312
  }
40240
40313
  }
40241
40314
  }
@@ -40243,7 +40316,7 @@ function getAutomaticTypeDirectiveNames(options, host) {
40243
40316
  }
40244
40317
  }
40245
40318
  }
40246
- return result;
40319
+ return deduplicate(flatten(options.types.map((t) => t === "*" ? wildcardMatches : t)), equateValues);
40247
40320
  }
40248
40321
  function isPackageJsonInfo(entry) {
40249
40322
  return !!(entry == null ? void 0 : entry.contents);
@@ -42431,7 +42504,7 @@ function createBinder() {
42431
42504
  emitFlags = 0 /* None */;
42432
42505
  }
42433
42506
  function bindInStrictMode(file2, opts) {
42434
- if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) {
42507
+ if (getAlwaysStrict(opts) && !file2.isDeclarationFile) {
42435
42508
  return true;
42436
42509
  } else {
42437
42510
  return !!file2.externalModuleIndicator;
@@ -46367,7 +46440,6 @@ function createTypeChecker(host) {
46367
46440
  };
46368
46441
  var cancellationToken;
46369
46442
  var scanner;
46370
- var fileIndexMap = new Map(host.getSourceFiles().map((file, i) => [file, i]));
46371
46443
  var Symbol13 = objectAllocator.getSymbolConstructor();
46372
46444
  var Type7 = objectAllocator.getTypeConstructor();
46373
46445
  var Signature5 = objectAllocator.getSignatureConstructor();
@@ -46401,6 +46473,8 @@ function createTypeChecker(host) {
46401
46473
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
46402
46474
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
46403
46475
  var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
46476
+ var stableTypeOrdering = !!compilerOptions.stableTypeOrdering;
46477
+ var fileIndexMap = stableTypeOrdering ? new Map(host.getSourceFiles().map((file, i) => [file, i])) : void 0;
46404
46478
  var checkBinaryExpression = createCheckBinaryExpression();
46405
46479
  var emitResolver = createResolver();
46406
46480
  var nodeBuilder = createNodeBuilder();
@@ -49388,7 +49462,7 @@ function createTypeChecker(host) {
49388
49462
  }
49389
49463
  function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
49390
49464
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
49391
- 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);
49465
+ 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));
49392
49466
  return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
49393
49467
  }
49394
49468
  function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
@@ -50058,7 +50132,7 @@ function createTypeChecker(host) {
50058
50132
  return type;
50059
50133
  }
50060
50134
  function createTypeofType() {
50061
- return getUnionType(map(TSGO_COMPAT ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
50135
+ return getUnionType(map(stableTypeOrdering ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
50062
50136
  }
50063
50137
  function createTypeParameter(symbol) {
50064
50138
  return createTypeWithSymbol(524288 /* TypeParameter */, symbol);
@@ -50067,14 +50141,14 @@ function createTypeChecker(host) {
50067
50141
  return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) !== 95 /* _ */ && name.charCodeAt(2) !== 64 /* at */ && name.charCodeAt(2) !== 35 /* hash */;
50068
50142
  }
50069
50143
  function getNamedMembers(members, container) {
50070
- if (!TSGO_COMPAT) {
50144
+ if (!stableTypeOrdering) {
50071
50145
  let result;
50072
50146
  members.forEach((symbol, id) => {
50073
50147
  if (isNamedMember(symbol, id)) {
50074
- (result || (result = [])).push(symbol);
50148
+ (result ?? (result = [])).push(symbol);
50075
50149
  }
50076
50150
  });
50077
- return result || emptyArray;
50151
+ return result ?? emptyArray;
50078
50152
  }
50079
50153
  if (members.size === 0) {
50080
50154
  return emptyArray;
@@ -50095,11 +50169,15 @@ function createTypeChecker(host) {
50095
50169
  });
50096
50170
  contained == null ? void 0 : contained.sort(compareSymbols);
50097
50171
  nonContained == null ? void 0 : nonContained.sort(compareSymbols);
50098
- return concatenate(contained, nonContained) || emptyArray;
50172
+ return concatenate(contained, nonContained) ?? emptyArray;
50099
50173
  function isDeclarationContainedBy(symbol, container2) {
50100
50174
  const declaration = symbol.valueDeclaration;
50101
- if (declaration) {
50102
- return some(container2.declarations, (d) => containedBy(declaration, d));
50175
+ if (declaration && container2.declarations) {
50176
+ for (const d of container2.declarations) {
50177
+ if (containedBy(declaration, d)) {
50178
+ return true;
50179
+ }
50180
+ }
50103
50181
  }
50104
50182
  return false;
50105
50183
  function containedBy(a, b) {
@@ -50838,7 +50916,7 @@ function createTypeChecker(host) {
50838
50916
  if (name.includes("/node_modules/")) {
50839
50917
  context.encounteredError = true;
50840
50918
  if (context.tracker.reportLikelyUnsafeImportRequiredError) {
50841
- context.tracker.reportLikelyUnsafeImportRequiredError(name);
50919
+ context.tracker.reportLikelyUnsafeImportRequiredError(name, nodeSymbol ? unescapeLeadingUnderscores(nodeSymbol.escapedName) : void 0);
50842
50920
  }
50843
50921
  }
50844
50922
  if (name !== originalName) {
@@ -51123,7 +51201,7 @@ function createTypeChecker(host) {
51123
51201
  return statements;
51124
51202
  }
51125
51203
  function withContext(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, cb, out) {
51126
- const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : (internalFlags || 0 /* None */) & 4 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0;
51204
+ const moduleResolverHost = (tracker == null ? void 0 : tracker.moduleResolverHost) ?? createBasicNodeBuilderModuleSpecifierResolutionHost(host);
51127
51205
  flags = flags || 0 /* None */;
51128
51206
  const maxTruncationLength = maximumLength || (flags & 1 /* NoTruncation */ ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength);
51129
51207
  const context = {
@@ -52551,8 +52629,8 @@ function createTypeChecker(host) {
52551
52629
  reportInaccessibleUniqueSymbolError() {
52552
52630
  markError(() => oldTracker.reportInaccessibleUniqueSymbolError());
52553
52631
  },
52554
- reportLikelyUnsafeImportRequiredError(specifier) {
52555
- markError(() => oldTracker.reportLikelyUnsafeImportRequiredError(specifier));
52632
+ reportLikelyUnsafeImportRequiredError(specifier, symbolName2) {
52633
+ markError(() => oldTracker.reportLikelyUnsafeImportRequiredError(specifier, symbolName2));
52556
52634
  },
52557
52635
  reportNonSerializableProperty(name) {
52558
52636
  markError(() => oldTracker.reportNonSerializableProperty(name));
@@ -53078,7 +53156,7 @@ function createTypeChecker(host) {
53078
53156
  if (!attributes) {
53079
53157
  context.encounteredError = true;
53080
53158
  if (context.tracker.reportLikelyUnsafeImportRequiredError) {
53081
- context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
53159
+ context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier, unescapeLeadingUnderscores(symbol.escapedName));
53082
53160
  }
53083
53161
  }
53084
53162
  }
@@ -53331,22 +53409,7 @@ function createTypeChecker(host) {
53331
53409
  function getPropertyNameNodeForSymbol(symbol, context) {
53332
53410
  const hashPrivateName = getClonedHashPrivateName(symbol);
53333
53411
  if (hashPrivateName) {
53334
- const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */;
53335
- if (!shouldEmitErroneousFieldName) {
53336
- return hashPrivateName;
53337
- } else {
53338
- let rawName2 = unescapeLeadingUnderscores(symbol.escapedName);
53339
- rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#");
53340
- return createPropertyNameNodeForIdentifierOrLiteral(
53341
- rawName2,
53342
- getEmitScriptTarget(compilerOptions),
53343
- /*singleQuote*/
53344
- false,
53345
- /*stringNamed*/
53346
- true,
53347
- !!(symbol.flags & 8192 /* Method */)
53348
- );
53349
- }
53412
+ return hashPrivateName;
53350
53413
  }
53351
53414
  const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
53352
53415
  const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
@@ -61260,10 +61323,10 @@ function createTypeChecker(host) {
61260
61323
  return type.id;
61261
61324
  }
61262
61325
  function containsType(types, type) {
61263
- return TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
61326
+ return stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
61264
61327
  }
61265
61328
  function insertType(types, type) {
61266
- const index = TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
61329
+ const index = stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
61267
61330
  if (index < 0) {
61268
61331
  types.splice(~index, 0, type);
61269
61332
  return true;
@@ -61282,7 +61345,7 @@ function createTypeChecker(host) {
61282
61345
  if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */;
61283
61346
  } else {
61284
61347
  const len = typeSet.length;
61285
- const index = TSGO_COMPAT ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
61348
+ const index = stableTypeOrdering ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
61286
61349
  if (index < 0) {
61287
61350
  typeSet.splice(~index, 0, type);
61288
61351
  }
@@ -66871,9 +66934,12 @@ function createTypeChecker(host) {
66871
66934
  if (relation === identityRelation) {
66872
66935
  return signaturesIdenticalTo(source2, target2, kind);
66873
66936
  }
66874
- if (target2 === anyFunctionType || source2 === anyFunctionType) {
66937
+ if (source2 === anyFunctionType) {
66875
66938
  return -1 /* True */;
66876
66939
  }
66940
+ if (target2 === anyFunctionType) {
66941
+ return 0 /* False */;
66942
+ }
66877
66943
  const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration);
66878
66944
  const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration);
66879
66945
  const sourceSignatures = getSignaturesOfType(
@@ -69259,19 +69325,21 @@ function createTypeChecker(host) {
69259
69325
  case "console":
69260
69326
  return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;
69261
69327
  case "$":
69262
- 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;
69328
+ 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;
69329
+ case "beforeEach":
69263
69330
  case "describe":
69264
69331
  case "suite":
69265
69332
  case "it":
69266
69333
  case "test":
69267
- 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;
69334
+ 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;
69268
69335
  case "process":
69269
69336
  case "require":
69270
69337
  case "Buffer":
69271
69338
  case "module":
69272
- 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;
69339
+ case "NodeJS":
69340
+ 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;
69273
69341
  case "Bun":
69274
- 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;
69342
+ 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;
69275
69343
  case "Map":
69276
69344
  case "Set":
69277
69345
  case "Promise":
@@ -69304,6 +69372,18 @@ function createTypeChecker(host) {
69304
69372
  }
69305
69373
  }
69306
69374
  }
69375
+ function getCannotResolveModuleNameErrorForSpecificModule(moduleName) {
69376
+ if (moduleName.kind === 11 /* StringLiteral */) {
69377
+ if (nodeCoreModules.has(moduleName.text)) {
69378
+ if (usesWildcardTypes(compilerOptions)) {
69379
+ return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode;
69380
+ } else {
69381
+ 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;
69382
+ }
69383
+ }
69384
+ }
69385
+ return void 0;
69386
+ }
69307
69387
  function getResolvedSymbol(node) {
69308
69388
  const links = getNodeLinks(node);
69309
69389
  if (!links.resolvedSymbol) {
@@ -74388,7 +74468,7 @@ function createTypeChecker(host) {
74388
74468
  spread,
74389
74469
  createAnonymousType(attributesSymbol, childPropMap, emptyArray, emptyArray, emptyArray),
74390
74470
  attributesSymbol,
74391
- objectFlags,
74471
+ objectFlags | getPropagatingFlagsOfTypes(childrenTypes),
74392
74472
  /*readonly*/
74393
74473
  false
74394
74474
  );
@@ -77655,6 +77735,14 @@ function createTypeChecker(host) {
77655
77735
  if (importCallOptionsType !== emptyObjectType) {
77656
77736
  checkTypeAssignableTo(optionsType, getNullableType(importCallOptionsType, 4 /* Undefined */), node.arguments[1]);
77657
77737
  }
77738
+ if (compilerOptions.ignoreDeprecations !== "6.0" && isObjectLiteralExpression(node.arguments[1])) {
77739
+ for (const prop of node.arguments[1].properties) {
77740
+ if (isPropertyAssignment(prop) && isIdentifier(prop.name) && prop.name.escapedText === "assert") {
77741
+ grammarErrorOnNode(prop.name, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
77742
+ break;
77743
+ }
77744
+ }
77745
+ }
77658
77746
  }
77659
77747
  const moduleSymbol = resolveExternalModuleName(node, specifier);
77660
77748
  if (moduleSymbol) {
@@ -81897,6 +81985,9 @@ function createTypeChecker(host) {
81897
81985
  function checkImportType(node) {
81898
81986
  checkSourceElement(node.argument);
81899
81987
  if (node.attributes) {
81988
+ if (node.attributes.token !== 118 /* WithKeyword */ && compilerOptions.ignoreDeprecations !== "6.0") {
81989
+ grammarErrorOnFirstToken(node.attributes, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
81990
+ }
81900
81991
  getResolutionModeOverride(node.attributes, grammarErrorOnNode);
81901
81992
  }
81902
81993
  checkTypeReferenceOrImport(node);
@@ -90480,7 +90571,7 @@ function createTypeChecker(host) {
90480
90571
  return specifier;
90481
90572
  }
90482
90573
  function sortSymbolsIfTSGoCompat(array) {
90483
- if (TSGO_COMPAT && array) {
90574
+ if (stableTypeOrdering && array) {
90484
90575
  return array.sort(compareSymbols);
90485
90576
  }
90486
90577
  return array;
@@ -90555,7 +90646,7 @@ function createTypeChecker(host) {
90555
90646
  } else if (getObjectFlags(t2) & 4 /* Reference */) {
90556
90647
  return 1;
90557
90648
  } else {
90558
- let c3 = getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */ - getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */;
90649
+ let c3 = (getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */) - (getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */);
90559
90650
  if (c3 !== 0) {
90560
90651
  return c3;
90561
90652
  }
@@ -90621,7 +90712,7 @@ function createTypeChecker(host) {
90621
90712
  if (c2 !== 0) {
90622
90713
  return c2;
90623
90714
  }
90624
- c2 = t1.flags - t2.flags;
90715
+ c2 = t1.indexFlags - t2.indexFlags;
90625
90716
  if (c2 !== 0) {
90626
90717
  return c2;
90627
90718
  }
@@ -90721,7 +90812,7 @@ function createTypeChecker(host) {
90721
90812
  if (t1 === t2) {
90722
90813
  return 0;
90723
90814
  }
90724
- if (t1.readonly === t2.readonly) {
90815
+ if (t1.readonly !== t2.readonly) {
90725
90816
  return t1.readonly ? 1 : -1;
90726
90817
  }
90727
90818
  if (t1.elementFlags.length !== t2.elementFlags.length) {
@@ -90926,11 +91017,11 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl {
90926
91017
  this.inner.reportCyclicStructureError();
90927
91018
  }
90928
91019
  }
90929
- reportLikelyUnsafeImportRequiredError(specifier) {
91020
+ reportLikelyUnsafeImportRequiredError(specifier, symbolName2) {
90930
91021
  var _a;
90931
91022
  if ((_a = this.inner) == null ? void 0 : _a.reportLikelyUnsafeImportRequiredError) {
90932
91023
  this.onDiagnosticReported();
90933
- this.inner.reportLikelyUnsafeImportRequiredError(specifier);
91024
+ this.inner.reportLikelyUnsafeImportRequiredError(specifier, symbolName2);
90934
91025
  }
90935
91026
  }
90936
91027
  reportTruncationError() {
@@ -94295,7 +94386,7 @@ function transformTypeScript(context) {
94295
94386
  }
94296
94387
  }
94297
94388
  function visitSourceFile(node) {
94298
- const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
94389
+ const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
94299
94390
  return factory2.updateSourceFile(
94300
94391
  node,
94301
94392
  visitLexicalEnvironment(
@@ -103977,7 +104068,7 @@ function transformJsx(context) {
103977
104068
  node.children,
103978
104069
  isChild,
103979
104070
  /*location*/
103980
- node
104071
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
103981
104072
  );
103982
104073
  }
103983
104074
  function visitJsxSelfClosingElement(node, isChild) {
@@ -103988,7 +104079,7 @@ function transformJsx(context) {
103988
104079
  void 0,
103989
104080
  isChild,
103990
104081
  /*location*/
103991
- node
104082
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
103992
104083
  );
103993
104084
  }
103994
104085
  function visitJsxFragment(node, isChild) {
@@ -103998,7 +104089,7 @@ function transformJsx(context) {
103998
104089
  node.children,
103999
104090
  isChild,
104000
104091
  /*location*/
104001
- node
104092
+ createRange(skipTrivia(currentSourceFile.text, node.pos), node.end)
104002
104093
  );
104003
104094
  }
104004
104095
  function convertJsxChildrenToChildrenPropObject(children) {
@@ -110074,7 +110165,7 @@ function transformModule(context) {
110074
110165
  function transformCommonJSModule(node) {
110075
110166
  startLexicalEnvironment();
110076
110167
  const statements = [];
110077
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
110168
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
110078
110169
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);
110079
110170
  if (shouldEmitUnderscoreUnderscoreESModule()) {
110080
110171
  append(statements, createUnderscoreUnderscoreESModule());
@@ -112087,7 +112178,7 @@ function transformSystemModule(context) {
112087
112178
  function createSystemModuleBody(node, dependencyGroups) {
112088
112179
  const statements = [];
112089
112180
  startLexicalEnvironment();
112090
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
112181
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
112091
112182
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
112092
112183
  statements.push(
112093
112184
  factory2.createVariableStatement(
@@ -114303,9 +114394,13 @@ function transformDeclarations(context) {
114303
114394
  context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this"));
114304
114395
  }
114305
114396
  }
114306
- function reportLikelyUnsafeImportRequiredError(specifier) {
114397
+ function reportLikelyUnsafeImportRequiredError(specifier, symbolName2) {
114307
114398
  if (errorNameNode || errorFallbackNode) {
114308
- context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier));
114399
+ if (symbolName2) {
114400
+ context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_2_from_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier, symbolName2));
114401
+ } else {
114402
+ context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier));
114403
+ }
114309
114404
  }
114310
114405
  }
114311
114406
  function reportTruncationError() {
@@ -115478,6 +115573,7 @@ function transformDeclarations(context) {
115478
115573
  if (isOmittedExpression(elem)) continue;
115479
115574
  if (isBindingPattern(elem.name)) {
115480
115575
  elems = concatenate(elems, walkBindingPattern(elem.name));
115576
+ continue;
115481
115577
  }
115482
115578
  elems = elems || [];
115483
115579
  elems.push(factory2.createPropertyDeclaration(
@@ -123348,6 +123444,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123348
123444
  Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);
123349
123445
  for (const newSourceFile of newSourceFiles) {
123350
123446
  filesByName.set(newSourceFile.path, newSourceFile);
123447
+ if (oldProgram.isSourceFileDefaultLibrary(newSourceFile)) {
123448
+ libFiles.add(newSourceFile.path);
123449
+ }
123351
123450
  }
123352
123451
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
123353
123452
  oldFilesByNameMap.forEach((oldFile, path) => {
@@ -125067,6 +125166,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
125067
125166
  }
125068
125167
  });
125069
125168
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
125169
+ if (options.alwaysStrict === false) {
125170
+ createDeprecatedDiagnostic(
125171
+ "alwaysStrict",
125172
+ "false",
125173
+ /*useInstead*/
125174
+ void 0,
125175
+ /*related*/
125176
+ void 0
125177
+ );
125178
+ }
125070
125179
  if (options.target === 1 /* ES5 */) {
125071
125180
  createDeprecatedDiagnostic("target", "ES5");
125072
125181
  }
@@ -125132,6 +125241,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
125132
125241
  void 0
125133
125242
  );
125134
125243
  }
125244
+ if (options.downlevelIteration !== void 0) {
125245
+ createDeprecatedDiagnostic("downlevelIteration");
125246
+ }
125135
125247
  });
125136
125248
  }
125137
125249
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
@@ -125888,8 +126000,7 @@ function createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax) {
125888
126000
  reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
125889
126001
  ) : void 0;
125890
126002
  case 8 /* AutomaticTypeDirectiveFile */:
125891
- if (!options.types) return void 0;
125892
- configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", reason.typeReference);
126003
+ configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", usesWildcardTypes(options) ? "*" : reason.typeReference);
125893
126004
  message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
125894
126005
  break;
125895
126006
  case 6 /* LibFile */:
@@ -128909,7 +129020,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
128909
129020
  function updateTypeRootsWatch() {
128910
129021
  var _a;
128911
129022
  const options = resolutionHost.getCompilationSettings();
128912
- if (options.types) {
129023
+ if (!usesWildcardTypes(options)) {
128913
129024
  closeTypeRootsWatch();
128914
129025
  return;
128915
129026
  }
@@ -129266,7 +129377,7 @@ function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
129266
129377
  options.outFile ? "--outFile" : "--out"
129267
129378
  );
129268
129379
  case 8 /* AutomaticTypeDirectiveFile */: {
129269
- 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];
129380
+ 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];
129270
129381
  return chainDiagnosticMessages(
129271
129382
  /*details*/
129272
129383
  void 0,
@@ -132093,7 +132204,8 @@ function shouldBePretty(sys2, options) {
132093
132204
  return options.pretty;
132094
132205
  }
132095
132206
  function getOptionsForHelp(commandLine) {
132096
- return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView);
132207
+ const helpOptions = filter(optionDeclarations.concat(tscBuildOption), (option) => option.showInHelp !== false);
132208
+ return !!commandLine.options.all ? toSorted(helpOptions, (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(helpOptions, (v) => !!v.showInSimplifiedHelpView);
132097
132209
  }
132098
132210
  function printVersion(sys2) {
132099
132211
  sys2.write(getDiagnosticText(Diagnostics.Version_0, version) + sys2.newLine);
@@ -132409,7 +132521,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
132409
132521
  output = [...output, ...generateSectionOptionsOutput(
132410
132522
  sys2,
132411
132523
  getDiagnosticText(Diagnostics.WATCH_OPTIONS),
132412
- watchOptions,
132524
+ filter(watchOptions, (option) => option.showInHelp !== false),
132413
132525
  /*subCategory*/
132414
132526
  false,
132415
132527
  getDiagnosticText(Diagnostics.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon)
@@ -132417,7 +132529,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
132417
132529
  output = [...output, ...generateSectionOptionsOutput(
132418
132530
  sys2,
132419
132531
  getDiagnosticText(Diagnostics.BUILD_OPTIONS),
132420
- filter(buildOptions, (option) => option !== tscBuildOption),
132532
+ filter(buildOptions, (option) => option !== tscBuildOption && option.showInHelp !== false),
132421
132533
  /*subCategory*/
132422
132534
  false,
132423
132535
  formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")
@@ -132431,7 +132543,7 @@ function printBuildHelp(sys2, buildOptions) {
132431
132543
  output = [...output, ...generateSectionOptionsOutput(
132432
132544
  sys2,
132433
132545
  getDiagnosticText(Diagnostics.BUILD_OPTIONS),
132434
- filter(buildOptions, (option) => option !== tscBuildOption),
132546
+ filter(buildOptions, (option) => option !== tscBuildOption && option.showInHelp !== false),
132435
132547
  /*subCategory*/
132436
132548
  false,
132437
132549
  formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")