GraphReFlyTS

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

ParameterTypeDescription
snapshotDescribeSnapshotsnapshot value used by the helper.
optsDescribeToD2OptionsOptions that configure the helper.

Returns

A string value.

Example

import { describeToD2 } from "@graphrefly/ts/graph";

Source

packages/ts/src/graph/render.ts