import type { FileGetter, ManifestImporter, ModuleInfo } from '../moduleTypes'; /** * Options for resolving modules given a path */ export interface ImportResolutionOptions { /** * If `null`, the resolver will only match exact files * Otherwise, the resolver will first try to match an exact path, * then paths ending with the given extensions * * For the given path: `./a`, `null` will only match `./a` * Otherwise, providing an array like :`['js', 'ts']` will try * match `./a`, `./a.js` and then `./a.ts` */ extensions: string[] | null; /** * Custom importer for the modules manifest. Set to `undefined` to use the default importer. */ manifestImporter?: ManifestImporter; } export declare const defaultResolutionOptions: ImportResolutionOptions; export type ResolverResult = ({ type: 'source'; } & ModuleInfo) | { type: 'local'; absPath: string; contents: string; }; /** * Resolve a relative module path to an absolute path. */ export default function resolveFile(fromPath: string, toPath: string, fileGetter: FileGetter, options?: Partial): Promise;