Skip to content

@graphty/graphty-element / index / registerSource

Function: registerSource() ​

registerSource<P>(source): void

Defined in: graph-io/dist/src/registry.d.ts:838

Register a network source in the default registry, so loadFromSource() and graphty-element find it by id. Throws an ImportError with E_SOURCE_INVALID for a malformed source or an id already taken. Experimental.

Type Parameters ​

P ​

P

Parameters ​

source ​

GraphSource<P> | LazySource

the source, or a lazy source that loads its code on first use

Returns ​

void