export type GraphAttributes = Record; export interface KnowledgeGraphOptions { directed?: boolean; } export declare class KnowledgeGraph { readonly graph: GraphAttributes; readonly directed: boolean; private readonly nodeMap; private readonly edgeMap; private readonly successorMap; private readonly predecessorMap; constructor(options?: KnowledgeGraphOptions | boolean); private edgeKey; addNode(id: string, attributes: GraphAttributes): void; addEdge(source: string, target: string, attributes: GraphAttributes): void; isDirected(): boolean; hasNode(id: string): boolean; numberOfNodes(): number; numberOfEdges(): number; hasEdge(source: string, target: string): boolean; nodeIds(): string[]; nodeEntries(): Array<[string, GraphAttributes]>; edgeEntries(): Array<[string, string, GraphAttributes]>; neighbors(id: string): string[]; successors(id: string): string[]; predecessors(id: string): string[]; incidentNeighbors(id: string, limit?: number): string[]; degree(id: string): number; nodeAttributes(id: string): GraphAttributes; edgeAttributes(source: string, target: string): GraphAttributes; }