Skip to content

@graphty/graphty-element / index / AdHocData

Type Alias: AdHocData<KeyType> ​

AdHocData<KeyType> = Record<KeyType, any> & object

Defined in: graphty-element/src/config/common.ts:13

A record the element ingests: a node's or an edge's keys and values, as a reader yields them.

Any plain object is one. The brand is optional, so a reader can yield { id: "a" } straight from sourceFetchData() with no cast and no helper; DataSource.toRecord still works and is no longer needed.

Type Declaration ​

__brand? ​

readonly optional __brand?: "AdHocData"

Type Parameters ​

KeyType ​

KeyType extends string | number = string