import type { LanguagePlugin } from "@volar/language-core"; import type { MdxTsOptions } from "./options.js"; /** * Marks the start of the injected frontmatter value-validation block in the * generated code. The `scoped` language-features mode uses it to recognize YAML * frontmatter positions (which map into this block, not onto a `frontmatter.` * expression) as in-scope for hover/definition. */ export declare const FRONTMATTER_SCOPE_SENTINEL = "/*mdx-tsc-fm*/"; export interface MdxTsPluginHostOptions { /** * Whether to translate MDX parse errors into TypeScript diagnostics. On for * the CLI; off for the language server, where the official MDX extension's * service already reports parse errors (avoids duplicate diagnostics). */ surfaceParseErrors?: boolean; } /** * Build the MDX language plugin used for a program: the upstream * `@mdx-js/language-service` plugin, extended with frontmatter typing. * * The frontmatter plugin needs the current file to match schema globs, but the * upstream `VirtualCodePlugin` contract passes no filename. We bridge that by * wrapping `createVirtualCode` to record the file in a closure variable that the * plugin reads during `finalize()` — sound because upstream instantiates and * runs plugins synchronously within `createVirtualCode`. */ export declare function createMdxTsLanguagePlugin(options: MdxTsOptions, host?: MdxTsPluginHostOptions): LanguagePlugin;