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/_tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "6.0";
21
- var version = `${versionMajorMinor}.0-dev.20250924`;
21
+ var version = `${versionMajorMinor}.0-dev.20250926`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -18854,7 +18854,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
18854
18854
  );
18855
18855
  }
18856
18856
  function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
18857
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
18857
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && host.isSourceFileDefaultLibrary(sourceFile) || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
18858
18858
  }
18859
18859
  function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
18860
18860
  if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
@@ -24259,8 +24259,17 @@ function createNodeFactory(flags, baseFactory2) {
24259
24259
  node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
24260
24260
  return node;
24261
24261
  }
24262
- function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {
24263
- 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;
24262
+ function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, _hasNoDefaultLib = false, libReferenceDirectives = node.libReferenceDirectives) {
24263
+ return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(
24264
+ node,
24265
+ statements,
24266
+ isDeclarationFile,
24267
+ referencedFiles,
24268
+ typeReferenceDirectives,
24269
+ /*hasNoDefaultLib*/
24270
+ false,
24271
+ libReferenceDirectives
24272
+ ), node) : node;
24264
24273
  }
24265
24274
  function createBundle(sourceFiles) {
24266
24275
  const node = createBaseNode(309 /* Bundle */);
@@ -24268,7 +24277,6 @@ function createNodeFactory(flags, baseFactory2) {
24268
24277
  node.syntheticFileReferences = void 0;
24269
24278
  node.syntheticTypeReferences = void 0;
24270
24279
  node.syntheticLibReferences = void 0;
24271
- node.hasNoDefaultLib = void 0;
24272
24280
  return node;
24273
24281
  }
24274
24282
  function updateBundle(node, sourceFiles) {
@@ -36171,7 +36179,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
36171
36179
  context.typeReferenceDirectives = [];
36172
36180
  context.libReferenceDirectives = [];
36173
36181
  context.amdDependencies = [];
36174
- context.hasNoDefaultLib = false;
36175
36182
  context.pragmas.forEach((entryOrList, key) => {
36176
36183
  switch (key) {
36177
36184
  case "reference": {
@@ -36182,7 +36189,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
36182
36189
  const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
36183
36190
  const preserve = _preserve === "true" ? true : void 0;
36184
36191
  if (arg.arguments["no-default-lib"] === "true") {
36185
- context.hasNoDefaultLib = true;
36186
36192
  } else if (types) {
36187
36193
  const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
36188
36194
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
@@ -41658,7 +41664,9 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
41658
41664
  const subTarget = target[condition];
41659
41665
  const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
41660
41666
  if (result) {
41661
- traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
41667
+ if (result.value) {
41668
+ traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
41669
+ }
41662
41670
  traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
41663
41671
  return result;
41664
41672
  } else {
@@ -41691,10 +41699,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
41691
41699
  if (state.traceEnabled) {
41692
41700
  trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
41693
41701
  }
41694
- return toSearchResult(
41695
- /*value*/
41696
- void 0
41697
- );
41702
+ return { value: void 0 };
41698
41703
  }
41699
41704
  if (state.traceEnabled) {
41700
41705
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
@@ -64080,14 +64085,14 @@ function createTypeChecker(host) {
64080
64085
  let issuedElaboration = false;
64081
64086
  if (!targetProp) {
64082
64087
  const indexInfo = getApplicableIndexInfo(target, nameType);
64083
- if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) {
64088
+ if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
64084
64089
  issuedElaboration = true;
64085
64090
  addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
64086
64091
  }
64087
64092
  }
64088
64093
  if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
64089
64094
  const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
64090
- if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) {
64095
+ if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
64091
64096
  addRelatedInfo(
64092
64097
  reportedDiag,
64093
64098
  createDiagnosticForNode(
@@ -113911,11 +113916,9 @@ function transformDeclarations(context) {
113911
113916
  rawReferencedFiles = [];
113912
113917
  rawTypeReferenceDirectives = [];
113913
113918
  rawLibReferenceDirectives = [];
113914
- let hasNoDefaultLib = false;
113915
113919
  const bundle = factory2.createBundle(
113916
113920
  map(node.sourceFiles, (sourceFile) => {
113917
113921
  if (sourceFile.isDeclarationFile) return void 0;
113918
- hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
113919
113922
  currentSourceFile = sourceFile;
113920
113923
  enclosingDeclaration = sourceFile;
113921
113924
  lateMarkedStatements = void 0;
@@ -113976,7 +113979,6 @@ function transformDeclarations(context) {
113976
113979
  bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
113977
113980
  bundle.syntheticTypeReferences = getTypeReferences();
113978
113981
  bundle.syntheticLibReferences = getLibReferences();
113979
- bundle.hasNoDefaultLib = hasNoDefaultLib;
113980
113982
  return bundle;
113981
113983
  }
113982
113984
  needsDeclare = true;
@@ -114017,7 +114019,8 @@ function transformDeclarations(context) {
114017
114019
  true,
114018
114020
  getReferencedFiles(outputFilePath),
114019
114021
  getTypeReferences(),
114020
- node.hasNoDefaultLib,
114022
+ /*hasNoDefaultLib*/
114023
+ false,
114021
114024
  getLibReferences()
114022
114025
  );
114023
114026
  function collectFileReferences(sourceFile) {
@@ -119176,16 +119179,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119176
119179
  emitSourceFileWorker(node);
119177
119180
  }
119178
119181
  function emitSyntheticTripleSlashReferencesIfNeeded(node) {
119179
- emitTripleSlashDirectives(!!node.hasNoDefaultLib, node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
119182
+ emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
119180
119183
  }
119181
119184
  function emitTripleSlashDirectivesIfNeeded(node) {
119182
- if (node.isDeclarationFile) emitTripleSlashDirectives(node.hasNoDefaultLib, node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
119185
+ if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
119183
119186
  }
119184
- function emitTripleSlashDirectives(hasNoDefaultLib, files, types, libs2) {
119185
- if (hasNoDefaultLib) {
119186
- writeComment(`/// <reference no-default-lib="true"/>`);
119187
- writeLine();
119188
- }
119187
+ function emitTripleSlashDirectives(files, types, libs2) {
119189
119188
  if (currentSourceFile && currentSourceFile.moduleName) {
119190
119189
  writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
119191
119190
  writeLine();
@@ -122132,7 +122131,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122132
122131
  mark("beforeProgram");
122133
122132
  const host = createProgramOptionsHost || createCompilerHost(options);
122134
122133
  const configParsingHost = parseConfigHostFromCompilerHostLike(host);
122135
- let skipDefaultLib = options.noLib;
122136
122134
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
122137
122135
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
122138
122136
  let skipVerifyCompilerOptions = false;
@@ -122220,6 +122218,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122220
122218
  let redirectTargetsMap = createMultiMap();
122221
122219
  let usesUriStyleNodeCoreModules;
122222
122220
  const filesByName = /* @__PURE__ */ new Map();
122221
+ const libFiles = /* @__PURE__ */ new Set();
122223
122222
  let missingFileNames = /* @__PURE__ */ new Map();
122224
122223
  const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
122225
122224
  let resolvedProjectReferences;
@@ -122281,8 +122280,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122281
122280
  name,
122282
122281
  /*isDefaultLib*/
122283
122282
  false,
122284
- /*ignoreNoDefaultLib*/
122285
- false,
122286
122283
  { kind: 0 /* RootFile */, index }
122287
122284
  ));
122288
122285
  (_j = tracing) == null ? void 0 : _j.pop();
@@ -122314,15 +122311,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122314
122311
  }
122315
122312
  (_n = tracing) == null ? void 0 : _n.pop();
122316
122313
  }
122317
- if (rootNames.length && !skipDefaultLib) {
122314
+ if (rootNames.length && !options.noLib) {
122318
122315
  const defaultLibraryFileName = getDefaultLibraryFileName();
122319
122316
  if (!options.lib && defaultLibraryFileName) {
122317
+ libFiles.add(toPath3(defaultLibraryFileName));
122320
122318
  processRootFile(
122321
122319
  defaultLibraryFileName,
122322
122320
  /*isDefaultLib*/
122323
122321
  true,
122324
- /*ignoreNoDefaultLib*/
122325
- false,
122326
122322
  { kind: 6 /* LibFile */ }
122327
122323
  );
122328
122324
  } else {
@@ -122331,8 +122327,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122331
122327
  pathForLibFile(libFileName),
122332
122328
  /*isDefaultLib*/
122333
122329
  true,
122334
- /*ignoreNoDefaultLib*/
122335
- false,
122336
122330
  { kind: 6 /* LibFile */, index }
122337
122331
  );
122338
122332
  });
@@ -122843,8 +122837,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122843
122837
  structureIsReused = 1 /* SafeModules */;
122844
122838
  } else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
122845
122839
  structureIsReused = 1 /* SafeModules */;
122846
- } else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
122847
- structureIsReused = 1 /* SafeModules */;
122848
122840
  } else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
122849
122841
  structureIsReused = 1 /* SafeModules */;
122850
122842
  } else {
@@ -123026,24 +123018,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123026
123018
  return !!sourceFilesFoundSearchingNodeModules.get(file.path);
123027
123019
  }
123028
123020
  function isSourceFileDefaultLibrary(file) {
123029
- if (!file.isDeclarationFile) {
123030
- return false;
123031
- }
123032
- if (file.hasNoDefaultLib) {
123033
- return true;
123034
- }
123035
- if (options.noLib) {
123036
- return false;
123037
- }
123038
- const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
123039
- if (!options.lib) {
123040
- return equalityComparer(file.fileName, getDefaultLibraryFileName());
123041
- } else {
123042
- return some(options.lib, (libFileName) => {
123043
- const resolvedLib = resolvedLibReferences.get(libFileName);
123044
- return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
123045
- });
123046
- }
123021
+ return libFiles.has(file.path);
123047
123022
  }
123048
123023
  function getTypeChecker() {
123049
123024
  return typeChecker || (typeChecker = createTypeChecker(program));
@@ -123524,11 +123499,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123524
123499
  function getConfigFileParsingDiagnostics2() {
123525
123500
  return configFileParsingDiagnostics || emptyArray;
123526
123501
  }
123527
- function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) {
123502
+ function processRootFile(fileName, isDefaultLib, reason) {
123528
123503
  processSourceFile(
123529
123504
  normalizePath(fileName),
123530
123505
  isDefaultLib,
123531
- ignoreNoDefaultLib,
123532
123506
  /*packageId*/
123533
123507
  void 0,
123534
123508
  reason
@@ -123693,10 +123667,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123693
123667
  return sourceFileWithAddedExtension;
123694
123668
  }
123695
123669
  }
123696
- function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {
123670
+ function processSourceFile(fileName, isDefaultLib, packageId, reason) {
123697
123671
  getSourceFileFromReferenceWorker(
123698
123672
  fileName,
123699
- (fileName2) => findSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason, packageId),
123673
+ (fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
123700
123674
  // TODO: GH#18217
123701
123675
  (diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
123702
123676
  /*file*/
@@ -123713,8 +123687,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123713
123687
  fileName,
123714
123688
  /*isDefaultLib*/
123715
123689
  false,
123716
- /*ignoreNoDefaultLib*/
123717
- false,
123718
123690
  /*packageId*/
123719
123691
  void 0,
123720
123692
  reason
@@ -123740,14 +123712,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123740
123712
  sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
123741
123713
  return redirect;
123742
123714
  }
123743
- function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
123715
+ function findSourceFile(fileName, isDefaultLib, reason, packageId) {
123744
123716
  var _a2, _b2;
123745
123717
  (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
123746
123718
  fileName,
123747
123719
  isDefaultLib: isDefaultLib || void 0,
123748
123720
  fileIncludeKind: FileIncludeKind[reason.kind]
123749
123721
  });
123750
- const result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
123722
+ const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
123751
123723
  (_b2 = tracing) == null ? void 0 : _b2.pop();
123752
123724
  return result;
123753
123725
  }
@@ -123757,7 +123729,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123757
123729
  const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
123758
123730
  return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
123759
123731
  }
123760
- function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
123732
+ function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
123761
123733
  var _a2, _b2;
123762
123734
  const path = toPath3(fileName);
123763
123735
  if (useSourceOfProjectReferenceRedirect) {
@@ -123767,7 +123739,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123767
123739
  if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
123768
123740
  }
123769
123741
  if (source == null ? void 0 : source.source) {
123770
- const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
123742
+ const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
123771
123743
  if (file2) addFileToFilesByName(
123772
123744
  file2,
123773
123745
  path,
@@ -123887,7 +123859,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123887
123859
  filesByNameIgnoreCase.set(pathLowerCase, file);
123888
123860
  }
123889
123861
  }
123890
- skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
123891
123862
  if (!options.noResolve) {
123892
123863
  processReferencedFiles(file, isDefaultLib);
123893
123864
  processTypeReferenceDirectives(file);
@@ -123948,8 +123919,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123948
123919
  processSourceFile(
123949
123920
  resolveTripleslashReference(ref.fileName, file.fileName),
123950
123921
  isDefaultLib,
123951
- /*ignoreNoDefaultLib*/
123952
- false,
123953
123922
  /*packageId*/
123954
123923
  void 0,
123955
123924
  { kind: 4 /* ReferenceFile */, file: file.path, index }
@@ -123990,8 +123959,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123990
123959
  resolvedTypeReferenceDirective.resolvedFileName,
123991
123960
  /*isDefaultLib*/
123992
123961
  false,
123993
- /*ignoreNoDefaultLib*/
123994
- false,
123995
123962
  resolvedTypeReferenceDirective.packageId,
123996
123963
  reason
123997
123964
  );
@@ -124011,6 +123978,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124011
123978
  if (existing) return existing.actual;
124012
123979
  const result = pathForLibFileWorker(libFileName);
124013
123980
  (resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
123981
+ libFiles.add(toPath3(result.actual));
124014
123982
  return result.actual;
124015
123983
  }
124016
123984
  function pathForLibFileWorker(libFileName) {
@@ -124069,8 +124037,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124069
124037
  pathForLibFile(libFileName),
124070
124038
  /*isDefaultLib*/
124071
124039
  true,
124072
- /*ignoreNoDefaultLib*/
124073
- true,
124074
124040
  { kind: 7 /* LibReferenceDirective */, file: file.path, index }
124075
124041
  );
124076
124042
  } else {
@@ -124118,8 +124084,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124118
124084
  resolvedFileName,
124119
124085
  /*isDefaultLib*/
124120
124086
  false,
124121
- /*ignoreNoDefaultLib*/
124122
- false,
124123
124087
  { kind: 3 /* Import */, file: file.path, index },
124124
124088
  resolution.packageId
124125
124089
  );
@@ -125872,7 +125836,7 @@ function createBuilderProgramState(newProgram, oldState) {
125872
125836
  }
125873
125837
  if (canCopySemanticDiagnostics) {
125874
125838
  if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
125875
- if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) return;
125839
+ if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
125876
125840
  const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
125877
125841
  if (diagnostics) {
125878
125842
  state.semanticDiagnosticsPerFile.set(
package/lib/lib.d.ts CHANGED
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es5" />
20
18
  /// <reference lib="dom" />
21
19
  /// <reference lib="webworker.importscripts" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /**
20
18
  * The decorator context types provided to class element decorators.
21
19
  */
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
20
18
  declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
21
19
  declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /////////////////////////////
20
18
  /// Window Async Iterable APIs
21
19
  /////////////////////////////
package/lib/lib.dom.d.ts CHANGED
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /////////////////////////////
20
18
  /// Window APIs
21
19
  /////////////////////////////
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /////////////////////////////
20
18
  /// Window Iterable APIs
21
19
  /////////////////////////////
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface Map<K, V> {
20
18
  clear(): void;
21
19
  /**
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface Array<T> {
20
18
  /**
21
19
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es5" />
20
18
  /// <reference lib="es2015.core" />
21
19
  /// <reference lib="es2015.collection" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2015.iterable" />
20
18
 
21
19
  interface Generator<T = unknown, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2015.symbol" />
20
18
 
21
19
  interface SymbolConstructor {
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface PromiseConstructor {
20
18
  /**
21
19
  * A reference to the prototype.
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface ProxyHandler<T extends object> {
20
18
  /**
21
19
  * A trap method for a function call.
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  declare namespace Reflect {
20
18
  /**
21
19
  * Calls the function with the specified object as the this value
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface SymbolConstructor {
20
18
  /**
21
19
  * A reference to the prototype.
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2015.symbol" />
20
18
 
21
19
  interface SymbolConstructor {
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface Array<T> {
20
18
  /**
21
19
  * Determines whether an array includes a certain element, returning true or false as appropriate.
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2015" />
20
18
  /// <reference lib="es2016.array.include" />
21
19
  /// <reference lib="es2016.intl" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2016" />
20
18
  /// <reference lib="dom" />
21
19
  /// <reference lib="webworker.importscripts" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  declare namespace Intl {
20
18
  /**
21
19
  * The `Intl.getCanonicalLocales()` method returns an array containing
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface ArrayBufferConstructor {
20
18
  new (): ArrayBuffer;
21
19
  }
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2016" />
20
18
  /// <reference lib="es2017.arraybuffer" />
21
19
  /// <reference lib="es2017.date" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface DateConstructor {
20
18
  /**
21
19
  * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2017" />
20
18
  /// <reference lib="dom" />
21
19
  /// <reference lib="webworker.importscripts" />
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  declare namespace Intl {
20
18
  interface DateTimeFormatPartTypesRegistry {
21
19
  day: any;
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface ObjectConstructor {
20
18
  /**
21
19
  * Returns an array of values of the enumerable own properties of an object
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  /// <reference lib="es2015.symbol" />
20
18
  /// <reference lib="es2015.symbol.wellknown" />
21
19
 
@@ -14,8 +14,6 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
17
  interface String {
20
18
  /**
21
19
  * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.