From c8381d0fca59b9b6c48b6d4db762ee73fdc15580 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 16 Sep 2024 15:59:03 +0530 Subject: [PATCH] fix: ParseResult type --- packages/mermaid/src/types.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mermaid/src/types.ts b/packages/mermaid/src/types.ts index 9e3d87738..7712dc231 100644 --- a/packages/mermaid/src/types.ts +++ b/packages/mermaid/src/types.ts @@ -59,20 +59,20 @@ export interface ParseOptions { export interface ParseResult { success: boolean; - + /** + * The mermaid code after extracting the config. + */ code: string; - /** * The config passed as YAML frontmatter or directives */ config: MermaidConfig; - title?: string; - /** - * The diagram AST - * - */ diagram?: Diagram; + /** + * The error that occurred during parsing, if any. + */ + error?: unknown; } // This makes it clear that we're working with a d3 selected element of some kind, even though it's hard to specify the exact type.