import { type Token } from '@rimbu/base'; import { OptLazy, OptLazyOr, type RelatedTo } from '@rimbu/common'; import { type StreamSource } from '@rimbu/stream'; import type { ValuedGraphTypesContextImpl } from '@rimbu/graph/custom'; import type { Link, WithGraphValues } from '../../common/index.cjs'; import { ValuedGraphElement } from '../../common/index.cjs'; export declare class ValuedGraphBuilder = WithGraphValues> { readonly isDirected: boolean; readonly context: TpG['context']; source?: TpG["nonEmpty"] | undefined; connectionSize: number; constructor(isDirected: boolean, context: TpG['context'], source?: TpG["nonEmpty"] | undefined); _linkMap?: TpG['linkMapBuilder']; _lock: number; checkLock(): void; get linkMap(): TpG['linkMapBuilder']; get isEmpty(): boolean; get nodeSize(): number; hasNode: (node: RelatedTo) => boolean; hasConnection: (node1: RelatedTo, node2: RelatedTo) => boolean; getValue: (node1: RelatedTo, node2: RelatedTo, otherwise?: OptLazy) => V | O; addNodeInternal: (node: N) => boolean; addNode: (node: N) => boolean; addNodes: (nodes: StreamSource) => boolean; removeNodeInternal: (node: RelatedTo) => boolean; removeNode: (node: RelatedTo) => boolean; removeNodes: (nodes: StreamSource>) => boolean; connectInternal: (node1: N, node2: N, value: V) => boolean; connect: (node1: N, node2: N, value: V) => boolean; connectAll: (connections: StreamSource) => boolean; addGraphElement: (element: ValuedGraphElement) => boolean; addGraphElements: (elements: StreamSource>) => boolean; modifyAt: (node1: N, node2: N, options: { ifNew?: OptLazyOr; ifExists?: ((value: V, remove: Token) => V | Token) | V; }) => boolean; disconnectInternal: (node1: RelatedTo, node2: RelatedTo) => boolean; disconnect: (node1: RelatedTo, node2: RelatedTo) => boolean; disconnectAll: (connections: StreamSource>>) => boolean; build: () => TpG["normal"]; buildMapValues: (mapFun: (value: V, node1: N, node2: N) => V2) => WithGraphValues["normal"]; }