mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 16:59:48 +02:00
Define and export the Mermaid type
This represents the type of the default export. This is useful when it’s being passed around or declared as a global.
This commit is contained in:
@@ -392,7 +392,7 @@ const render = (id: string, text: string, container?: Element): Promise<RenderRe
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const mermaid: {
|
export interface Mermaid {
|
||||||
startOnLoad: boolean;
|
startOnLoad: boolean;
|
||||||
parseError?: ParseErrorFunction;
|
parseError?: ParseErrorFunction;
|
||||||
mermaidAPI: typeof mermaidAPI;
|
mermaidAPI: typeof mermaidAPI;
|
||||||
@@ -405,7 +405,9 @@ const mermaid: {
|
|||||||
contentLoaded: typeof contentLoaded;
|
contentLoaded: typeof contentLoaded;
|
||||||
setParseErrorHandler: typeof setParseErrorHandler;
|
setParseErrorHandler: typeof setParseErrorHandler;
|
||||||
detectType: typeof detectType;
|
detectType: typeof detectType;
|
||||||
} = {
|
}
|
||||||
|
|
||||||
|
const mermaid: Mermaid = {
|
||||||
startOnLoad: true,
|
startOnLoad: true,
|
||||||
mermaidAPI,
|
mermaidAPI,
|
||||||
parse,
|
parse,
|
||||||
|
Reference in New Issue
Block a user