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