UNPKG

fumadocs-mdx

Version:

The built-in source for Fumadocs

53 lines (52 loc) 1.42 kB
import { StructuredData } from "fumadocs-core/mdx-plugins"; import { VFile } from "vfile"; import { FC } from "react"; import { createProcessor } from "@mdx-js/mdx"; import { TOCItemType } from "fumadocs-core/toc"; import { MDXProps } from "mdx/types"; //#region src/loaders/mdx/build-mdx.d.ts type Processor = ReturnType<typeof createProcessor>; interface CompilerOptions { addDependency: (file: string) => void; } interface CompiledMDXProperties<Frontmatter = Record<string, unknown>> { frontmatter: Frontmatter; structuredData: StructuredData; toc: TOCItemType[]; default: FC<MDXProps>; /** * Enable from `postprocess` option. */ _markdown?: string; /** * Enable from `postprocess` option. */ _mdast?: string; } interface FumadocsDataMap { /** * [Fumadocs MDX] raw frontmatter, you can modify it */ frontmatter?: Record<string, unknown>; /** * [Fumadocs MDX] additional ESM exports to write */ 'mdx-export'?: { name: string; value: unknown; }[]; /** * [Fumadocs MDX] The compiler object from loader */ _compiler?: CompilerOptions; /** * [Fumadocs MDX] get internal processor, do not use this on user land. */ _getProcessor?: (format: 'md' | 'mdx') => Processor; } declare module 'vfile' { interface DataMap extends FumadocsDataMap {} } //#endregion export { CompiledMDXProperties as t }; //# sourceMappingURL=build-mdx-10MrLupc.d.ts.map