Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class ModuleResolutionCache {
class ImpliedNodeFormatResolver {
private alreadyResolved = new FileMap<ReturnType<typeof ts.getModeForResolutionAtIndex>>();

constructor(private readonly tsSystem: ts.System) {}

resolve(
importPath: string,
importIdxInFile: number,
Expand Down Expand Up @@ -120,7 +122,7 @@ class ImpliedNodeFormatResolver {
sourceFile.impliedNodeFormat = ts.getImpliedNodeFormatForFile(
toVirtualSvelteFilePath(sourceFile.fileName) as any,
undefined,
ts.sys,
this.tsSystem,
compilerOptions
);
this.alreadyResolved.set(sourceFile.fileName, sourceFile.impliedNodeFormat);
Expand Down Expand Up @@ -186,7 +188,7 @@ export function createSvelteModuleLoader(
ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations
>();

const impliedNodeFormatResolver = new ImpliedNodeFormatResolver();
const impliedNodeFormatResolver = new ImpliedNodeFormatResolver(tsSystem);
const failedPathToContainingFile = new FileMap<FileSet>();
const failedLocationInvalidated = new FileSet();

Expand Down Expand Up @@ -266,7 +268,7 @@ export function createSvelteModuleLoader(
name,
containingFile,
compilerOptions,
ts.sys,
tsSystem,
tsModuleCache,
undefined,
mode
Expand Down