mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
fix: apply new types to the Mermaid API
This commit is contained in:
parent
17ff584d15
commit
4b31112bcb
@ -8,6 +8,7 @@ import utils from './utils';
|
||||
import { mermaidAPI } from './mermaidAPI';
|
||||
import { addDetector } from './diagram-api/detectType';
|
||||
import { isDetailedError } from './utils';
|
||||
import { ParseErrorFunction } from './Diagram';
|
||||
|
||||
/**
|
||||
* ## init
|
||||
@ -62,7 +63,7 @@ const init = async function (
|
||||
log.warn(e.str);
|
||||
}
|
||||
if (mermaid.parseError) {
|
||||
mermaid.parseError(e);
|
||||
mermaid.parseError(e as string);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -212,8 +213,7 @@ const parse = (txt: string) => {
|
||||
const mermaid: {
|
||||
startOnLoad: boolean;
|
||||
diagrams: any;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
parseError?: Function;
|
||||
parseError?: ParseErrorFunction;
|
||||
mermaidAPI: typeof mermaidAPI;
|
||||
parse: typeof parse;
|
||||
render: typeof mermaidAPI.render;
|
||||
|
Loading…
x
Reference in New Issue
Block a user