UNPKG

@rimbu/graph

Version:

Immutable Graph data structures for TypeScript

24 lines (23 loc) 1.58 kB
import { type StreamSource } from '@rimbu/stream'; import type { ValuedGraphBase } from '@rimbu/graph/custom'; import type { ValuedGraphElement, WithGraphValues } from '../../common/index.mjs'; export interface ValuedGraphTypesContextImpl extends ValuedGraphBase.Types { readonly context: ValuedGraphContext<this['_N'], string>; } export declare class ValuedGraphContext<UN, TT extends string, Tp extends ValuedGraphTypesContextImpl = ValuedGraphTypesContextImpl> implements ValuedGraphBase.Context<UN, Tp> { readonly isDirected: boolean; readonly typeTag: TT; readonly linkMapContext: WithGraphValues<Tp, UN, any>['linkMapContext']; readonly linkConnectionsContext: WithGraphValues<Tp, UN, any>['linkConnectionsContext']; readonly _fixedType: UN; readonly _empty: any; constructor(isDirected: boolean, typeTag: TT, linkMapContext: WithGraphValues<Tp, UN, any>['linkMapContext'], linkConnectionsContext: WithGraphValues<Tp, UN, any>['linkConnectionsContext']); isNonEmptyInstance(source: any): source is WithGraphValues<Tp, UN, any>['nonEmpty']; readonly empty: <N extends UN, V>() => any; readonly from: any; readonly of: any; readonly builder: () => any; readonly reducer: <N extends UN, V>(source?: StreamSource<ValuedGraphElement<N, V>>) => any; createBuilder<N extends UN, V>(source?: WithGraphValues<Tp, N, V>['nonEmpty']): WithGraphValues<Tp, N, V>['builder']; createNonEmpty<N extends UN, V>(linkMap: WithGraphValues<Tp, N, V>['linkMapNonEmpty'], connectionSize: number): WithGraphValues<Tp, N, V>['nonEmpty']; }