@typescript-deploys/pr-build 5.9.0-pr-61739-2 → 5.9.0-pr-61746-5

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 (3) hide show
  1. package/lib/_tsc.js +79 -111
  2. package/lib/typescript.js +83 -115
  3. 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 = "5.9";
21
- var version = `${versionMajorMinor}.0-insiders.20250520`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250521`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -16534,7 +16534,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
16534
16534
  if (forceDtsEmit) return true;
16535
16535
  if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) return false;
16536
16536
  if (!isJsonSourceFile(sourceFile)) return true;
16537
- if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) return false;
16537
+ if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
16538
16538
  if (options.outFile) return true;
16539
16539
  if (!options.outDir) return false;
16540
16540
  if (options.rootDir || options.composite && options.configFilePath) {
@@ -19967,7 +19967,7 @@ function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
19967
19967
  /*projectReferences*/
19968
19968
  void 0,
19969
19969
  resolvedProjectReferences,
19970
- (resolvedRef, parent) => resolvedRef && cb(resolvedRef, parent)
19970
+ (resolvedRef) => resolvedRef && cb(resolvedRef)
19971
19971
  );
19972
19972
  }
19973
19973
  function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) {
@@ -45462,10 +45462,10 @@ function getNearestAncestorDirectoryWithPackageJson(host, fileName) {
45462
45462
  );
45463
45463
  }
45464
45464
  function forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) {
45465
- var _a;
45465
+ var _a, _b;
45466
45466
  const getCanonicalFileName = hostGetCanonicalFileName(host);
45467
45467
  const cwd = host.getCurrentDirectory();
45468
- const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : void 0;
45468
+ const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? (_a = host.getRedirectFromSourceFile(importedFileName)) == null ? void 0 : _a.outputDts : void 0;
45469
45469
  const importedPath = toPath(importedFileName, cwd, getCanonicalFileName);
45470
45470
  const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray;
45471
45471
  const importedFileNames = [...referenceRedirect ? [referenceRedirect] : emptyArray, importedFileName, ...redirects];
@@ -45475,7 +45475,7 @@ function forEachFileNameOfModule(importingFileName, importedFileName, host, pref
45475
45475
  const result2 = forEach(targets, (p) => !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) && cb(p, referenceRedirect === p));
45476
45476
  if (result2) return result2;
45477
45477
  }
45478
- const symlinkedDirectories = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
45478
+ const symlinkedDirectories = (_b = host.getSymlinkCache) == null ? void 0 : _b.call(host).getSymlinkedDirectoriesByRealpath();
45479
45479
  const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd);
45480
45480
  const result = symlinkedDirectories && forEachAncestorDirectoryStoppingAtGlobalCache(
45481
45481
  host,
@@ -49222,7 +49222,7 @@ function createTypeChecker(host) {
49222
49222
  return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, !ignoreErrors ? moduleReferenceExpression : void 0, isForAugmentation) : void 0;
49223
49223
  }
49224
49224
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
49225
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
49225
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
49226
49226
  if (errorNode && startsWith(moduleReference, "@types/")) {
49227
49227
  const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
49228
49228
  const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
@@ -49281,7 +49281,7 @@ function createTypeChecker(host) {
49281
49281
  getAnyExtensionFromPath(moduleReference)
49282
49282
  );
49283
49283
  } else if (resolvedModule.resolvedUsingTsExtension && shouldRewrite) {
49284
- const redirect = host.getResolvedProjectReferenceToRedirect(sourceFile.path);
49284
+ const redirect = (_i = host.getRedirectFromSourceFile(sourceFile.path)) == null ? void 0 : _i.resolvedRef;
49285
49285
  if (redirect) {
49286
49286
  const ignoreCase = !host.useCaseSensitiveFileNames();
49287
49287
  const ownRootDir = host.getCommonSourceDirectory();
@@ -49321,7 +49321,7 @@ function createTypeChecker(host) {
49321
49321
  if (ext === ".ts" /* Ts */ || ext === ".js" /* Js */ || ext === ".tsx" /* Tsx */ || ext === ".jsx" /* Jsx */) {
49322
49322
  diagnosticDetails = createModeMismatchDetails(currentSourceFile);
49323
49323
  }
49324
- const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_i = overrideHost.importClause) == null ? void 0 : _i.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
49324
+ const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_j = overrideHost.importClause) == null ? void 0 : _j.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
49325
49325
  diagnostics.add(createDiagnosticForNodeFromMessageChain(
49326
49326
  getSourceFileOfNode(errorNode),
49327
49327
  errorNode,
@@ -49369,9 +49369,9 @@ function createTypeChecker(host) {
49369
49369
  }
49370
49370
  if (moduleNotFoundError) {
49371
49371
  if (resolvedModule) {
49372
- const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName);
49373
- if (redirect) {
49374
- error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName);
49372
+ const redirect = host.getRedirectFromSourceFile(resolvedModule.resolvedFileName);
49373
+ if (redirect == null ? void 0 : redirect.outputDts) {
49374
+ error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, resolvedModule.resolvedFileName);
49375
49375
  return void 0;
49376
49376
  }
49377
49377
  }
@@ -49384,14 +49384,14 @@ function createTypeChecker(host) {
49384
49384
  error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
49385
49385
  } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
49386
49386
  const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
49387
- const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
49387
+ const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1];
49388
49388
  if (suggestedExt) {
49389
49389
  error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
49390
49390
  } else {
49391
49391
  error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
49392
49392
  }
49393
49393
  } else {
49394
- if ((_k = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _k.alternateResult) {
49394
+ if ((_l = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _l.alternateResult) {
49395
49395
  const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference);
49396
49396
  errorOrSuggestion(
49397
49397
  /*isError*/
@@ -80538,6 +80538,7 @@ function createTypeChecker(host) {
80538
80538
  return type;
80539
80539
  }
80540
80540
  function checkConstEnumAccess(node, type) {
80541
+ var _a;
80541
80542
  const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */;
80542
80543
  if (!ok) {
80543
80544
  error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);
@@ -80555,7 +80556,7 @@ function createTypeChecker(host) {
80555
80556
  )) {
80556
80557
  Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */));
80557
80558
  const constEnumDeclaration = type.symbol.valueDeclaration;
80558
- const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);
80559
+ const redirect = (_a = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _a.resolvedRef;
80559
80560
  if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node) && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {
80560
80561
  error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);
80561
80562
  }
@@ -85511,7 +85512,7 @@ function createTypeChecker(host) {
85511
85512
  }
85512
85513
  }
85513
85514
  function checkAliasSymbol(node) {
85514
- var _a, _b, _c, _d;
85515
+ var _a, _b, _c, _d, _e;
85515
85516
  let symbol = getSymbolOfDeclaration(node);
85516
85517
  const target = resolveAlias(symbol);
85517
85518
  if (target !== unknownSymbol) {
@@ -85605,7 +85606,7 @@ function createTypeChecker(host) {
85605
85606
  }
85606
85607
  if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {
85607
85608
  const constEnumDeclaration = target.valueDeclaration;
85608
- const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);
85609
+ const redirect = (_e = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _e.resolvedRef;
85609
85610
  if (constEnumDeclaration.flags & 33554432 /* Ambient */ && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {
85610
85611
  error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);
85611
85612
  }
@@ -89994,7 +89995,7 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) {
89994
89995
  },
89995
89996
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
89996
89997
  redirectTargetsMap: host.redirectTargetsMap,
89997
- getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName),
89998
+ getRedirectFromSourceFile: (fileName) => host.getRedirectFromSourceFile(fileName),
89998
89999
  isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName),
89999
90000
  fileExists: (fileName) => host.fileExists(fileName),
90000
90001
  getFileIncludeReasons: () => host.getFileIncludeReasons(),
@@ -121860,9 +121861,8 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
121860
121861
  const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
121861
121862
  let resolvedProjectReferences;
121862
121863
  let projectReferenceRedirects;
121863
- let mapFromFileToProjectReferenceRedirects;
121864
- let mapFromToProjectReferenceRedirectSource;
121865
- let hasResolvedReferencencesInNodeModules = false;
121864
+ let mapSourceFileToResolvedRef;
121865
+ let mapOutputFileToResolvedRef;
121866
121866
  const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;
121867
121867
  const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({
121868
121868
  compilerHost: host,
@@ -121870,7 +121870,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
121870
121870
  useSourceOfProjectReferenceRedirect,
121871
121871
  toPath: toPath3,
121872
121872
  getResolvedProjectReferences,
121873
- getSourceOfProjectReferenceRedirect,
121873
+ getRedirectFromOutput,
121874
121874
  forEachResolvedProjectReference: forEachResolvedProjectReference2
121875
121875
  });
121876
121876
  const readFile = host.readFile.bind(host);
@@ -122080,12 +122080,11 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122080
122080
  getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2,
122081
122081
  getProjectReferences,
122082
122082
  getResolvedProjectReferences,
122083
- getProjectReferenceRedirect,
122084
- getResolvedProjectReferenceToRedirect,
122083
+ getRedirectFromSourceFile,
122085
122084
  getResolvedProjectReferenceByPath,
122086
122085
  forEachResolvedProjectReference: forEachResolvedProjectReference2,
122087
122086
  isSourceOfProjectReferenceRedirect,
122088
- getRedirectReferenceForResolutionFromSourceOfProject,
122087
+ getRedirectFromOutput,
122089
122088
  getCompilerOptionsForFile,
122090
122089
  getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2,
122091
122090
  getEmitModuleFormatOfFile,
@@ -122214,23 +122213,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122214
122213
  return result;
122215
122214
  }
122216
122215
  function getRedirectReferenceForResolution(file) {
122217
- const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName);
122218
- if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect;
122219
- const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
122216
+ var _a2, _b2;
122217
+ const redirect = getRedirectFromSourceFile(file.originalFileName);
122218
+ if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect == null ? void 0 : redirect.resolvedRef;
122219
+ const resultFromDts = (_a2 = getRedirectFromOutput(file.path)) == null ? void 0 : _a2.resolvedRef;
122220
122220
  if (resultFromDts) return resultFromDts;
122221
122221
  if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0;
122222
122222
  const realDeclarationPath = toPath3(host.realpath(file.originalFileName));
122223
- return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
122224
- }
122225
- function getRedirectReferenceForResolutionFromSourceOfProject(filePath) {
122226
- const source = getSourceOfProjectReferenceRedirect(filePath);
122227
- if (isString(source)) return getResolvedProjectReferenceToRedirect(source);
122228
- if (!source) return void 0;
122229
- return forEachResolvedProjectReference2((resolvedRef) => {
122230
- const out = resolvedRef.commandLine.options.outFile;
122231
- if (!out) return void 0;
122232
- return toPath3(out) === filePath ? resolvedRef : void 0;
122233
- });
122223
+ return realDeclarationPath === file.path ? void 0 : (_b2 = getRedirectFromOutput(realDeclarationPath)) == null ? void 0 : _b2.resolvedRef;
122234
122224
  }
122235
122225
  function compareDefaultLibFiles(a, b) {
122236
122226
  return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b));
@@ -122602,8 +122592,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
122602
122592
  getSourceFileByPath: program.getSourceFileByPath,
122603
122593
  getSourceFiles: program.getSourceFiles,
122604
122594
  isSourceFileFromExternalLibrary,
122605
- getResolvedProjectReferenceToRedirect,
122606
- getProjectReferenceRedirect,
122595
+ getRedirectFromSourceFile,
122607
122596
  isSourceOfProjectReferenceRedirect,
122608
122597
  getSymlinkCache,
122609
122598
  writeFile: writeFileCallback || writeFile2,
@@ -123318,9 +123307,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123318
123307
  const sourceFile = getSourceFile2(fileName);
123319
123308
  if (fail) {
123320
123309
  if (!sourceFile) {
123321
- const redirect = getProjectReferenceRedirect(fileName);
123322
- if (redirect) {
123323
- fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName);
123310
+ const redirect = getRedirectFromSourceFile(fileName);
123311
+ if (redirect == null ? void 0 : redirect.outputDts) {
123312
+ fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, fileName);
123324
123313
  } else {
123325
123314
  fail(Diagnostics.File_0_not_found, fileName);
123326
123315
  }
@@ -123406,16 +123395,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123406
123395
  return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
123407
123396
  }
123408
123397
  function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
123409
- var _a2;
123398
+ var _a2, _b2, _c2, _d2;
123410
123399
  const path = toPath3(fileName);
123411
123400
  if (useSourceOfProjectReferenceRedirect) {
123412
- let source = getSourceOfProjectReferenceRedirect(path);
123401
+ let source = (_a2 = getRedirectFromOutput(path)) == null ? void 0 : _a2.source;
123413
123402
  if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
123414
123403
  const realPath2 = toPath3(host.realpath(fileName));
123415
- if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2);
123404
+ if (realPath2 !== path) source = (_b2 = getRedirectFromOutput(realPath2)) == null ? void 0 : _b2.source;
123416
123405
  }
123417
123406
  if (source) {
123418
- const file2 = isString(source) ? findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : void 0;
123407
+ const file2 = findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
123419
123408
  if (file2) addFileToFilesByName(
123420
123409
  file2,
123421
123410
  path,
@@ -123439,7 +123428,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123439
123428
  const checkedName = file2.fileName;
123440
123429
  const isRedirect = toPath3(checkedName) !== toPath3(fileName);
123441
123430
  if (isRedirect) {
123442
- fileName = getProjectReferenceRedirect(fileName) || fileName;
123431
+ fileName = ((_c2 = getRedirectFromSourceFile(fileName)) == null ? void 0 : _c2.outputDts) || fileName;
123443
123432
  }
123444
123433
  const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory);
123445
123434
  const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory);
@@ -123468,14 +123457,13 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123468
123457
  }
123469
123458
  let redirectedPath;
123470
123459
  if (!useSourceOfProjectReferenceRedirect) {
123471
- const redirectProject = getProjectReferenceRedirectProject(fileName);
123472
- if (redirectProject) {
123473
- if (redirectProject.commandLine.options.outFile) {
123460
+ const redirectProject = getRedirectFromSourceFile(fileName);
123461
+ if (redirectProject == null ? void 0 : redirectProject.outputDts) {
123462
+ if (redirectProject.resolvedRef.commandLine.options.outFile) {
123474
123463
  return void 0;
123475
123464
  }
123476
- const redirect = getProjectReferenceOutputName(redirectProject, fileName);
123477
- fileName = redirect;
123478
- redirectedPath = toPath3(redirect);
123465
+ fileName = redirectProject.outputDts;
123466
+ redirectedPath = toPath3(redirectProject.outputDts);
123479
123467
  }
123480
123468
  }
123481
123469
  const sourceFileOptions = getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options);
@@ -123519,7 +123507,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123519
123507
  file.path = path;
123520
123508
  file.resolvedPath = toPath3(fileName);
123521
123509
  file.originalFileName = originalFileName;
123522
- file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
123510
+ file.packageJsonLocations = ((_d2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _d2.length) ? sourceFileOptions.packageJsonLocations : void 0;
123523
123511
  file.packageJsonScope = sourceFileOptions.packageJsonScope;
123524
123512
  addFileIncludeReason(
123525
123513
  file,
@@ -123574,60 +123562,17 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123574
123562
  if (file !== void 0) missingFileNames.delete(path);
123575
123563
  else missingFileNames.set(path, fileName);
123576
123564
  }
123577
- function getProjectReferenceRedirect(fileName) {
123578
- const referencedProject = getProjectReferenceRedirectProject(fileName);
123579
- return referencedProject && getProjectReferenceOutputName(referencedProject, fileName);
123580
- }
123581
- function getProjectReferenceRedirectProject(fileName) {
123582
- if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".json" /* Json */)) {
123583
- return void 0;
123584
- }
123585
- return getResolvedProjectReferenceToRedirect(fileName);
123586
- }
123587
- function getProjectReferenceOutputName(referencedProject, fileName) {
123588
- const out = referencedProject.commandLine.options.outFile;
123589
- return out ? changeExtension(out, ".d.ts" /* Dts */) : getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames());
123590
- }
123591
- function getResolvedProjectReferenceToRedirect(fileName) {
123592
- if (mapFromFileToProjectReferenceRedirects === void 0) {
123593
- mapFromFileToProjectReferenceRedirects = /* @__PURE__ */ new Map();
123594
- forEachResolvedProjectReference2((referencedProject) => {
123595
- if (toPath3(options.configFilePath) !== referencedProject.sourceFile.path) {
123596
- referencedProject.commandLine.fileNames.forEach((f) => mapFromFileToProjectReferenceRedirects.set(toPath3(f), referencedProject.sourceFile.path));
123597
- }
123598
- });
123599
- }
123600
- const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath3(fileName));
123601
- return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath);
123565
+ function getRedirectFromSourceFile(fileName) {
123566
+ return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
123602
123567
  }
123603
123568
  function forEachResolvedProjectReference2(cb) {
123604
123569
  return forEachResolvedProjectReference(resolvedProjectReferences, cb);
123605
123570
  }
123606
- function getSourceOfProjectReferenceRedirect(path) {
123607
- if (!isDeclarationFileName(path)) return void 0;
123608
- if (!hasResolvedReferencencesInNodeModules && pathContainsNodeModules(path)) return void 0;
123609
- if (mapFromToProjectReferenceRedirectSource === void 0) {
123610
- mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map();
123611
- forEachResolvedProjectReference2((resolvedRef) => {
123612
- const out = resolvedRef.commandLine.options.outFile;
123613
- if (out) {
123614
- const outputDts = changeExtension(out, ".d.ts" /* Dts */);
123615
- mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), true);
123616
- } else {
123617
- const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
123618
- forEach(resolvedRef.commandLine.fileNames, (fileName) => {
123619
- if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
123620
- const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
123621
- mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), fileName);
123622
- }
123623
- });
123624
- }
123625
- });
123626
- }
123627
- return mapFromToProjectReferenceRedirectSource.get(path);
123571
+ function getRedirectFromOutput(path) {
123572
+ return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path);
123628
123573
  }
123629
123574
  function isSourceOfProjectReferenceRedirect(fileName) {
123630
- return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName);
123575
+ return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
123631
123576
  }
123632
123577
  function getResolvedProjectReferenceByPath(projectReferencePath) {
123633
123578
  if (!projectReferenceRedirects) {
@@ -123795,7 +123740,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123795
123740
  continue;
123796
123741
  }
123797
123742
  const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
123798
- const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
123743
+ const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getRedirectFromSourceFile(resolution.resolvedFileName);
123799
123744
  const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
123800
123745
  const resolvedFileName = resolution.resolvedFileName;
123801
123746
  if (isFromNodeModulesSearch) {
@@ -123903,11 +123848,32 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
123903
123848
  sourceFile.path = sourceFilePath;
123904
123849
  sourceFile.resolvedPath = sourceFilePath;
123905
123850
  sourceFile.originalFileName = refPath;
123906
- if (!hasResolvedReferencencesInNodeModules && (pathContainsNodeModules(sourceFile.resolvedPath) || pathContainsNodeModules(sourceFile.path))) {
123907
- hasResolvedReferencencesInNodeModules = true;
123908
- }
123909
123851
  const resolvedRef = { commandLine, sourceFile };
123910
123852
  projectReferenceRedirects.set(sourceFilePath, resolvedRef);
123853
+ if (options.configFile !== sourceFile) {
123854
+ mapSourceFileToResolvedRef ?? (mapSourceFileToResolvedRef = /* @__PURE__ */ new Map());
123855
+ mapOutputFileToResolvedRef ?? (mapOutputFileToResolvedRef = /* @__PURE__ */ new Map());
123856
+ let outDts;
123857
+ if (commandLine.options.outFile) {
123858
+ outDts = changeExtension(commandLine.options.outFile, ".d.ts" /* Dts */);
123859
+ mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.set(toPath3(outDts), { resolvedRef });
123860
+ }
123861
+ const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
123862
+ commandLine.fileNames.forEach((fileName) => {
123863
+ if (isDeclarationFileName(fileName)) return;
123864
+ const path = toPath3(fileName);
123865
+ let outputDts;
123866
+ if (!fileExtensionIs(fileName, ".json" /* Json */)) {
123867
+ if (!commandLine.options.outFile) {
123868
+ outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
123869
+ mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
123870
+ } else {
123871
+ outputDts = outDts;
123872
+ }
123873
+ }
123874
+ mapSourceFileToResolvedRef.set(path, { resolvedRef, outputDts });
123875
+ });
123876
+ }
123911
123877
  if (commandLine.projectReferences) {
123912
123878
  resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile);
123913
123879
  }
@@ -124628,7 +124594,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) {
124628
124594
  );
124629
124595
  }
124630
124596
  function fileExistsIfProjectReferenceDts(file) {
124631
- const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file));
124597
+ const source = host.getRedirectFromOutput(host.toPath(file));
124632
124598
  return source !== void 0 ? isString(source) ? originalFileExists.call(host.compilerHost, source) : true : void 0;
124633
124599
  }
124634
124600
  function directoryExistsIfProjectReferenceDeclDir(dir) {
@@ -125158,7 +125124,8 @@ var BuilderState;
125158
125124
  return symbol && getReferencedFilesFromImportedModuleSymbol(symbol);
125159
125125
  }
125160
125126
  function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) {
125161
- return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
125127
+ var _a;
125128
+ return toPath(((_a = program.getRedirectFromSourceFile(fileName)) == null ? void 0 : _a.outputDts) || fileName, sourceFileDirectory, getCanonicalFileName);
125162
125129
  }
125163
125130
  function getReferencedFiles(program, sourceFile, getCanonicalFileName) {
125164
125131
  let referencedFiles;
@@ -127433,12 +127400,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
127433
127400
  shouldRetryResolution,
127434
127401
  logChanges
127435
127402
  }) {
127403
+ var _a;
127436
127404
  const path = resolutionHost.toPath(containingFile);
127437
127405
  const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);
127438
127406
  const resolvedModules = [];
127439
127407
  const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path);
127440
127408
  const program = resolutionHost.getCurrentProgram();
127441
- const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile);
127409
+ const oldRedirect = program && ((_a = program.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
127442
127410
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
127443
127411
  const seenNamesInFile = createModeAwareCache();
127444
127412
  for (const entry of entries) {
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 = "5.9";
2289
- var version = `${versionMajorMinor}.0-insiders.20250520`;
2289
+ var version = `${versionMajorMinor}.0-insiders.20250521`;
2290
2290
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2291
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2292
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -20350,7 +20350,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
20350
20350
  if (forceDtsEmit) return true;
20351
20351
  if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) return false;
20352
20352
  if (!isJsonSourceFile(sourceFile)) return true;
20353
- if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) return false;
20353
+ if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
20354
20354
  if (options.outFile) return true;
20355
20355
  if (!options.outDir) return false;
20356
20356
  if (options.rootDir || options.composite && options.configFilePath) {
@@ -24065,7 +24065,7 @@ function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
24065
24065
  /*projectReferences*/
24066
24066
  void 0,
24067
24067
  resolvedProjectReferences,
24068
- (resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2)
24068
+ (resolvedRef) => resolvedRef && cb(resolvedRef)
24069
24069
  );
24070
24070
  }
24071
24071
  function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) {
@@ -50059,10 +50059,10 @@ function getNearestAncestorDirectoryWithPackageJson(host, fileName) {
50059
50059
  );
50060
50060
  }
50061
50061
  function forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) {
50062
- var _a;
50062
+ var _a, _b;
50063
50063
  const getCanonicalFileName = hostGetCanonicalFileName(host);
50064
50064
  const cwd = host.getCurrentDirectory();
50065
- const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : void 0;
50065
+ const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? (_a = host.getRedirectFromSourceFile(importedFileName)) == null ? void 0 : _a.outputDts : void 0;
50066
50066
  const importedPath = toPath(importedFileName, cwd, getCanonicalFileName);
50067
50067
  const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray;
50068
50068
  const importedFileNames = [...referenceRedirect ? [referenceRedirect] : emptyArray, importedFileName, ...redirects];
@@ -50072,7 +50072,7 @@ function forEachFileNameOfModule(importingFileName, importedFileName, host, pref
50072
50072
  const result2 = forEach(targets, (p) => !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) && cb(p, referenceRedirect === p));
50073
50073
  if (result2) return result2;
50074
50074
  }
50075
- const symlinkedDirectories = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
50075
+ const symlinkedDirectories = (_b = host.getSymlinkCache) == null ? void 0 : _b.call(host).getSymlinkedDirectoriesByRealpath();
50076
50076
  const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd);
50077
50077
  const result = symlinkedDirectories && forEachAncestorDirectoryStoppingAtGlobalCache(
50078
50078
  host,
@@ -53834,7 +53834,7 @@ function createTypeChecker(host) {
53834
53834
  return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, !ignoreErrors ? moduleReferenceExpression : void 0, isForAugmentation) : void 0;
53835
53835
  }
53836
53836
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
53837
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
53837
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
53838
53838
  if (errorNode && startsWith(moduleReference, "@types/")) {
53839
53839
  const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
53840
53840
  const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
@@ -53893,7 +53893,7 @@ function createTypeChecker(host) {
53893
53893
  getAnyExtensionFromPath(moduleReference)
53894
53894
  );
53895
53895
  } else if (resolvedModule.resolvedUsingTsExtension && shouldRewrite) {
53896
- const redirect = host.getResolvedProjectReferenceToRedirect(sourceFile.path);
53896
+ const redirect = (_i = host.getRedirectFromSourceFile(sourceFile.path)) == null ? void 0 : _i.resolvedRef;
53897
53897
  if (redirect) {
53898
53898
  const ignoreCase = !host.useCaseSensitiveFileNames();
53899
53899
  const ownRootDir = host.getCommonSourceDirectory();
@@ -53933,7 +53933,7 @@ function createTypeChecker(host) {
53933
53933
  if (ext === ".ts" /* Ts */ || ext === ".js" /* Js */ || ext === ".tsx" /* Tsx */ || ext === ".jsx" /* Jsx */) {
53934
53934
  diagnosticDetails = createModeMismatchDetails(currentSourceFile);
53935
53935
  }
53936
- const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_i = overrideHost.importClause) == null ? void 0 : _i.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
53936
+ const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_j = overrideHost.importClause) == null ? void 0 : _j.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
53937
53937
  diagnostics.add(createDiagnosticForNodeFromMessageChain(
53938
53938
  getSourceFileOfNode(errorNode),
53939
53939
  errorNode,
@@ -53981,9 +53981,9 @@ function createTypeChecker(host) {
53981
53981
  }
53982
53982
  if (moduleNotFoundError) {
53983
53983
  if (resolvedModule) {
53984
- const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName);
53985
- if (redirect) {
53986
- error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName);
53984
+ const redirect = host.getRedirectFromSourceFile(resolvedModule.resolvedFileName);
53985
+ if (redirect == null ? void 0 : redirect.outputDts) {
53986
+ error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, resolvedModule.resolvedFileName);
53987
53987
  return void 0;
53988
53988
  }
53989
53989
  }
@@ -53996,14 +53996,14 @@ function createTypeChecker(host) {
53996
53996
  error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
53997
53997
  } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
53998
53998
  const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
53999
- const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
53999
+ const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1];
54000
54000
  if (suggestedExt) {
54001
54001
  error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
54002
54002
  } else {
54003
54003
  error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
54004
54004
  }
54005
54005
  } else {
54006
- if ((_k = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _k.alternateResult) {
54006
+ if ((_l = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _l.alternateResult) {
54007
54007
  const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference);
54008
54008
  errorOrSuggestion(
54009
54009
  /*isError*/
@@ -85150,6 +85150,7 @@ function createTypeChecker(host) {
85150
85150
  return type;
85151
85151
  }
85152
85152
  function checkConstEnumAccess(node, type) {
85153
+ var _a;
85153
85154
  const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */;
85154
85155
  if (!ok) {
85155
85156
  error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);
@@ -85167,7 +85168,7 @@ function createTypeChecker(host) {
85167
85168
  )) {
85168
85169
  Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */));
85169
85170
  const constEnumDeclaration = type.symbol.valueDeclaration;
85170
- const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);
85171
+ const redirect = (_a = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _a.resolvedRef;
85171
85172
  if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node) && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {
85172
85173
  error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);
85173
85174
  }
@@ -90123,7 +90124,7 @@ function createTypeChecker(host) {
90123
90124
  }
90124
90125
  }
90125
90126
  function checkAliasSymbol(node) {
90126
- var _a, _b, _c, _d;
90127
+ var _a, _b, _c, _d, _e;
90127
90128
  let symbol = getSymbolOfDeclaration(node);
90128
90129
  const target = resolveAlias(symbol);
90129
90130
  if (target !== unknownSymbol) {
@@ -90217,7 +90218,7 @@ function createTypeChecker(host) {
90217
90218
  }
90218
90219
  if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {
90219
90220
  const constEnumDeclaration = target.valueDeclaration;
90220
- const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath);
90221
+ const redirect = (_e = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _e.resolvedRef;
90221
90222
  if (constEnumDeclaration.flags & 33554432 /* Ambient */ && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) {
90222
90223
  error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName);
90223
90224
  }
@@ -94606,7 +94607,7 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) {
94606
94607
  },
94607
94608
  useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
94608
94609
  redirectTargetsMap: host.redirectTargetsMap,
94609
- getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName),
94610
+ getRedirectFromSourceFile: (fileName) => host.getRedirectFromSourceFile(fileName),
94610
94611
  isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName),
94611
94612
  fileExists: (fileName) => host.fileExists(fileName),
94612
94613
  getFileIncludeReasons: () => host.getFileIncludeReasons(),
@@ -126711,9 +126712,8 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
126711
126712
  const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
126712
126713
  let resolvedProjectReferences;
126713
126714
  let projectReferenceRedirects;
126714
- let mapFromFileToProjectReferenceRedirects;
126715
- let mapFromToProjectReferenceRedirectSource;
126716
- let hasResolvedReferencencesInNodeModules = false;
126715
+ let mapSourceFileToResolvedRef;
126716
+ let mapOutputFileToResolvedRef;
126717
126717
  const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;
126718
126718
  const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({
126719
126719
  compilerHost: host,
@@ -126721,7 +126721,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
126721
126721
  useSourceOfProjectReferenceRedirect,
126722
126722
  toPath: toPath3,
126723
126723
  getResolvedProjectReferences,
126724
- getSourceOfProjectReferenceRedirect,
126724
+ getRedirectFromOutput,
126725
126725
  forEachResolvedProjectReference: forEachResolvedProjectReference2
126726
126726
  });
126727
126727
  const readFile = host.readFile.bind(host);
@@ -126931,12 +126931,11 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
126931
126931
  getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2,
126932
126932
  getProjectReferences,
126933
126933
  getResolvedProjectReferences,
126934
- getProjectReferenceRedirect,
126935
- getResolvedProjectReferenceToRedirect,
126934
+ getRedirectFromSourceFile,
126936
126935
  getResolvedProjectReferenceByPath,
126937
126936
  forEachResolvedProjectReference: forEachResolvedProjectReference2,
126938
126937
  isSourceOfProjectReferenceRedirect,
126939
- getRedirectReferenceForResolutionFromSourceOfProject,
126938
+ getRedirectFromOutput,
126940
126939
  getCompilerOptionsForFile,
126941
126940
  getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2,
126942
126941
  getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2,
@@ -127065,23 +127064,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127065
127064
  return result;
127066
127065
  }
127067
127066
  function getRedirectReferenceForResolution(file) {
127068
- const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName);
127069
- if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect;
127070
- const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
127067
+ var _a2, _b2;
127068
+ const redirect = getRedirectFromSourceFile(file.originalFileName);
127069
+ if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect == null ? void 0 : redirect.resolvedRef;
127070
+ const resultFromDts = (_a2 = getRedirectFromOutput(file.path)) == null ? void 0 : _a2.resolvedRef;
127071
127071
  if (resultFromDts) return resultFromDts;
127072
127072
  if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0;
127073
127073
  const realDeclarationPath = toPath3(host.realpath(file.originalFileName));
127074
- return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
127075
- }
127076
- function getRedirectReferenceForResolutionFromSourceOfProject(filePath) {
127077
- const source = getSourceOfProjectReferenceRedirect(filePath);
127078
- if (isString(source)) return getResolvedProjectReferenceToRedirect(source);
127079
- if (!source) return void 0;
127080
- return forEachResolvedProjectReference2((resolvedRef) => {
127081
- const out = resolvedRef.commandLine.options.outFile;
127082
- if (!out) return void 0;
127083
- return toPath3(out) === filePath ? resolvedRef : void 0;
127084
- });
127074
+ return realDeclarationPath === file.path ? void 0 : (_b2 = getRedirectFromOutput(realDeclarationPath)) == null ? void 0 : _b2.resolvedRef;
127085
127075
  }
127086
127076
  function compareDefaultLibFiles(a, b) {
127087
127077
  return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b));
@@ -127453,8 +127443,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
127453
127443
  getSourceFileByPath: program.getSourceFileByPath,
127454
127444
  getSourceFiles: program.getSourceFiles,
127455
127445
  isSourceFileFromExternalLibrary,
127456
- getResolvedProjectReferenceToRedirect,
127457
- getProjectReferenceRedirect,
127446
+ getRedirectFromSourceFile,
127458
127447
  isSourceOfProjectReferenceRedirect,
127459
127448
  getSymlinkCache,
127460
127449
  writeFile: writeFileCallback || writeFile2,
@@ -128169,9 +128158,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128169
128158
  const sourceFile = getSourceFile2(fileName);
128170
128159
  if (fail) {
128171
128160
  if (!sourceFile) {
128172
- const redirect = getProjectReferenceRedirect(fileName);
128173
- if (redirect) {
128174
- fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName);
128161
+ const redirect = getRedirectFromSourceFile(fileName);
128162
+ if (redirect == null ? void 0 : redirect.outputDts) {
128163
+ fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, fileName);
128175
128164
  } else {
128176
128165
  fail(Diagnostics.File_0_not_found, fileName);
128177
128166
  }
@@ -128257,16 +128246,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128257
128246
  return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
128258
128247
  }
128259
128248
  function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
128260
- var _a2;
128249
+ var _a2, _b2, _c2, _d2;
128261
128250
  const path = toPath3(fileName);
128262
128251
  if (useSourceOfProjectReferenceRedirect) {
128263
- let source = getSourceOfProjectReferenceRedirect(path);
128252
+ let source = (_a2 = getRedirectFromOutput(path)) == null ? void 0 : _a2.source;
128264
128253
  if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
128265
128254
  const realPath2 = toPath3(host.realpath(fileName));
128266
- if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2);
128255
+ if (realPath2 !== path) source = (_b2 = getRedirectFromOutput(realPath2)) == null ? void 0 : _b2.source;
128267
128256
  }
128268
128257
  if (source) {
128269
- const file2 = isString(source) ? findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : void 0;
128258
+ const file2 = findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
128270
128259
  if (file2) addFileToFilesByName(
128271
128260
  file2,
128272
128261
  path,
@@ -128290,7 +128279,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128290
128279
  const checkedName = file2.fileName;
128291
128280
  const isRedirect = toPath3(checkedName) !== toPath3(fileName);
128292
128281
  if (isRedirect) {
128293
- fileName = getProjectReferenceRedirect(fileName) || fileName;
128282
+ fileName = ((_c2 = getRedirectFromSourceFile(fileName)) == null ? void 0 : _c2.outputDts) || fileName;
128294
128283
  }
128295
128284
  const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory);
128296
128285
  const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory);
@@ -128319,14 +128308,13 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128319
128308
  }
128320
128309
  let redirectedPath;
128321
128310
  if (!useSourceOfProjectReferenceRedirect) {
128322
- const redirectProject = getProjectReferenceRedirectProject(fileName);
128323
- if (redirectProject) {
128324
- if (redirectProject.commandLine.options.outFile) {
128311
+ const redirectProject = getRedirectFromSourceFile(fileName);
128312
+ if (redirectProject == null ? void 0 : redirectProject.outputDts) {
128313
+ if (redirectProject.resolvedRef.commandLine.options.outFile) {
128325
128314
  return void 0;
128326
128315
  }
128327
- const redirect = getProjectReferenceOutputName(redirectProject, fileName);
128328
- fileName = redirect;
128329
- redirectedPath = toPath3(redirect);
128316
+ fileName = redirectProject.outputDts;
128317
+ redirectedPath = toPath3(redirectProject.outputDts);
128330
128318
  }
128331
128319
  }
128332
128320
  const sourceFileOptions = getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options);
@@ -128370,7 +128358,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128370
128358
  file.path = path;
128371
128359
  file.resolvedPath = toPath3(fileName);
128372
128360
  file.originalFileName = originalFileName;
128373
- file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
128361
+ file.packageJsonLocations = ((_d2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _d2.length) ? sourceFileOptions.packageJsonLocations : void 0;
128374
128362
  file.packageJsonScope = sourceFileOptions.packageJsonScope;
128375
128363
  addFileIncludeReason(
128376
128364
  file,
@@ -128425,60 +128413,17 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128425
128413
  if (file !== void 0) missingFileNames.delete(path);
128426
128414
  else missingFileNames.set(path, fileName);
128427
128415
  }
128428
- function getProjectReferenceRedirect(fileName) {
128429
- const referencedProject = getProjectReferenceRedirectProject(fileName);
128430
- return referencedProject && getProjectReferenceOutputName(referencedProject, fileName);
128431
- }
128432
- function getProjectReferenceRedirectProject(fileName) {
128433
- if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".json" /* Json */)) {
128434
- return void 0;
128435
- }
128436
- return getResolvedProjectReferenceToRedirect(fileName);
128437
- }
128438
- function getProjectReferenceOutputName(referencedProject, fileName) {
128439
- const out = referencedProject.commandLine.options.outFile;
128440
- return out ? changeExtension(out, ".d.ts" /* Dts */) : getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames());
128441
- }
128442
- function getResolvedProjectReferenceToRedirect(fileName) {
128443
- if (mapFromFileToProjectReferenceRedirects === void 0) {
128444
- mapFromFileToProjectReferenceRedirects = /* @__PURE__ */ new Map();
128445
- forEachResolvedProjectReference2((referencedProject) => {
128446
- if (toPath3(options.configFilePath) !== referencedProject.sourceFile.path) {
128447
- referencedProject.commandLine.fileNames.forEach((f) => mapFromFileToProjectReferenceRedirects.set(toPath3(f), referencedProject.sourceFile.path));
128448
- }
128449
- });
128450
- }
128451
- const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath3(fileName));
128452
- return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath);
128416
+ function getRedirectFromSourceFile(fileName) {
128417
+ return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
128453
128418
  }
128454
128419
  function forEachResolvedProjectReference2(cb) {
128455
128420
  return forEachResolvedProjectReference(resolvedProjectReferences, cb);
128456
128421
  }
128457
- function getSourceOfProjectReferenceRedirect(path) {
128458
- if (!isDeclarationFileName(path)) return void 0;
128459
- if (!hasResolvedReferencencesInNodeModules && pathContainsNodeModules(path)) return void 0;
128460
- if (mapFromToProjectReferenceRedirectSource === void 0) {
128461
- mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map();
128462
- forEachResolvedProjectReference2((resolvedRef) => {
128463
- const out = resolvedRef.commandLine.options.outFile;
128464
- if (out) {
128465
- const outputDts = changeExtension(out, ".d.ts" /* Dts */);
128466
- mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), true);
128467
- } else {
128468
- const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
128469
- forEach(resolvedRef.commandLine.fileNames, (fileName) => {
128470
- if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
128471
- const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
128472
- mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), fileName);
128473
- }
128474
- });
128475
- }
128476
- });
128477
- }
128478
- return mapFromToProjectReferenceRedirectSource.get(path);
128422
+ function getRedirectFromOutput(path) {
128423
+ return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path);
128479
128424
  }
128480
128425
  function isSourceOfProjectReferenceRedirect(fileName) {
128481
- return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName);
128426
+ return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
128482
128427
  }
128483
128428
  function getResolvedProjectReferenceByPath(projectReferencePath) {
128484
128429
  if (!projectReferenceRedirects) {
@@ -128646,7 +128591,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128646
128591
  continue;
128647
128592
  }
128648
128593
  const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
128649
- const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
128594
+ const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getRedirectFromSourceFile(resolution.resolvedFileName);
128650
128595
  const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
128651
128596
  const resolvedFileName = resolution.resolvedFileName;
128652
128597
  if (isFromNodeModulesSearch) {
@@ -128754,11 +128699,32 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
128754
128699
  sourceFile.path = sourceFilePath;
128755
128700
  sourceFile.resolvedPath = sourceFilePath;
128756
128701
  sourceFile.originalFileName = refPath;
128757
- if (!hasResolvedReferencencesInNodeModules && (pathContainsNodeModules(sourceFile.resolvedPath) || pathContainsNodeModules(sourceFile.path))) {
128758
- hasResolvedReferencencesInNodeModules = true;
128759
- }
128760
128702
  const resolvedRef = { commandLine, sourceFile };
128761
128703
  projectReferenceRedirects.set(sourceFilePath, resolvedRef);
128704
+ if (options.configFile !== sourceFile) {
128705
+ mapSourceFileToResolvedRef ?? (mapSourceFileToResolvedRef = /* @__PURE__ */ new Map());
128706
+ mapOutputFileToResolvedRef ?? (mapOutputFileToResolvedRef = /* @__PURE__ */ new Map());
128707
+ let outDts;
128708
+ if (commandLine.options.outFile) {
128709
+ outDts = changeExtension(commandLine.options.outFile, ".d.ts" /* Dts */);
128710
+ mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.set(toPath3(outDts), { resolvedRef });
128711
+ }
128712
+ const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
128713
+ commandLine.fileNames.forEach((fileName) => {
128714
+ if (isDeclarationFileName(fileName)) return;
128715
+ const path = toPath3(fileName);
128716
+ let outputDts;
128717
+ if (!fileExtensionIs(fileName, ".json" /* Json */)) {
128718
+ if (!commandLine.options.outFile) {
128719
+ outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
128720
+ mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
128721
+ } else {
128722
+ outputDts = outDts;
128723
+ }
128724
+ }
128725
+ mapSourceFileToResolvedRef.set(path, { resolvedRef, outputDts });
128726
+ });
128727
+ }
128762
128728
  if (commandLine.projectReferences) {
128763
128729
  resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile);
128764
128730
  }
@@ -129479,7 +129445,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) {
129479
129445
  );
129480
129446
  }
129481
129447
  function fileExistsIfProjectReferenceDts(file) {
129482
- const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file));
129448
+ const source = host.getRedirectFromOutput(host.toPath(file));
129483
129449
  return source !== void 0 ? isString(source) ? originalFileExists.call(host.compilerHost, source) : true : void 0;
129484
129450
  }
129485
129451
  function directoryExistsIfProjectReferenceDeclDir(dir) {
@@ -130023,7 +129989,8 @@ var BuilderState;
130023
129989
  return symbol && getReferencedFilesFromImportedModuleSymbol(symbol);
130024
129990
  }
130025
129991
  function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) {
130026
- return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
129992
+ var _a;
129993
+ return toPath(((_a = program.getRedirectFromSourceFile(fileName)) == null ? void 0 : _a.outputDts) || fileName, sourceFileDirectory, getCanonicalFileName);
130027
129994
  }
130028
129995
  function getReferencedFiles(program, sourceFile, getCanonicalFileName) {
130029
129996
  let referencedFiles;
@@ -132345,12 +132312,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
132345
132312
  shouldRetryResolution,
132346
132313
  logChanges
132347
132314
  }) {
132315
+ var _a;
132348
132316
  const path = resolutionHost.toPath(containingFile);
132349
132317
  const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);
132350
132318
  const resolvedModules = [];
132351
132319
  const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path);
132352
132320
  const program = resolutionHost.getCurrentProgram();
132353
- const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile);
132321
+ const oldRedirect = program && ((_a = program.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
132354
132322
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
132355
132323
  const seenNamesInFile = createModeAwareCache();
132356
132324
  for (const entry of entries) {
@@ -140497,7 +140465,7 @@ function createModuleSpecifierResolutionHost(program, host) {
140497
140465
  },
140498
140466
  getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation),
140499
140467
  redirectTargetsMap: program.redirectTargetsMap,
140500
- getProjectReferenceRedirect: (fileName) => program.getProjectReferenceRedirect(fileName),
140468
+ getRedirectFromSourceFile: (fileName) => program.getRedirectFromSourceFile(fileName),
140501
140469
  isSourceOfProjectReferenceRedirect: (fileName) => program.isSourceOfProjectReferenceRedirect(fileName),
140502
140470
  getNearestAncestorDirectoryWithPackageJson: maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson),
140503
140471
  getFileIncludeReasons: () => program.getFileIncludeReasons(),
@@ -186878,7 +186846,7 @@ var Project2 = class _Project {
186878
186846
  this.projectService.onProjectCreation(this);
186879
186847
  }
186880
186848
  /** @internal */
186881
- getResolvedProjectReferenceToRedirect(_fileName) {
186849
+ getRedirectFromSourceFile(_fileName) {
186882
186850
  return void 0;
186883
186851
  }
186884
186852
  isNonTsProject() {
@@ -188927,9 +188895,9 @@ var ConfiguredProject2 = class extends Project2 {
188927
188895
  (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(canonicalConfigPath);
188928
188896
  }
188929
188897
  /** @internal */
188930
- getResolvedProjectReferenceToRedirect(fileName) {
188898
+ getRedirectFromSourceFile(fileName) {
188931
188899
  const program = this.getCurrentProgram();
188932
- return program && program.getResolvedProjectReferenceToRedirect(fileName);
188900
+ return program && program.getRedirectFromSourceFile(fileName);
188933
188901
  }
188934
188902
  /** @internal */
188935
188903
  forEachResolvedProjectReference(cb) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.9.0-pr-61739-2",
5
+ "version": "5.9.0-pr-61746-5",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [