UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

32 lines 1.49 kB
import type ts from 'typescript'; export interface ResolveLibrarySourceFilesOptions { /** Map from variant name to file URL (file:// protocol) */ variants: Record<string, string>; /** Filesystem path to the resource being loaded */ resourcePath: string; /** File URL to the webpack root context (file:// protocol, must end with /) */ rootContextDirUrl: string; tsconfigPaths?: ts.MapLike<string[]>; /** Base path for resolving tsconfig paths (must end with /) */ pathsBaseDir?: string; watchSourceDirectly?: boolean; } export interface ResolveLibrarySourceFilesResult { /** Map from variant name to resolved file URL (file:// protocol) */ resolvedVariantMap: Map<string, string>; } /** * Resolves library source file paths to their actual file system locations. * * Handles three types of library imports: * 1. Relative paths - files within the project root * 2. Path-mapped imports - imports resolved through tsconfig paths * 3. External library imports - imports resolved through node module resolution * * For external libraries with watchSourceDirectly enabled, follows source maps * to find the original TypeScript source files instead of declaration files. * * If watchSourceDirectly is not explicitly provided, it will be automatically * determined based on whether any variants use tsconfig path aliases. */ export declare function resolveLibrarySourceFiles(options: ResolveLibrarySourceFilesOptions): Promise<ResolveLibrarySourceFilesResult>;