Merge pull request #4253 from remcohaszing/export-mermaid-type

Define and export the Mermaid type
This commit is contained in:
Sidharth Vinod 2023-03-30 23:56:48 +05:30 committed by GitHub
commit 4d933f6b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,7 +392,7 @@ const render = (id: string, text: string, container?: Element): Promise<RenderRe
});
};
const mermaid: {
export interface Mermaid {
startOnLoad: boolean;
parseError?: ParseErrorFunction;
mermaidAPI: typeof mermaidAPI;
@ -405,7 +405,9 @@ const mermaid: {
contentLoaded: typeof contentLoaded;
setParseErrorHandler: typeof setParseErrorHandler;
detectType: typeof detectType;
} = {
}
const mermaid: Mermaid = {
startOnLoad: true,
mermaidAPI,
parse,