mdx-mermaid
Version:
Display mermaid diagrams in mdx files.
16 lines (15 loc) • 480 B
TypeScript
/**
* Copyright (c) Samuel Wall.
*
* This source code is licensed under the MIT license found in the
* license file in the root directory of this source tree.
*/
import type { Parent } from 'unist';
import type { Config } from './config.model';
/**
* mdx-mermaid plugin.
*
* @param config Config passed in from parser.
* @returns Function to transform mdxast.
*/
export default function plugin(config?: Config): ((ast: any) => Promise<Parent>) | ((ast: any) => Parent);