API Reference
describeToD2()
Render a D39 describe snapshot as D2 diagram text.
Import
import { describeToD2 } from "@graphrefly/ts/graph";
Signature
function describeToD2(
snapshot: DescribeSnapshot,
opts: DescribeToD2Options = {},
): string
Parameters
| Parameter | Type | Description |
|---|---|---|
snapshot | DescribeSnapshot | snapshot value used by the helper. |
opts | DescribeToD2Options | Options that configure the helper. |
Returns
A string value.
Example
import { describeToD2 } from "@graphrefly/ts/graph";
Source
packages/ts/src/graph/render.ts