import type { RawSourceMap } from "source-map"; import type { TransformOptions } from "./types.js"; /** * Transforms a module and returns the transformed code with source map attached. * This is used by the loader to transform modules and attach source maps. * * @returns The transformed code with source map attached as a URL comment */ export type TransformModuleIfNeededFn = (source: string, moduleId: string, options: TransformOptions) => Promise<{ code: string; map: RawSourceMap | null; }>; /** * Transforms a module using acorn-loose for parsing. * @returns Object containing the transformed code and its source map */ export declare const transformModuleIfNeeded: TransformModuleIfNeededFn; //# sourceMappingURL=transformModuleIfNeeded.d.ts.map