From 0a355968c4a2219a448cd3d19d40d7b8bc745731 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Fri, 27 Sep 2024 01:05:23 +0900 Subject: [PATCH] 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. --- packages/mermaid/src/mermaid.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index 6febfdb2b..fba307223 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -340,10 +340,7 @@ const executeQueue = async () => { * // throws Error * ``` */ -const parse = async ( - text: string, - parseOptions?: ParseOptions -): Promise => { +const parse: typeof mermaidAPI.parse = async (text, parseOptions) => { return new Promise((resolve, reject) => { // 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