mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +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 { mermaidAPI } from './mermaidAPI';
|
||||||
import { addDetector } from './diagram-api/detectType';
|
import { addDetector } from './diagram-api/detectType';
|
||||||
import { isDetailedError } from './utils';
|
import { isDetailedError } from './utils';
|
||||||
|
import { ParseErrorFunction } from './Diagram';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## init
|
* ## init
|
||||||
@ -62,7 +63,7 @@ const init = async function (
|
|||||||
log.warn(e.str);
|
log.warn(e.str);
|
||||||
}
|
}
|
||||||
if (mermaid.parseError) {
|
if (mermaid.parseError) {
|
||||||
mermaid.parseError(e);
|
mermaid.parseError(e as string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -212,8 +213,7 @@ const parse = (txt: string) => {
|
|||||||
const mermaid: {
|
const mermaid: {
|
||||||
startOnLoad: boolean;
|
startOnLoad: boolean;
|
||||||
diagrams: any;
|
diagrams: any;
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
parseError?: ParseErrorFunction;
|
||||||
parseError?: Function;
|
|
||||||
mermaidAPI: typeof mermaidAPI;
|
mermaidAPI: typeof mermaidAPI;
|
||||||
parse: typeof parse;
|
parse: typeof parse;
|
||||||
render: typeof mermaidAPI.render;
|
render: typeof mermaidAPI.render;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user