Skip to content

Instantly share code, notes, and snippets.

@ecklf
Last active September 24, 2021 21:50
Show Gist options
  • Save ecklf/cf47753c09db656489fa2a47290cf89f to your computer and use it in GitHub Desktop.
Save ecklf/cf47753c09db656489fa2a47290cf89f to your computer and use it in GitHub Desktop.
@mdx/js type defs
declare module "*.mdx" {
let MDXComponent: (props: any) => JSX.Element;
export default MDXComponent;
export const frontMatter: FrontMatter[];
}
declare module "@mdx-js/react" {
import * as React from "react";
type ComponentType =
| "a"
| "blockquote"
| "code"
| "delete"
| "em"
| "h1"
| "h2"
| "h3"
| "h4"
| "h5"
| "h6"
| "hr"
| "img"
| "inlineCode"
| "li"
| "ol"
| "p"
| "pre"
| "pre.code"
| "strong"
| "sup"
| "table"
| "td"
| "thematicBreak"
| "tr"
| "ul";
export type Components = {
[key in ComponentType]?: React.ComponentType<{
className: string;
children: React.ReactNode;
}>;
};
export interface MDXProviderProps {
children: React.ReactNode;
components: Components;
}
export class MDXProvider extends React.Component<MDXProviderProps> {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment