import type { Store, StoreEntry, StoreRecordError, StoreLink } from './interfaces/Store'; import type { NormalizedKeyMetadata } from './main'; export declare function isGraphNode(node: ProxyGraphNode): node is GraphNode; declare enum GraphNodeType { Link = "Link", Node = "Node", Error = "Error", Locked = "Locked" } export declare class GraphNodeError { store: Store; data: StoreRecordError; type: GraphNodeType.Error; constructor(store: Store, data: StoreRecordError); retrieve(): StoreRecordError; } export declare class GraphLink { store: Store; data: StoreLink; type: GraphNodeType.Link; constructor(store: Store, data: StoreLink); isPending(): boolean; isMissing(): boolean; follow(): GraphNode | GraphNodeError | null; linkData(): S | undefined; writeLinkData(data: S): void; } export declare class GraphNode { store: Store; data: N; storeKey: string | NormalizedKeyMetadata; type: GraphNodeType.Node; constructor(store: Store, data: Extract, N>, storeKey: string | NormalizedKeyMetadata); object(propertyName: K): GraphNode[K]>; link(propertyName: keyof N): GraphLink; scalar(propertyName: K): N[K]; keys(): K[]; isScalar(propertyName: K): boolean; isMissing(propertyName: K): boolean; isPending(propertyName: K): boolean; write(propertyName: K, value: N[K]): void; isUndefined(propertyName: K): boolean; retrieve(): N; } export type ProxyGraphNode = GraphNode | GraphNodeError | null; export {};