gatsby-plugin-mdx
Version:
MDX integration for Gatsby
22 lines (21 loc) • 892 B
TypeScript
import type { ProcessorOptions } from "@mdx-js/mdx";
import type { GatsbyCache, NodePluginArgs, PluginOptions, Store } from "gatsby";
import type { IPluginInfo } from "gatsby-plugin-utils/types";
export interface IMdxPluginOptions {
extensions: [string];
mdxOptions: ProcessorOptions;
gatsbyRemarkPlugins?: [IPluginInfo];
}
interface IHelpers {
getNode: NodePluginArgs["getNode"];
getNodesByType: NodePluginArgs["getNodesByType"];
pathPrefix: NodePluginArgs["pathPrefix"];
reporter: NodePluginArgs["reporter"];
cache: GatsbyCache;
store: Store;
}
type MdxDefaultOptions = (pluginOptions: PluginOptions) => IMdxPluginOptions;
export declare const defaultOptions: MdxDefaultOptions;
type EnhanceMdxOptions = (pluginOptions: PluginOptions, helpers: IHelpers) => Promise<ProcessorOptions>;
export declare const enhanceMdxOptions: EnhanceMdxOptions;
export {};