fix: fix a lot of declaration semantic errors (#7194)

This commit is contained in:
Joshua Chen 2022-04-17 23:44:20 +08:00 committed by GitHub
parent b154318c28
commit 7f06857e46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 61 deletions

View file

@ -8,14 +8,14 @@
// TODO Types provided by MDX 2.0 https://github.com/mdx-js/mdx/blob/main/packages/mdx/types/index.d.ts
declare module '@mdx-js/mdx' {
import type {Processor} from 'unified';
import type {RemarkOrRehypePlugin} from '@docusaurus/mdx-loader';
import type {MDXPlugin} from '@docusaurus/mdx-loader';
export type Options = {
filepath?: string;
skipExport?: boolean;
wrapExport?: string;
remarkPlugins?: RemarkOrRehypePlugin[];
rehypePlugins?: RemarkOrRehypePlugin[];
remarkPlugins?: MDXPlugin[];
rehypePlugins?: MDXPlugin[];
};
export function sync(content: string, options?: Options): string;
@ -23,6 +23,6 @@ declare module '@mdx-js/mdx' {
export function createCompiler(options?: Options): Processor;
export default function mdx(
content: string,
options?: mdx.Options,
options?: Options,
): Promise<string>;
}