import type ts from 'typescript/lib/tsserverlibrary'; import { ConfigManager } from './config-manager'; import { Logger } from './logger'; import { SvelteSnapshotManager } from './svelte-snapshots'; /** * Creates a module loader than can also resolve `.svelte` files. * * The typescript language service tries to look up other files that are referenced in the currently open svelte file. * For `.ts`/`.js` files this works, for `.svelte` files it does not by default. * Reason: The typescript language service does not know about the `.svelte` file ending, * so it assumes it's a normal typescript file and searches for files like `../Component.svelte.ts`, which is wrong. * In order to fix this, we need to wrap typescript's module resolution and reroute all `.svelte.ts` file lookups to .svelte. */ export declare function patchModuleLoader(logger: Logger, snapshotManager: SvelteSnapshotManager, typescript: typeof ts, lsHost: ts.LanguageServiceHost, project: ts.server.Project, configManager: ConfigManager): { dispose: () => void; };