mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-26 13:08:58 +02:00
* refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type * fix
28 lines
935 B
TypeScript
28 lines
935 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
// 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';
|
|
|
|
export type Options = {
|
|
filepath?: string;
|
|
skipExport?: boolean;
|
|
wrapExport?: string;
|
|
remarkPlugins?: RemarkOrRehypePlugin[];
|
|
rehypePlugins?: RemarkOrRehypePlugin[];
|
|
};
|
|
|
|
export function sync(content: string, options?: Options): string;
|
|
export function createMdxAstCompiler(options?: Options): Processor;
|
|
export function createCompiler(options?: Options): Processor;
|
|
export default function mdx(
|
|
content: string,
|
|
options?: mdx.Options,
|
|
): Promise<string>;
|
|
}
|