import type * as ts from "typescript"; /** * Options mdx-tsc derives for each program, sourced from the user's tsconfig. * * `checkMdx` and the `mdx-tsc` block are non-standard top-level tsconfig keys * that TypeScript discards when it parses compiler options, so we read them * from the raw config file ourselves. */ export interface MdxTsOptions { /** JSX import source, e.g. `react`. From `compilerOptions.jsxImportSource`. */ jsxImportSource: string; /** Glob -> `./file#Type` frontmatter schema references. From `"mdx".frontmatter`. */ frontmatter: FrontmatterSchemaEntry[]; } export interface FrontmatterSchemaEntry { /** The original glob, as written in tsconfig (relative to the config dir). */ glob: string; /** Absolute glob used for matching MDX file paths. */ absoluteGlob: string; /** Absolute path to the module declaring the frontmatter type. */ module: string; /** Exported type name within that module. */ typeName: string; } /** * Resolve mdx-tsc options for a program. `configFilePath` is set by TypeScript * whenever the program originates from a tsconfig (both `-p foo` and default * discovery); we fall back to the compiler defaults when it is absent. */ export declare function resolveMdxTsOptions(programOptions: ts.CreateProgramOptions): MdxTsOptions; /** * Resolve options directly from a tsconfig path (used by the language server, * which is handed the config file name rather than a program). */ export declare function resolveMdxTsOptionsFromConfig(configFilePath: string | undefined, jsxImportSource: string | undefined): MdxTsOptions;