@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
27 lines • 1.16 kB
text/typescript
import type { TypesMeta } from "../loadServerTypesMeta/index.mjs";
import { type OrganizeTypesResult } from "./organizeTypesByExport.mjs";
import type { OrderingConfig } from "./order.mjs";
/**
* Common data returned by both syncTypes and loadServerTypesText.
* This is the shared contract consumed by loadServerTypes.
*/
export interface TypesSourceData extends OrganizeTypesResult<TypesMeta> {
/** External types discovered in the file */
externalTypes: Record<string, string>;
/**
* Type name map (merged across all variants).
* Maps flat names (like "AccordionTriggerState") to dotted names (like "Accordion.Trigger.State").
*/
typeNameMap: Record<string, string>;
/** All dependencies that should be watched for changes */
allDependencies: string[];
/** Whether the types.md file was updated (false if loaded from existing file) */
updated: boolean;
}
/**
* Load and parse a types.md file into TypesMeta[].
*
* @param fileUrl - file:// URL to the types.md file
* @returns Parsed types and external types
*/
export declare function loadServerTypesText(fileUrl: string, ordering?: OrderingConfig): Promise<TypesSourceData>;