typescript 6.0.0-dev.20250924 → 6.0.0-dev.20250926

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/lib/_tsc.js +37 -73
  2. package/lib/lib.d.ts +0 -2
  3. package/lib/lib.decorators.d.ts +0 -2
  4. package/lib/lib.decorators.legacy.d.ts +0 -2
  5. package/lib/lib.dom.asynciterable.d.ts +0 -2
  6. package/lib/lib.dom.d.ts +0 -2
  7. package/lib/lib.dom.iterable.d.ts +0 -2
  8. package/lib/lib.es2015.collection.d.ts +0 -2
  9. package/lib/lib.es2015.core.d.ts +0 -2
  10. package/lib/lib.es2015.d.ts +0 -2
  11. package/lib/lib.es2015.generator.d.ts +0 -2
  12. package/lib/lib.es2015.iterable.d.ts +0 -2
  13. package/lib/lib.es2015.promise.d.ts +0 -2
  14. package/lib/lib.es2015.proxy.d.ts +0 -2
  15. package/lib/lib.es2015.reflect.d.ts +0 -2
  16. package/lib/lib.es2015.symbol.d.ts +0 -2
  17. package/lib/lib.es2015.symbol.wellknown.d.ts +0 -2
  18. package/lib/lib.es2016.array.include.d.ts +0 -2
  19. package/lib/lib.es2016.d.ts +0 -2
  20. package/lib/lib.es2016.full.d.ts +0 -2
  21. package/lib/lib.es2016.intl.d.ts +0 -2
  22. package/lib/lib.es2017.arraybuffer.d.ts +0 -2
  23. package/lib/lib.es2017.d.ts +0 -2
  24. package/lib/lib.es2017.date.d.ts +0 -2
  25. package/lib/lib.es2017.full.d.ts +0 -2
  26. package/lib/lib.es2017.intl.d.ts +0 -2
  27. package/lib/lib.es2017.object.d.ts +0 -2
  28. package/lib/lib.es2017.sharedmemory.d.ts +0 -2
  29. package/lib/lib.es2017.string.d.ts +0 -2
  30. package/lib/lib.es2017.typedarrays.d.ts +0 -2
  31. package/lib/lib.es2018.asyncgenerator.d.ts +0 -2
  32. package/lib/lib.es2018.asynciterable.d.ts +0 -2
  33. package/lib/lib.es2018.d.ts +0 -2
  34. package/lib/lib.es2018.full.d.ts +0 -2
  35. package/lib/lib.es2018.intl.d.ts +0 -2
  36. package/lib/lib.es2018.promise.d.ts +0 -2
  37. package/lib/lib.es2018.regexp.d.ts +0 -2
  38. package/lib/lib.es2019.array.d.ts +0 -2
  39. package/lib/lib.es2019.d.ts +0 -2
  40. package/lib/lib.es2019.full.d.ts +0 -2
  41. package/lib/lib.es2019.intl.d.ts +0 -2
  42. package/lib/lib.es2019.object.d.ts +0 -2
  43. package/lib/lib.es2019.string.d.ts +0 -2
  44. package/lib/lib.es2019.symbol.d.ts +0 -2
  45. package/lib/lib.es2020.bigint.d.ts +0 -2
  46. package/lib/lib.es2020.d.ts +0 -2
  47. package/lib/lib.es2020.date.d.ts +0 -2
  48. package/lib/lib.es2020.full.d.ts +0 -2
  49. package/lib/lib.es2020.intl.d.ts +0 -2
  50. package/lib/lib.es2020.number.d.ts +0 -2
  51. package/lib/lib.es2020.promise.d.ts +0 -2
  52. package/lib/lib.es2020.sharedmemory.d.ts +0 -2
  53. package/lib/lib.es2020.string.d.ts +0 -2
  54. package/lib/lib.es2020.symbol.wellknown.d.ts +0 -2
  55. package/lib/lib.es2021.d.ts +0 -2
  56. package/lib/lib.es2021.full.d.ts +0 -2
  57. package/lib/lib.es2021.intl.d.ts +0 -2
  58. package/lib/lib.es2021.promise.d.ts +0 -2
  59. package/lib/lib.es2021.string.d.ts +0 -2
  60. package/lib/lib.es2021.weakref.d.ts +0 -2
  61. package/lib/lib.es2022.array.d.ts +0 -2
  62. package/lib/lib.es2022.d.ts +0 -2
  63. package/lib/lib.es2022.error.d.ts +0 -2
  64. package/lib/lib.es2022.full.d.ts +0 -2
  65. package/lib/lib.es2022.intl.d.ts +0 -2
  66. package/lib/lib.es2022.object.d.ts +0 -2
  67. package/lib/lib.es2022.regexp.d.ts +0 -2
  68. package/lib/lib.es2022.string.d.ts +0 -2
  69. package/lib/lib.es2023.array.d.ts +0 -2
  70. package/lib/lib.es2023.collection.d.ts +0 -2
  71. package/lib/lib.es2023.d.ts +0 -2
  72. package/lib/lib.es2023.full.d.ts +0 -2
  73. package/lib/lib.es2023.intl.d.ts +0 -2
  74. package/lib/lib.es2024.arraybuffer.d.ts +0 -2
  75. package/lib/lib.es2024.collection.d.ts +0 -2
  76. package/lib/lib.es2024.d.ts +0 -2
  77. package/lib/lib.es2024.full.d.ts +0 -2
  78. package/lib/lib.es2024.object.d.ts +0 -2
  79. package/lib/lib.es2024.promise.d.ts +0 -2
  80. package/lib/lib.es2024.regexp.d.ts +0 -2
  81. package/lib/lib.es2024.sharedmemory.d.ts +0 -2
  82. package/lib/lib.es2024.string.d.ts +0 -2
  83. package/lib/lib.es5.d.ts +0 -2
  84. package/lib/lib.es6.d.ts +0 -2
  85. package/lib/lib.esnext.array.d.ts +0 -2
  86. package/lib/lib.esnext.collection.d.ts +0 -2
  87. package/lib/lib.esnext.d.ts +0 -2
  88. package/lib/lib.esnext.decorators.d.ts +0 -2
  89. package/lib/lib.esnext.disposable.d.ts +0 -2
  90. package/lib/lib.esnext.error.d.ts +0 -2
  91. package/lib/lib.esnext.float16.d.ts +0 -2
  92. package/lib/lib.esnext.full.d.ts +0 -2
  93. package/lib/lib.esnext.intl.d.ts +0 -2
  94. package/lib/lib.esnext.iterator.d.ts +0 -2
  95. package/lib/lib.esnext.promise.d.ts +0 -2
  96. package/lib/lib.esnext.sharedmemory.d.ts +0 -2
  97. package/lib/lib.scripthost.d.ts +0 -2
  98. package/lib/lib.webworker.asynciterable.d.ts +0 -2
  99. package/lib/lib.webworker.d.ts +0 -2
  100. package/lib/lib.webworker.importscripts.d.ts +0 -2
  101. package/lib/lib.webworker.iterable.d.ts +0 -2
  102. package/lib/typescript.d.ts +2 -9
  103. package/lib/typescript.js +62 -103
  104. package/package.json +2 -2
package/lib/typescript.js CHANGED
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2286
 
2287
2287
  // src/compiler/corePublic.ts
2288
2288
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-dev.20250924`;
2289
+ var version = `${versionMajorMinor}.0-dev.20250926`;
2290
2290
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2291
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2292
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6791,10 +6791,10 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
6791
6791
  ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
6792
6792
  return ScriptTarget12;
6793
6793
  })(ScriptTarget || {});
6794
- var LanguageVariant = /* @__PURE__ */ ((LanguageVariant3) => {
6795
- LanguageVariant3[LanguageVariant3["Standard"] = 0] = "Standard";
6796
- LanguageVariant3[LanguageVariant3["JSX"] = 1] = "JSX";
6797
- return LanguageVariant3;
6794
+ var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
6795
+ LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard";
6796
+ LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX";
6797
+ return LanguageVariant4;
6798
6798
  })(LanguageVariant || {});
6799
6799
  var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
6800
6800
  WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
@@ -22833,7 +22833,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
22833
22833
  );
22834
22834
  }
22835
22835
  function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
22836
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
22836
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && host.isSourceFileDefaultLibrary(sourceFile) || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
22837
22837
  }
22838
22838
  function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
22839
22839
  if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
@@ -28365,8 +28365,17 @@ function createNodeFactory(flags, baseFactory2) {
28365
28365
  node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
28366
28366
  return node;
28367
28367
  }
28368
- function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {
28369
- return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node;
28368
+ function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, _hasNoDefaultLib = false, libReferenceDirectives = node.libReferenceDirectives) {
28369
+ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(
28370
+ node,
28371
+ statements,
28372
+ isDeclarationFile,
28373
+ referencedFiles,
28374
+ typeReferenceDirectives,
28375
+ /*hasNoDefaultLib*/
28376
+ false,
28377
+ libReferenceDirectives
28378
+ ), node) : node;
28370
28379
  }
28371
28380
  function createBundle(sourceFiles) {
28372
28381
  const node = createBaseNode(309 /* Bundle */);
@@ -28374,7 +28383,6 @@ function createNodeFactory(flags, baseFactory2) {
28374
28383
  node.syntheticFileReferences = void 0;
28375
28384
  node.syntheticTypeReferences = void 0;
28376
28385
  node.syntheticLibReferences = void 0;
28377
- node.hasNoDefaultLib = void 0;
28378
28386
  return node;
28379
28387
  }
28380
28388
  function updateBundle(node, sourceFiles) {
@@ -40430,7 +40438,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
40430
40438
  context.typeReferenceDirectives = [];
40431
40439
  context.libReferenceDirectives = [];
40432
40440
  context.amdDependencies = [];
40433
- context.hasNoDefaultLib = false;
40434
40441
  context.pragmas.forEach((entryOrList, key) => {
40435
40442
  switch (key) {
40436
40443
  case "reference": {
@@ -40441,7 +40448,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
40441
40448
  const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
40442
40449
  const preserve = _preserve === "true" ? true : void 0;
40443
40450
  if (arg.arguments["no-default-lib"] === "true") {
40444
- context.hasNoDefaultLib = true;
40445
40451
  } else if (types) {
40446
40452
  const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
40447
40453
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
@@ -46149,7 +46155,9 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
46149
46155
  const subTarget = target[condition];
46150
46156
  const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
46151
46157
  if (result) {
46152
- traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
46158
+ if (result.value) {
46159
+ traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
46160
+ }
46153
46161
  traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
46154
46162
  return result;
46155
46163
  } else {
@@ -46182,10 +46190,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
46182
46190
  if (state.traceEnabled) {
46183
46191
  trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
46184
46192
  }
46185
- return toSearchResult(
46186
- /*value*/
46187
- void 0
46188
- );
46193
+ return { value: void 0 };
46189
46194
  }
46190
46195
  if (state.traceEnabled) {
46191
46196
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
@@ -68689,14 +68694,14 @@ function createTypeChecker(host) {
68689
68694
  let issuedElaboration = false;
68690
68695
  if (!targetProp) {
68691
68696
  const indexInfo = getApplicableIndexInfo(target, nameType);
68692
- if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) {
68697
+ if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
68693
68698
  issuedElaboration = true;
68694
68699
  addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
68695
68700
  }
68696
68701
  }
68697
68702
  if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
68698
68703
  const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
68699
- if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) {
68704
+ if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
68700
68705
  addRelatedInfo(
68701
68706
  reportedDiag,
68702
68707
  createDiagnosticForNode(
@@ -118702,11 +118707,9 @@ function transformDeclarations(context) {
118702
118707
  rawReferencedFiles = [];
118703
118708
  rawTypeReferenceDirectives = [];
118704
118709
  rawLibReferenceDirectives = [];
118705
- let hasNoDefaultLib = false;
118706
118710
  const bundle = factory2.createBundle(
118707
118711
  map(node.sourceFiles, (sourceFile) => {
118708
118712
  if (sourceFile.isDeclarationFile) return void 0;
118709
- hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
118710
118713
  currentSourceFile = sourceFile;
118711
118714
  enclosingDeclaration = sourceFile;
118712
118715
  lateMarkedStatements = void 0;
@@ -118767,7 +118770,6 @@ function transformDeclarations(context) {
118767
118770
  bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
118768
118771
  bundle.syntheticTypeReferences = getTypeReferences();
118769
118772
  bundle.syntheticLibReferences = getLibReferences();
118770
- bundle.hasNoDefaultLib = hasNoDefaultLib;
118771
118773
  return bundle;
118772
118774
  }
118773
118775
  needsDeclare = true;
@@ -118808,7 +118810,8 @@ function transformDeclarations(context) {
118808
118810
  true,
118809
118811
  getReferencedFiles(outputFilePath),
118810
118812
  getTypeReferences(),
118811
- node.hasNoDefaultLib,
118813
+ /*hasNoDefaultLib*/
118814
+ false,
118812
118815
  getLibReferences()
118813
118816
  );
118814
118817
  function collectFileReferences(sourceFile) {
@@ -123978,16 +123981,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
123978
123981
  emitSourceFileWorker(node);
123979
123982
  }
123980
123983
  function emitSyntheticTripleSlashReferencesIfNeeded(node) {
123981
- emitTripleSlashDirectives(!!node.hasNoDefaultLib, node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
123984
+ emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
123982
123985
  }
123983
123986
  function emitTripleSlashDirectivesIfNeeded(node) {
123984
- if (node.isDeclarationFile) emitTripleSlashDirectives(node.hasNoDefaultLib, node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
123987
+ if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
123985
123988
  }
123986
- function emitTripleSlashDirectives(hasNoDefaultLib, files, types, libs2) {
123987
- if (hasNoDefaultLib) {
123988
- writeComment(`/// <reference no-default-lib="true"/>`);
123989
- writeLine();
123990
- }
123989
+ function emitTripleSlashDirectives(files, types, libs2) {
123991
123990
  if (currentSourceFile && currentSourceFile.moduleName) {
123992
123991
  writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
123993
123992
  writeLine();
@@ -126980,7 +126979,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
126980
126979
  mark("beforeProgram");
126981
126980
  const host = createProgramOptionsHost || createCompilerHost(options);
126982
126981
  const configParsingHost = parseConfigHostFromCompilerHostLike(host);
126983
- let skipDefaultLib = options.noLib;
126984
126982
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
126985
126983
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
126986
126984
  let skipVerifyCompilerOptions = false;
@@ -127068,6 +127066,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127068
127066
  let redirectTargetsMap = createMultiMap();
127069
127067
  let usesUriStyleNodeCoreModules;
127070
127068
  const filesByName = /* @__PURE__ */ new Map();
127069
+ const libFiles = /* @__PURE__ */ new Set();
127071
127070
  let missingFileNames = /* @__PURE__ */ new Map();
127072
127071
  const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
127073
127072
  let resolvedProjectReferences;
@@ -127129,8 +127128,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127129
127128
  name,
127130
127129
  /*isDefaultLib*/
127131
127130
  false,
127132
- /*ignoreNoDefaultLib*/
127133
- false,
127134
127131
  { kind: 0 /* RootFile */, index }
127135
127132
  ));
127136
127133
  (_j = tracing) == null ? void 0 : _j.pop();
@@ -127162,15 +127159,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127162
127159
  }
127163
127160
  (_n = tracing) == null ? void 0 : _n.pop();
127164
127161
  }
127165
- if (rootNames.length && !skipDefaultLib) {
127162
+ if (rootNames.length && !options.noLib) {
127166
127163
  const defaultLibraryFileName = getDefaultLibraryFileName();
127167
127164
  if (!options.lib && defaultLibraryFileName) {
127165
+ libFiles.add(toPath3(defaultLibraryFileName));
127168
127166
  processRootFile(
127169
127167
  defaultLibraryFileName,
127170
127168
  /*isDefaultLib*/
127171
127169
  true,
127172
- /*ignoreNoDefaultLib*/
127173
- false,
127174
127170
  { kind: 6 /* LibFile */ }
127175
127171
  );
127176
127172
  } else {
@@ -127179,8 +127175,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127179
127175
  pathForLibFile(libFileName),
127180
127176
  /*isDefaultLib*/
127181
127177
  true,
127182
- /*ignoreNoDefaultLib*/
127183
- false,
127184
127178
  { kind: 6 /* LibFile */, index }
127185
127179
  );
127186
127180
  });
@@ -127691,8 +127685,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127691
127685
  structureIsReused = 1 /* SafeModules */;
127692
127686
  } else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
127693
127687
  structureIsReused = 1 /* SafeModules */;
127694
- } else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
127695
- structureIsReused = 1 /* SafeModules */;
127696
127688
  } else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
127697
127689
  structureIsReused = 1 /* SafeModules */;
127698
127690
  } else {
@@ -127874,24 +127866,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127874
127866
  return !!sourceFilesFoundSearchingNodeModules.get(file.path);
127875
127867
  }
127876
127868
  function isSourceFileDefaultLibrary(file) {
127877
- if (!file.isDeclarationFile) {
127878
- return false;
127879
- }
127880
- if (file.hasNoDefaultLib) {
127881
- return true;
127882
- }
127883
- if (options.noLib) {
127884
- return false;
127885
- }
127886
- const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
127887
- if (!options.lib) {
127888
- return equalityComparer(file.fileName, getDefaultLibraryFileName());
127889
- } else {
127890
- return some(options.lib, (libFileName) => {
127891
- const resolvedLib = resolvedLibReferences.get(libFileName);
127892
- return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
127893
- });
127894
- }
127869
+ return libFiles.has(file.path);
127895
127870
  }
127896
127871
  function getTypeChecker() {
127897
127872
  return typeChecker || (typeChecker = createTypeChecker(program));
@@ -128372,11 +128347,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128372
128347
  function getConfigFileParsingDiagnostics2() {
128373
128348
  return configFileParsingDiagnostics || emptyArray;
128374
128349
  }
128375
- function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) {
128350
+ function processRootFile(fileName, isDefaultLib, reason) {
128376
128351
  processSourceFile(
128377
128352
  normalizePath(fileName),
128378
128353
  isDefaultLib,
128379
- ignoreNoDefaultLib,
128380
128354
  /*packageId*/
128381
128355
  void 0,
128382
128356
  reason
@@ -128541,10 +128515,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128541
128515
  return sourceFileWithAddedExtension;
128542
128516
  }
128543
128517
  }
128544
- function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {
128518
+ function processSourceFile(fileName, isDefaultLib, packageId, reason) {
128545
128519
  getSourceFileFromReferenceWorker(
128546
128520
  fileName,
128547
- (fileName2) => findSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason, packageId),
128521
+ (fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
128548
128522
  // TODO: GH#18217
128549
128523
  (diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
128550
128524
  /*file*/
@@ -128561,8 +128535,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128561
128535
  fileName,
128562
128536
  /*isDefaultLib*/
128563
128537
  false,
128564
- /*ignoreNoDefaultLib*/
128565
- false,
128566
128538
  /*packageId*/
128567
128539
  void 0,
128568
128540
  reason
@@ -128588,14 +128560,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128588
128560
  sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
128589
128561
  return redirect;
128590
128562
  }
128591
- function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
128563
+ function findSourceFile(fileName, isDefaultLib, reason, packageId) {
128592
128564
  var _a2, _b2;
128593
128565
  (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
128594
128566
  fileName,
128595
128567
  isDefaultLib: isDefaultLib || void 0,
128596
128568
  fileIncludeKind: FileIncludeKind[reason.kind]
128597
128569
  });
128598
- const result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
128570
+ const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
128599
128571
  (_b2 = tracing) == null ? void 0 : _b2.pop();
128600
128572
  return result;
128601
128573
  }
@@ -128605,7 +128577,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128605
128577
  const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
128606
128578
  return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
128607
128579
  }
128608
- function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
128580
+ function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
128609
128581
  var _a2, _b2;
128610
128582
  const path = toPath3(fileName);
128611
128583
  if (useSourceOfProjectReferenceRedirect) {
@@ -128615,7 +128587,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128615
128587
  if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
128616
128588
  }
128617
128589
  if (source == null ? void 0 : source.source) {
128618
- const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
128590
+ const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
128619
128591
  if (file2) addFileToFilesByName(
128620
128592
  file2,
128621
128593
  path,
@@ -128735,7 +128707,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128735
128707
  filesByNameIgnoreCase.set(pathLowerCase, file);
128736
128708
  }
128737
128709
  }
128738
- skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
128739
128710
  if (!options.noResolve) {
128740
128711
  processReferencedFiles(file, isDefaultLib);
128741
128712
  processTypeReferenceDirectives(file);
@@ -128796,8 +128767,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128796
128767
  processSourceFile(
128797
128768
  resolveTripleslashReference(ref.fileName, file.fileName),
128798
128769
  isDefaultLib,
128799
- /*ignoreNoDefaultLib*/
128800
- false,
128801
128770
  /*packageId*/
128802
128771
  void 0,
128803
128772
  { kind: 4 /* ReferenceFile */, file: file.path, index }
@@ -128838,8 +128807,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128838
128807
  resolvedTypeReferenceDirective.resolvedFileName,
128839
128808
  /*isDefaultLib*/
128840
128809
  false,
128841
- /*ignoreNoDefaultLib*/
128842
- false,
128843
128810
  resolvedTypeReferenceDirective.packageId,
128844
128811
  reason
128845
128812
  );
@@ -128859,6 +128826,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128859
128826
  if (existing) return existing.actual;
128860
128827
  const result = pathForLibFileWorker(libFileName);
128861
128828
  (resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
128829
+ libFiles.add(toPath3(result.actual));
128862
128830
  return result.actual;
128863
128831
  }
128864
128832
  function pathForLibFileWorker(libFileName) {
@@ -128917,8 +128885,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128917
128885
  pathForLibFile(libFileName),
128918
128886
  /*isDefaultLib*/
128919
128887
  true,
128920
- /*ignoreNoDefaultLib*/
128921
- true,
128922
128888
  { kind: 7 /* LibReferenceDirective */, file: file.path, index }
128923
128889
  );
128924
128890
  } else {
@@ -128966,8 +128932,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128966
128932
  resolvedFileName,
128967
128933
  /*isDefaultLib*/
128968
128934
  false,
128969
- /*ignoreNoDefaultLib*/
128970
- false,
128971
128935
  { kind: 3 /* Import */, file: file.path, index },
128972
128936
  resolution.packageId
128973
128937
  );
@@ -130749,7 +130713,7 @@ function createBuilderProgramState(newProgram, oldState) {
130749
130713
  }
130750
130714
  if (canCopySemanticDiagnostics) {
130751
130715
  if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
130752
- if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) return;
130716
+ if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
130753
130717
  const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
130754
130718
  if (diagnostics) {
130755
130719
  state.semanticDiagnosticsPerFile.set(
@@ -140440,7 +140404,7 @@ function isInsideJsxElementOrAttribute(sourceFile, position) {
140440
140404
  if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) {
140441
140405
  return true;
140442
140406
  }
140443
- if (token.kind === 31 /* LessThanSlashToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
140407
+ if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
140444
140408
  return true;
140445
140409
  }
140446
140410
  return false;
@@ -140468,7 +140432,7 @@ function isInJSXText(sourceFile, position) {
140468
140432
  function isInsideJsxElement(sourceFile, position) {
140469
140433
  function isInsideJsxElementTraversal(node) {
140470
140434
  while (node) {
140471
- if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */ || node.kind === 31 /* LessThanSlashToken */) {
140435
+ if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) {
140472
140436
  node = node.parent;
140473
140437
  } else if (node.kind === 285 /* JsxElement */) {
140474
140438
  if (position > node.getStart(sourceFile)) return true;
@@ -144640,7 +144604,6 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
144640
144604
  typeReferenceDirectives: [],
144641
144605
  libReferenceDirectives: [],
144642
144606
  amdDependencies: [],
144643
- hasNoDefaultLib: void 0,
144644
144607
  moduleName: void 0
144645
144608
  };
144646
144609
  const importedFiles = [];
@@ -144949,7 +144912,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
144949
144912
  importedFiles.push(decl.ref);
144950
144913
  }
144951
144914
  }
144952
- return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: void 0 };
144915
+ return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: void 0 };
144953
144916
  } else {
144954
144917
  let ambientModuleNames;
144955
144918
  if (ambientExternalModules) {
@@ -144964,7 +144927,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
144964
144927
  }
144965
144928
  }
144966
144929
  }
144967
- return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: ambientModuleNames };
144930
+ return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: ambientModuleNames };
144968
144931
  }
144969
144932
  }
144970
144933
 
@@ -145338,8 +145301,7 @@ function transpileDeclaration(input, transpileOptions) {
145338
145301
  true
145339
145302
  );
145340
145303
  }
145341
- var barebonesLibContent = `/// <reference no-default-lib="true"/>
145342
- interface Boolean {}
145304
+ var barebonesLibContent = `interface Boolean {}
145343
145305
  interface Function {}
145344
145306
  interface CallableFunction {}
145345
145307
  interface NewableFunction {}
@@ -145386,6 +145348,7 @@ function transpileWorker(input, transpileOptions, declaration) {
145386
145348
  options.declaration = false;
145387
145349
  options.declarationMap = false;
145388
145350
  }
145351
+ options.noLib = !declaration;
145389
145352
  const newLine = getNewLineCharacter(options);
145390
145353
  const compilerHost = {
145391
145354
  getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : fileName === normalizePath(barebonesLibName) ? barebonesLibSourceFile : void 0,
@@ -145433,8 +145396,7 @@ function transpileWorker(input, transpileOptions, declaration) {
145433
145396
  }
145434
145397
  let outputText;
145435
145398
  let sourceMapText;
145436
- const inputs = declaration ? [inputFileName, barebonesLibName] : [inputFileName];
145437
- const program = createProgram(inputs, options, compilerHost);
145399
+ const program = createProgram([inputFileName], options, compilerHost);
145438
145400
  if (transpileOptions.reportDiagnostics) {
145439
145401
  addRange(
145440
145402
  /*to*/
@@ -145503,7 +145465,7 @@ __export(ts_NavigateTo_exports, {
145503
145465
  });
145504
145466
 
145505
145467
  // src/services/navigateTo.ts
145506
- function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {
145468
+ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program) {
145507
145469
  const patternMatcher = createPatternMatcher(searchValue);
145508
145470
  if (!patternMatcher) return emptyArray;
145509
145471
  const rawItems = [];
@@ -145513,26 +145475,26 @@ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue
145513
145475
  if (excludeDtsFiles && sourceFile.isDeclarationFile) {
145514
145476
  continue;
145515
145477
  }
145516
- if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {
145478
+ if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile, program)) {
145517
145479
  continue;
145518
145480
  }
145519
145481
  sourceFile.getNamedDeclarations().forEach((declarations, name) => {
145520
- getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);
145482
+ getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems, program);
145521
145483
  });
145522
145484
  }
145523
145485
  rawItems.sort(compareNavigateToItems);
145524
145486
  return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
145525
145487
  }
145526
- function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {
145527
- return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib);
145488
+ function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile, program) {
145489
+ return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || program.isSourceFileDefaultLibrary(file));
145528
145490
  }
145529
- function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {
145491
+ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems, program) {
145530
145492
  const match = patternMatcher.getMatchForLastSegmentOfPattern(name);
145531
145493
  if (!match) {
145532
145494
  return;
145533
145495
  }
145534
145496
  for (const declaration of declarations) {
145535
- if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue;
145497
+ if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program)) continue;
145536
145498
  if (patternMatcher.patternContainsDots) {
145537
145499
  const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
145538
145500
  if (fullMatch) {
@@ -145543,7 +145505,7 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke
145543
145505
  }
145544
145506
  }
145545
145507
  }
145546
- function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {
145508
+ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program) {
145547
145509
  var _a;
145548
145510
  switch (declaration.kind) {
145549
145511
  case 274 /* ImportClause */:
@@ -145551,7 +145513,7 @@ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile
145551
145513
  case 272 /* ImportEqualsDeclaration */:
145552
145514
  const importer = checker.getSymbolAtLocation(declaration.name);
145553
145515
  const imported = checker.getAliasedSymbol(importer);
145554
- return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));
145516
+ return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile, program)));
145555
145517
  default:
145556
145518
  return true;
145557
145519
  }
@@ -151910,9 +151872,7 @@ function createChildren(node, sourceFile) {
151910
151872
  });
151911
151873
  return children;
151912
151874
  }
151913
- const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0 /* Standard */;
151914
151875
  scanner.setText((sourceFile || node.getSourceFile()).text);
151915
- scanner.setLanguageVariant(languageVariant);
151916
151876
  let pos = node.pos;
151917
151877
  const processNode = (child) => {
151918
151878
  addSyntheticNodes(children, pos, child.pos, node);
@@ -151929,7 +151889,6 @@ function createChildren(node, sourceFile) {
151929
151889
  node.forEachChild(processNode, processNodes);
151930
151890
  addSyntheticNodes(children, pos, node.end, node);
151931
151891
  scanner.setText(void 0);
151932
- scanner.setLanguageVariant(0 /* Standard */);
151933
151892
  return children;
151934
151893
  }
151935
151894
  function addSyntheticNodes(nodes, pos, end, parent2) {
@@ -153359,7 +153318,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
153359
153318
  function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {
153360
153319
  synchronizeHostData();
153361
153320
  const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
153362
- return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);
153321
+ return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program);
153363
153322
  }
153364
153323
  function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {
153365
153324
  synchronizeHostData();
@@ -167643,7 +167602,7 @@ function getJsxClosingTagCompletion(location, sourceFile) {
167643
167602
  switch (node.kind) {
167644
167603
  case 288 /* JsxClosingElement */:
167645
167604
  return true;
167646
- case 31 /* LessThanSlashToken */:
167605
+ case 44 /* SlashToken */:
167647
167606
  case 32 /* GreaterThanToken */:
167648
167607
  case 80 /* Identifier */:
167649
167608
  case 212 /* PropertyAccessExpression */:
@@ -168979,7 +168938,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
168979
168938
  location = currentToken;
168980
168939
  }
168981
168940
  break;
168982
- case 31 /* LessThanSlashToken */:
168941
+ case 44 /* SlashToken */:
168983
168942
  if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) {
168984
168943
  location = currentToken;
168985
168944
  }
@@ -168988,7 +168947,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
168988
168947
  }
168989
168948
  switch (parent2.kind) {
168990
168949
  case 288 /* JsxClosingElement */:
168991
- if (contextToken.kind === 31 /* LessThanSlashToken */) {
168950
+ if (contextToken.kind === 44 /* SlashToken */) {
168992
168951
  isStartingCloseTag = true;
168993
168952
  location = contextToken;
168994
168953
  }
@@ -170609,7 +170568,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {
170609
170568
  case "<":
170610
170569
  return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
170611
170570
  case "/":
170612
- return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 31 /* LessThanSlashToken */ && isJsxClosingElement(contextToken.parent));
170571
+ return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent));
170613
170572
  case " ":
170614
170573
  return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */;
170615
170574
  default:
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.20250924",
5
+ "version": "6.0.0-dev.20250926",
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": "904e7dd97dc8da1352c8e05d70829dff17c73214"
118
+ "gitHead": "5f183ad73dc1500209619cf52e174c45d73f8617"
119
119
  }