effect-io-ai

Package: effect
Module: Graph

Graph.MermaidDiagramType

Mermaid diagram types for different visualization formats.

Details

Specifies the Mermaid diagram syntax to use:

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"

Source

Since v3.18.0