Package: effect
Module: Graph
Mermaid diagram types for different visualization formats.
Details
Specifies the Mermaid diagram syntax to use:
flowchart: For directed graphs with arrows (A --> B)graph: For undirected graphs with lines (A --- B)When not specified, automatically selects based on graph type: directed graphs use “flowchart”, undirected graphs use “graph”.
Example (Selecting Mermaid diagram types)
import type { Graph } from "effect"
// Force flowchart format (even for undirected graphs)
const flowchartOptions: Graph.MermaidOptions<string, string> = {
diagramType: "flowchart"
}
// Force graph format (shows undirected connections)
const graphOptions: Graph.MermaidOptions<string, string> = {
diagramType: "graph"
}
// Auto-detection (recommended, default behavior)
const autoOptions: Graph.MermaidOptions<string, string> = {}
Signature
type MermaidDiagramType = | "flowchart" // For directed graphs
| "graph"
Since v3.18.0