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
| Parameter | Type | Description |
|---|---|---|
entries | readonly GraphRestoreEntry[] | Additional restore entries to add. |
base | GraphRestoreRegistry | Optional 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