package.dist.Diagram.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
The newest version!
import type { DetailedError } from './utils.js';
import type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';
export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;
/**
* An object representing a parsed mermaid diagram definition.
* @privateRemarks This is exported as part of the public mermaidAPI.
*/
export declare class Diagram {
type: string;
text: string;
db: DiagramDefinition['db'];
parser: DiagramDefinition['parser'];
renderer: DiagramDefinition['renderer'];
static fromText(text: string, metadata?: Pick): Promise;
private constructor();
render(id: string, version: string): Promise;
getParser(): import("./diagram-api/types.js").ParserDefinition;
getType(): string;
}