Skip to content
PACKAGES

restoreRegistry()

Merge restore registry entries into a duplicate-checking Map.

import { restoreRegistry } from "@graphrefly/ts/operators";
function restoreRegistry(
entries: readonly GraphRestoreEntry[] = [],
base?: GraphRestoreRegistry,
): Map<string, GraphRestoreEntry>
ParameterTypeDescription
entriesreadonly GraphRestoreEntry[]Additional restore entries to add.
baseGraphRestoreRegistryOptional base registry to copy from.

A Map keyed by restore ref.

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

packages/ts/src/graph/operators.ts