GraphReFlyTS

API Reference

restoreRegistry()

Merge restore registry entries into a duplicate-checking Map.

Import

import { restoreRegistry } from "@graphrefly/ts/operators";

Signature

function restoreRegistry(
	entries: readonly GraphRestoreEntry[] = [],
	base?: GraphRestoreRegistry,
): Map<string, GraphRestoreEntry>

Parameters

ParameterTypeDescription
entriesreadonly GraphRestoreEntry[]Additional restore entries to add.
baseGraphRestoreRegistryOptional base registry to copy from.

Returns

A Map keyed by restore ref.

Example

restoreRegistry([define("trim", (value: string) => value.trim())]);

Source

packages/ts/src/graph/operators.ts