mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 00:40:22 +02:00
fix(types): improve mermaid.parse types
It looks like
8873ffca1
(chore: Overload parse type to be more specific., 2023-12-08)
got overwritten in the merge from Mermaid v11.
This commit is contained in:
@@ -340,10 +340,7 @@ const executeQueue = async () => {
|
|||||||
* // throws Error
|
* // throws Error
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
const parse = async (
|
const parse: typeof mermaidAPI.parse = async (text, parseOptions) => {
|
||||||
text: string,
|
|
||||||
parseOptions?: ParseOptions
|
|
||||||
): Promise<boolean | void | ParseResult> => {
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// This promise will resolve when the render call is done.
|
// This promise will resolve when the render call is done.
|
||||||
// It will be queued first and will be executed when it is first in line
|
// It will be queued first and will be executed when it is first in line
|
||||||
|
Reference in New Issue
Block a user