Skip to content

Commit

Permalink
Remove readonly annotation and comment instead
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Jan 6, 2025
1 parent 77d0144 commit 50153bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ export interface ModuleResolutionState {
host: ModuleResolutionHost;
compilerOptions: CompilerOptions;
traceEnabled: boolean;
readonly failedLookupLocations: string[] | undefined;
readonly affectingLocations: string[] | undefined;
failedLookupLocations: string[] | undefined;
affectingLocations: string[] | undefined;
resultFromCache?: ResolvedModuleWithFailedLookupLocations;
packageJsonInfoCache: PackageJsonInfoCache | undefined;
features: NodeResolutionFeatures;
Expand Down Expand Up @@ -2756,6 +2756,9 @@ function getLoadModuleFromTargetExportOrImport(extensions: Extensions, state: Mo
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key, combinedLookup);
traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
const result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, extensions, /*isConfigLookup*/ false, redirectedReference, state.conditions);
// Note: we cannot safely reassign `state.failedLookupLocations` during a request;
// `nodeModuleNameResolverWorker` relies on the `state` property remaining reference-equal
// to the one it initializes.
state.failedLookupLocations?.push(...result.failedLookupLocations ?? emptyArray);
state.affectingLocations?.push(...result.affectingLocations ?? emptyArray);
return toSearchResult(
Expand Down

0 comments on commit 50153bc

Please sign in to comment.