@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
9 lines • 497 B
TypeScript
/**
* Rewrites relative imports in source code based on a provided mapping.
* Converts imports like '../utils/helper' or './components/Button' to their mapped equivalents
*
* @param source - The source code to process
* @param importPathMapping - Map from original import paths to new import paths (without extensions)
* @returns The source code with rewritten imports
*/
export declare function rewriteImportsToSameDirectory(source: string, importPathMapping: Map<string, string>): string;