@typescript-deploys/pr-build 6.0.0-pr-62170-7 → 6.0.0-pr-62111-9

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 +73 -171
  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 +2 -25
  6. package/lib/lib.dom.d.ts +580 -1
  7. package/lib/lib.dom.iterable.d.ts +2 -555
  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 +2 -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 +103 -219
  104. package/package.json +1 -1
package/lib/_tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "6.0";
21
- var version = `${versionMajorMinor}.0-insiders.20250908`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250926`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6068,7 +6068,7 @@ var Diagnostics = {
6068
6068
  A_bigint_literal_cannot_use_exponential_notation: diag(1352, 1 /* Error */, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."),
6069
6069
  A_bigint_literal_must_be_an_integer: diag(1353, 1 /* Error */, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."),
6070
6070
  readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, 1 /* Error */, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."),
6071
- A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, 1 /* Error */, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),
6071
+ A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, 1 /* Error */, "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355", "A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals."),
6072
6072
  Did_you_mean_to_mark_this_function_as_async: diag(1356, 1 /* Error */, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"),
6073
6073
  An_enum_member_name_must_be_followed_by_a_or: diag(1357, 1 /* Error */, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."),
6074
6074
  Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, 1 /* Error */, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."),
@@ -6832,6 +6832,7 @@ var Diagnostics = {
6832
6832
  Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
6833
6833
  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'."),
6834
6834
  This_expression_is_never_nullish: diag(2881, 1 /* Error */, "This_expression_is_never_nullish_2881", "This expression is never nullish."),
6835
+ 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}'."),
6835
6836
  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}'."),
6836
6837
  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}'."),
6837
6838
  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}'."),
@@ -15491,9 +15492,6 @@ function getTypeParameterFromJsDoc(node) {
15491
15492
  const { typeParameters } = node.parent.parent.parent;
15492
15493
  return typeParameters && find(typeParameters, (p) => p.name.escapedText === name);
15493
15494
  }
15494
- function hasTypeArguments(node) {
15495
- return !!node.typeArguments;
15496
- }
15497
15495
  function getAssignmentTarget(node) {
15498
15496
  let parent = node.parent;
15499
15497
  while (true) {
@@ -18856,7 +18854,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
18856
18854
  );
18857
18855
  }
18858
18856
  function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
18859
- 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);
18860
18858
  }
18861
18859
  function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
18862
18860
  if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
@@ -20274,10 +20272,22 @@ function createParenthesizerRules(factory2) {
20274
20272
  }
20275
20273
  return parenthesizerRule;
20276
20274
  }
20275
+ function mixingBinaryOperatorsRequiresParentheses(a, b) {
20276
+ if (a === 61 /* QuestionQuestionToken */) {
20277
+ return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */;
20278
+ }
20279
+ if (b === 61 /* QuestionQuestionToken */) {
20280
+ return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */;
20281
+ }
20282
+ return false;
20283
+ }
20277
20284
  function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
20285
+ const emittedOperand = skipPartiallyEmittedExpressions(operand);
20286
+ if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) {
20287
+ return true;
20288
+ }
20278
20289
  const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator);
20279
20290
  const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator);
20280
- const emittedOperand = skipPartiallyEmittedExpressions(operand);
20281
20291
  if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) {
20282
20292
  return true;
20283
20293
  }
@@ -24249,8 +24259,17 @@ function createNodeFactory(flags, baseFactory2) {
24249
24259
  node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
24250
24260
  return node;
24251
24261
  }
24252
- function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {
24253
- 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;
24254
24273
  }
24255
24274
  function createBundle(sourceFiles) {
24256
24275
  const node = createBaseNode(309 /* Bundle */);
@@ -24258,7 +24277,6 @@ function createNodeFactory(flags, baseFactory2) {
24258
24277
  node.syntheticFileReferences = void 0;
24259
24278
  node.syntheticTypeReferences = void 0;
24260
24279
  node.syntheticLibReferences = void 0;
24261
- node.hasNoDefaultLib = void 0;
24262
24280
  return node;
24263
24281
  }
24264
24282
  function updateBundle(node, sourceFiles) {
@@ -36161,7 +36179,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
36161
36179
  context.typeReferenceDirectives = [];
36162
36180
  context.libReferenceDirectives = [];
36163
36181
  context.amdDependencies = [];
36164
- context.hasNoDefaultLib = false;
36165
36182
  context.pragmas.forEach((entryOrList, key) => {
36166
36183
  switch (key) {
36167
36184
  case "reference": {
@@ -36172,7 +36189,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
36172
36189
  const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
36173
36190
  const preserve = _preserve === "true" ? true : void 0;
36174
36191
  if (arg.arguments["no-default-lib"] === "true") {
36175
- context.hasNoDefaultLib = true;
36176
36192
  } else if (types) {
36177
36193
  const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
36178
36194
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
@@ -37045,7 +37061,7 @@ var commandOptionsWithoutBuild = [
37045
37061
  affectsProgramStructure: true,
37046
37062
  category: Diagnostics.Language_and_Environment,
37047
37063
  description: Diagnostics.Enable_lib_replacement,
37048
- defaultValueDescription: true
37064
+ defaultValueDescription: false
37049
37065
  },
37050
37066
  // Strict Type Checks
37051
37067
  {
@@ -37412,7 +37428,7 @@ var commandOptionsWithoutBuild = [
37412
37428
  affectsBuildInfo: true,
37413
37429
  category: Diagnostics.Modules,
37414
37430
  description: Diagnostics.Check_side_effect_imports,
37415
- defaultValueDescription: false
37431
+ defaultValueDescription: true
37416
37432
  },
37417
37433
  // Source Maps
37418
37434
  {
@@ -41648,7 +41664,9 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
41648
41664
  const subTarget = target[condition];
41649
41665
  const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key);
41650
41666
  if (result) {
41651
- traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
41667
+ if (result.value) {
41668
+ traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
41669
+ }
41652
41670
  traceIfEnabled(state, Diagnostics.Exiting_conditional_exports);
41653
41671
  return result;
41654
41672
  } else {
@@ -41681,10 +41699,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
41681
41699
  if (state.traceEnabled) {
41682
41700
  trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
41683
41701
  }
41684
- return toSearchResult(
41685
- /*value*/
41686
- void 0
41687
- );
41702
+ return { value: void 0 };
41688
41703
  }
41689
41704
  if (state.traceEnabled) {
41690
41705
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
@@ -46426,7 +46441,7 @@ function createTypeChecker(host) {
46426
46441
  var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
46427
46442
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
46428
46443
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
46429
- var noUncheckedSideEffectImports = !!compilerOptions.noUncheckedSideEffectImports;
46444
+ var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
46430
46445
  var checkBinaryExpression = createCheckBinaryExpression();
46431
46446
  var emitResolver = createResolver();
46432
46447
  var nodeBuilder = createNodeBuilder();
@@ -49402,9 +49417,9 @@ function createTypeChecker(host) {
49402
49417
  }
49403
49418
  }
49404
49419
  }
49405
- function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) {
49420
+ function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors, errorMessage) {
49406
49421
  const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */;
49407
- const 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;
49422
+ 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);
49408
49423
  return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors);
49409
49424
  }
49410
49425
  function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) {
@@ -64070,14 +64085,14 @@ function createTypeChecker(host) {
64070
64085
  let issuedElaboration = false;
64071
64086
  if (!targetProp) {
64072
64087
  const indexInfo = getApplicableIndexInfo(target, nameType);
64073
- if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) {
64088
+ if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
64074
64089
  issuedElaboration = true;
64075
64090
  addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
64076
64091
  }
64077
64092
  }
64078
64093
  if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
64079
64094
  const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
64080
- if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) {
64095
+ if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
64081
64096
  addRelatedInfo(
64082
64097
  reportedDiag,
64083
64098
  createDiagnosticForNode(
@@ -77770,7 +77785,7 @@ function createTypeChecker(host) {
77770
77785
  const exprType = checkExpression(expression, checkMode);
77771
77786
  if (isConstTypeReference(type)) {
77772
77787
  if (!isValidConstAssertionArgument(expression)) {
77773
- error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
77788
+ error(expression, Diagnostics.A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
77774
77789
  }
77775
77790
  return getRegularTypeOfLiteralType(exprType);
77776
77791
  }
@@ -81588,47 +81603,6 @@ function createTypeChecker(host) {
81588
81603
  }
81589
81604
  return void 0;
81590
81605
  }
81591
- function getUninstantiatedSignatures(node) {
81592
- switch (node.kind) {
81593
- case 214 /* CallExpression */:
81594
- case 171 /* Decorator */:
81595
- return getSignaturesOfType(
81596
- getTypeOfExpression(node.expression),
81597
- 0 /* Call */
81598
- );
81599
- case 215 /* NewExpression */:
81600
- return getSignaturesOfType(
81601
- getTypeOfExpression(node.expression),
81602
- 1 /* Construct */
81603
- );
81604
- case 286 /* JsxSelfClosingElement */:
81605
- case 287 /* JsxOpeningElement */:
81606
- if (isJsxIntrinsicTagName(node.tagName)) return [];
81607
- return getSignaturesOfType(
81608
- getTypeOfExpression(node.tagName),
81609
- 0 /* Call */
81610
- );
81611
- case 216 /* TaggedTemplateExpression */:
81612
- return getSignaturesOfType(
81613
- getTypeOfExpression(node.tag),
81614
- 0 /* Call */
81615
- );
81616
- case 227 /* BinaryExpression */:
81617
- case 290 /* JsxOpeningFragment */:
81618
- return [];
81619
- }
81620
- }
81621
- function getTypeParameterConstraintForPositionAcrossSignatures(signatures, position) {
81622
- const relevantTypeParameterConstraints = flatMap(signatures, (signature) => {
81623
- var _a;
81624
- const relevantTypeParameter = (_a = signature.typeParameters) == null ? void 0 : _a[position];
81625
- if (relevantTypeParameter === void 0) return [];
81626
- const relevantConstraint = getConstraintOfTypeParameter(relevantTypeParameter);
81627
- if (relevantConstraint === void 0) return [];
81628
- return [relevantConstraint];
81629
- });
81630
- return getUnionType(relevantTypeParameterConstraints);
81631
- }
81632
81606
  function checkTypeReferenceNode(node) {
81633
81607
  checkGrammarTypeArguments(node, node.typeArguments);
81634
81608
  if (node.kind === 184 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
@@ -81664,48 +81638,12 @@ function createTypeChecker(host) {
81664
81638
  }
81665
81639
  }
81666
81640
  function getTypeArgumentConstraint(node) {
81667
- let typeArgumentPosition;
81668
- if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
81669
- typeArgumentPosition = node.parent.typeArguments.indexOf(node);
81670
- }
81671
- if (typeArgumentPosition !== void 0) {
81672
- if (isCallLikeExpression(node.parent)) {
81673
- return getTypeParameterConstraintForPositionAcrossSignatures(
81674
- getUninstantiatedSignatures(node.parent),
81675
- typeArgumentPosition
81676
- );
81677
- }
81678
- if (isDecorator(node.parent.parent)) {
81679
- return getTypeParameterConstraintForPositionAcrossSignatures(
81680
- getUninstantiatedSignatures(node.parent.parent),
81681
- typeArgumentPosition
81682
- );
81683
- }
81684
- if (isExpressionWithTypeArguments(node.parent) && isExpressionStatement(node.parent.parent)) {
81685
- const uninstantiatedType = checkExpression(node.parent.expression);
81686
- const callConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
81687
- getSignaturesOfType(uninstantiatedType, 0 /* Call */),
81688
- typeArgumentPosition
81689
- );
81690
- const constructConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
81691
- getSignaturesOfType(uninstantiatedType, 1 /* Construct */),
81692
- typeArgumentPosition
81693
- );
81694
- if (constructConstraint.flags & 131072 /* Never */) return callConstraint;
81695
- if (callConstraint.flags & 131072 /* Never */) return constructConstraint;
81696
- return getIntersectionType([callConstraint, constructConstraint]);
81697
- }
81698
- if (isTypeReferenceType(node.parent)) {
81699
- const typeParameters = getTypeParametersForTypeReferenceOrImport(node.parent);
81700
- if (!typeParameters) return void 0;
81701
- const relevantTypeParameter = typeParameters[typeArgumentPosition];
81702
- const constraint = getConstraintOfTypeParameter(relevantTypeParameter);
81703
- return constraint && instantiateType(
81704
- constraint,
81705
- createTypeMapper(typeParameters, getEffectiveTypeArguments(node.parent, typeParameters))
81706
- );
81707
- }
81708
- }
81641
+ const typeReferenceNode = tryCast(node.parent, isTypeReferenceType);
81642
+ if (!typeReferenceNode) return void 0;
81643
+ const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReferenceNode);
81644
+ if (!typeParameters) return void 0;
81645
+ const constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
81646
+ return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
81709
81647
  }
81710
81648
  function checkTypeQuery(node) {
81711
81649
  getTypeFromTypeQueryNode(node);
@@ -86119,7 +86057,13 @@ function createTypeChecker(host) {
86119
86057
  error(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]);
86120
86058
  }
86121
86059
  } else if (noUncheckedSideEffectImports && !importClause) {
86122
- void resolveExternalModuleName(node, node.moduleSpecifier);
86060
+ void resolveExternalModuleName(
86061
+ node,
86062
+ node.moduleSpecifier,
86063
+ /*ignoreErrors*/
86064
+ void 0,
86065
+ Diagnostics.Cannot_find_module_or_type_declarations_for_side_effect_import_of_0
86066
+ );
86123
86067
  }
86124
86068
  }
86125
86069
  checkImportAttributes(node);
@@ -113972,11 +113916,9 @@ function transformDeclarations(context) {
113972
113916
  rawReferencedFiles = [];
113973
113917
  rawTypeReferenceDirectives = [];
113974
113918
  rawLibReferenceDirectives = [];
113975
- let hasNoDefaultLib = false;
113976
113919
  const bundle = factory2.createBundle(
113977
113920
  map(node.sourceFiles, (sourceFile) => {
113978
113921
  if (sourceFile.isDeclarationFile) return void 0;
113979
- hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
113980
113922
  currentSourceFile = sourceFile;
113981
113923
  enclosingDeclaration = sourceFile;
113982
113924
  lateMarkedStatements = void 0;
@@ -114037,7 +113979,6 @@ function transformDeclarations(context) {
114037
113979
  bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
114038
113980
  bundle.syntheticTypeReferences = getTypeReferences();
114039
113981
  bundle.syntheticLibReferences = getLibReferences();
114040
- bundle.hasNoDefaultLib = hasNoDefaultLib;
114041
113982
  return bundle;
114042
113983
  }
114043
113984
  needsDeclare = true;
@@ -114078,7 +114019,8 @@ function transformDeclarations(context) {
114078
114019
  true,
114079
114020
  getReferencedFiles(outputFilePath),
114080
114021
  getTypeReferences(),
114081
- node.hasNoDefaultLib,
114022
+ /*hasNoDefaultLib*/
114023
+ false,
114082
114024
  getLibReferences()
114083
114025
  );
114084
114026
  function collectFileReferences(sourceFile) {
@@ -119237,16 +119179,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119237
119179
  emitSourceFileWorker(node);
119238
119180
  }
119239
119181
  function emitSyntheticTripleSlashReferencesIfNeeded(node) {
119240
- emitTripleSlashDirectives(!!node.hasNoDefaultLib, node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
119182
+ emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
119241
119183
  }
119242
119184
  function emitTripleSlashDirectivesIfNeeded(node) {
119243
- if (node.isDeclarationFile) emitTripleSlashDirectives(node.hasNoDefaultLib, node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
119185
+ if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
119244
119186
  }
119245
- function emitTripleSlashDirectives(hasNoDefaultLib, files, types, libs2) {
119246
- if (hasNoDefaultLib) {
119247
- writeComment(`/// <reference no-default-lib="true"/>`);
119248
- writeLine();
119249
- }
119187
+ function emitTripleSlashDirectives(files, types, libs2) {
119250
119188
  if (currentSourceFile && currentSourceFile.moduleName) {
119251
119189
  writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
119252
119190
  writeLine();
@@ -122193,7 +122131,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122193
122131
  mark("beforeProgram");
122194
122132
  const host = createProgramOptionsHost || createCompilerHost(options);
122195
122133
  const configParsingHost = parseConfigHostFromCompilerHostLike(host);
122196
- let skipDefaultLib = options.noLib;
122197
122134
  const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
122198
122135
  const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
122199
122136
  let skipVerifyCompilerOptions = false;
@@ -122281,6 +122218,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122281
122218
  let redirectTargetsMap = createMultiMap();
122282
122219
  let usesUriStyleNodeCoreModules;
122283
122220
  const filesByName = /* @__PURE__ */ new Map();
122221
+ const libFiles = /* @__PURE__ */ new Set();
122284
122222
  let missingFileNames = /* @__PURE__ */ new Map();
122285
122223
  const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
122286
122224
  let resolvedProjectReferences;
@@ -122342,8 +122280,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122342
122280
  name,
122343
122281
  /*isDefaultLib*/
122344
122282
  false,
122345
- /*ignoreNoDefaultLib*/
122346
- false,
122347
122283
  { kind: 0 /* RootFile */, index }
122348
122284
  ));
122349
122285
  (_j = tracing) == null ? void 0 : _j.pop();
@@ -122375,15 +122311,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122375
122311
  }
122376
122312
  (_n = tracing) == null ? void 0 : _n.pop();
122377
122313
  }
122378
- if (rootNames.length && !skipDefaultLib) {
122314
+ if (rootNames.length && !options.noLib) {
122379
122315
  const defaultLibraryFileName = getDefaultLibraryFileName();
122380
122316
  if (!options.lib && defaultLibraryFileName) {
122317
+ libFiles.add(toPath3(defaultLibraryFileName));
122381
122318
  processRootFile(
122382
122319
  defaultLibraryFileName,
122383
122320
  /*isDefaultLib*/
122384
122321
  true,
122385
- /*ignoreNoDefaultLib*/
122386
- false,
122387
122322
  { kind: 6 /* LibFile */ }
122388
122323
  );
122389
122324
  } else {
@@ -122392,8 +122327,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122392
122327
  pathForLibFile(libFileName),
122393
122328
  /*isDefaultLib*/
122394
122329
  true,
122395
- /*ignoreNoDefaultLib*/
122396
- false,
122397
122330
  { kind: 6 /* LibFile */, index }
122398
122331
  );
122399
122332
  });
@@ -122904,8 +122837,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122904
122837
  structureIsReused = 1 /* SafeModules */;
122905
122838
  } else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
122906
122839
  structureIsReused = 1 /* SafeModules */;
122907
- } else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
122908
- structureIsReused = 1 /* SafeModules */;
122909
122840
  } else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
122910
122841
  structureIsReused = 1 /* SafeModules */;
122911
122842
  } else {
@@ -123087,24 +123018,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123087
123018
  return !!sourceFilesFoundSearchingNodeModules.get(file.path);
123088
123019
  }
123089
123020
  function isSourceFileDefaultLibrary(file) {
123090
- if (!file.isDeclarationFile) {
123091
- return false;
123092
- }
123093
- if (file.hasNoDefaultLib) {
123094
- return true;
123095
- }
123096
- if (options.noLib) {
123097
- return false;
123098
- }
123099
- const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
123100
- if (!options.lib) {
123101
- return equalityComparer(file.fileName, getDefaultLibraryFileName());
123102
- } else {
123103
- return some(options.lib, (libFileName) => {
123104
- const resolvedLib = resolvedLibReferences.get(libFileName);
123105
- return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
123106
- });
123107
- }
123021
+ return libFiles.has(file.path);
123108
123022
  }
123109
123023
  function getTypeChecker() {
123110
123024
  return typeChecker || (typeChecker = createTypeChecker(program));
@@ -123585,11 +123499,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123585
123499
  function getConfigFileParsingDiagnostics2() {
123586
123500
  return configFileParsingDiagnostics || emptyArray;
123587
123501
  }
123588
- function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) {
123502
+ function processRootFile(fileName, isDefaultLib, reason) {
123589
123503
  processSourceFile(
123590
123504
  normalizePath(fileName),
123591
123505
  isDefaultLib,
123592
- ignoreNoDefaultLib,
123593
123506
  /*packageId*/
123594
123507
  void 0,
123595
123508
  reason
@@ -123754,10 +123667,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123754
123667
  return sourceFileWithAddedExtension;
123755
123668
  }
123756
123669
  }
123757
- function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {
123670
+ function processSourceFile(fileName, isDefaultLib, packageId, reason) {
123758
123671
  getSourceFileFromReferenceWorker(
123759
123672
  fileName,
123760
- (fileName2) => findSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason, packageId),
123673
+ (fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
123761
123674
  // TODO: GH#18217
123762
123675
  (diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
123763
123676
  /*file*/
@@ -123774,8 +123687,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123774
123687
  fileName,
123775
123688
  /*isDefaultLib*/
123776
123689
  false,
123777
- /*ignoreNoDefaultLib*/
123778
- false,
123779
123690
  /*packageId*/
123780
123691
  void 0,
123781
123692
  reason
@@ -123801,14 +123712,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123801
123712
  sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
123802
123713
  return redirect;
123803
123714
  }
123804
- function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
123715
+ function findSourceFile(fileName, isDefaultLib, reason, packageId) {
123805
123716
  var _a2, _b2;
123806
123717
  (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
123807
123718
  fileName,
123808
123719
  isDefaultLib: isDefaultLib || void 0,
123809
123720
  fileIncludeKind: FileIncludeKind[reason.kind]
123810
123721
  });
123811
- const result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
123722
+ const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
123812
123723
  (_b2 = tracing) == null ? void 0 : _b2.pop();
123813
123724
  return result;
123814
123725
  }
@@ -123818,7 +123729,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123818
123729
  const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
123819
123730
  return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
123820
123731
  }
123821
- function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
123732
+ function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
123822
123733
  var _a2, _b2;
123823
123734
  const path = toPath3(fileName);
123824
123735
  if (useSourceOfProjectReferenceRedirect) {
@@ -123828,7 +123739,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123828
123739
  if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
123829
123740
  }
123830
123741
  if (source == null ? void 0 : source.source) {
123831
- const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
123742
+ const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
123832
123743
  if (file2) addFileToFilesByName(
123833
123744
  file2,
123834
123745
  path,
@@ -123948,7 +123859,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123948
123859
  filesByNameIgnoreCase.set(pathLowerCase, file);
123949
123860
  }
123950
123861
  }
123951
- skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
123952
123862
  if (!options.noResolve) {
123953
123863
  processReferencedFiles(file, isDefaultLib);
123954
123864
  processTypeReferenceDirectives(file);
@@ -124009,8 +123919,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124009
123919
  processSourceFile(
124010
123920
  resolveTripleslashReference(ref.fileName, file.fileName),
124011
123921
  isDefaultLib,
124012
- /*ignoreNoDefaultLib*/
124013
- false,
124014
123922
  /*packageId*/
124015
123923
  void 0,
124016
123924
  { kind: 4 /* ReferenceFile */, file: file.path, index }
@@ -124051,8 +123959,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124051
123959
  resolvedTypeReferenceDirective.resolvedFileName,
124052
123960
  /*isDefaultLib*/
124053
123961
  false,
124054
- /*ignoreNoDefaultLib*/
124055
- false,
124056
123962
  resolvedTypeReferenceDirective.packageId,
124057
123963
  reason
124058
123964
  );
@@ -124072,13 +123978,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124072
123978
  if (existing) return existing.actual;
124073
123979
  const result = pathForLibFileWorker(libFileName);
124074
123980
  (resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
123981
+ libFiles.add(toPath3(result.actual));
124075
123982
  return result.actual;
124076
123983
  }
124077
123984
  function pathForLibFileWorker(libFileName) {
124078
123985
  var _a2, _b2, _c2, _d2, _e2;
124079
123986
  const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName);
124080
123987
  if (existing) return existing;
124081
- if (options.libReplacement === false) {
123988
+ if (!options.libReplacement) {
124082
123989
  const result2 = {
124083
123990
  resolution: {
124084
123991
  resolvedModule: void 0
@@ -124130,8 +124037,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124130
124037
  pathForLibFile(libFileName),
124131
124038
  /*isDefaultLib*/
124132
124039
  true,
124133
- /*ignoreNoDefaultLib*/
124134
- true,
124135
124040
  { kind: 7 /* LibReferenceDirective */, file: file.path, index }
124136
124041
  );
124137
124042
  } else {
@@ -124179,8 +124084,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124179
124084
  resolvedFileName,
124180
124085
  /*isDefaultLib*/
124181
124086
  false,
124182
- /*ignoreNoDefaultLib*/
124183
- false,
124184
124087
  { kind: 3 /* Import */, file: file.path, index },
124185
124088
  resolution.packageId
124186
124089
  );
@@ -124284,10 +124187,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124284
124187
  }
124285
124188
  const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
124286
124189
  commandLine.fileNames.forEach((fileName) => {
124287
- if (isDeclarationFileName(fileName)) return;
124288
124190
  const path = toPath3(fileName);
124289
124191
  let outputDts;
124290
- if (!fileExtensionIs(fileName, ".json" /* Json */)) {
124192
+ if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
124291
124193
  if (!commandLine.options.outFile) {
124292
124194
  outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
124293
124195
  mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
@@ -125934,7 +125836,7 @@ function createBuilderProgramState(newProgram, oldState) {
125934
125836
  }
125935
125837
  if (canCopySemanticDiagnostics) {
125936
125838
  if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
125937
- if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) return;
125839
+ if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
125938
125840
  const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
125939
125841
  if (diagnostics) {
125940
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,28 +14,5 @@ and limitations under the License.
14
14
  ***************************************************************************** */
15
15
 
16
16
 
17
- /// <reference no-default-lib="true"/>
18
-
19
- /////////////////////////////
20
- /// Window Async Iterable APIs
21
- /////////////////////////////
22
-
23
- interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
24
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
25
- }
26
-
27
- interface FileSystemDirectoryHandle {
28
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
29
- entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
30
- keys(): FileSystemDirectoryHandleAsyncIterator<string>;
31
- values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
32
- }
33
-
34
- interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
35
- [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
36
- }
37
-
38
- interface ReadableStream<R = any> {
39
- [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
40
- values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
41
- }
17
+ // This file's contents are now included in the main DOM types.
18
+ // The file has been left for backward compatibility.