UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

31 lines 1.01 kB
import type { Externals } from "../../CodeHighlighter/types.js"; export interface FactoryOptions { name?: string; slug?: string; skipPrecompute?: boolean; precompute?: any; } export interface ParsedCreateFactory { functionName: string; url: string; variants: Record<string, string>; namedExports: Record<string, string | undefined>; options: FactoryOptions; fullMatch: string; variantsObjectStr: string; optionsObjectStr: string; hasOptions: boolean; hasPrecompute: boolean; precomputeValue?: any; externals: Externals; live: boolean; precomputeKeyStart?: number; precomputeValueStart?: number; precomputeValueEnd?: number; } /** * Parses a file to extract a single create* factory call and its variants and options * Only supports one create* call per file - will throw an error if multiple are found * Returns null if no create* call is found */ export declare function parseCreateFactoryCall(code: string, filePath: string): Promise<ParsedCreateFactory | null>;