@rimbu/graph
Version:
Immutable Graph data structures for TypeScript
21 lines (20 loc) • 1.11 kB
text/typescript
import type { ToJSON } from '@rimbu/common';
import { type StreamSource } from '@rimbu/stream';
import type { GraphTypesContextImpl } from '@rimbu/graph/custom';
import type { GraphBase, WithGraphValues } from '../../common/index.mjs';
import { GraphEmptyBase } from '../../common/index.mjs';
export declare class GraphEmpty<N, V, Tp extends GraphTypesContextImpl, TpG extends WithGraphValues<Tp, N, V> = WithGraphValues<Tp, N, V>> extends GraphEmptyBase implements GraphBase<N, Tp> {
readonly isDirected: boolean;
readonly context: TpG['context'];
_NonEmptyType: TpG['nonEmpty'];
constructor(isDirected: boolean, context: TpG['context']);
get linkMap(): TpG['linkMap'];
getConnectionsFrom(): TpG['linkConnections'];
addNode(node: N): TpG['nonEmpty'];
addNodes(nodes: StreamSource<N>): WithGraphValues<Tp, N, V>['nonEmpty'];
connect(node1: N, node2: N): TpG['nonEmpty'];
connectAll(links: StreamSource<WithGraphValues<Tp, N, V>['link']>): WithGraphValues<Tp, N, V>['nonEmpty'];
toString(): string;
toJSON(): ToJSON<any[]>;
toBuilder(): TpG['builder'];
}