import { Edge, Graph, NodysseusNode, Runnable, Lib, Env, Args, SavedGraph, FullyTypedArg } from "./types.js"; export declare const WRAPPED_KIND = "wrapped"; type WrappedKind = "wrapped"; export declare const ispromise: (a: any) => a is Promise; export declare const isWrappedPromise: (a: any) => a is WrappedPromise; export declare const isgraph: (g: any) => boolean; export type WrappedPromise = { __kind: WrappedKind; then: (fn: (t: FlattenPromise) => S | WrappedPromise) => WrappedPromise; value: T; }; type FlattenWrappedPromise = T extends WrappedPromise ? Item : T; export declare const wrapPromise: (t: T | PromiseLike, c?: (e?: E) => S) => WrappedPromise>; export declare const wrapPromiseAll: (wrappedPromises: (T | WrappedPromise)[], c?: (e: E) => T) => WrappedPromise | Promise>>; export declare const wrapPromiseReduce: (previousValue: any, arr: any, fn: any, index: any) => any; export type IfPromise = T extends Promise ? S : Promise; export type FlattenPromise = T extends Promise ? Item : T; export declare class NodysseusError extends Error { cause: { node_id: string; }; constructor(node_id: any, ...params: any[]); } export declare const base_node: (node: any) => { id: any; value: any; name: any; nodes: any; edges: any; edges_in: any; out: any; description: any; } | { id: any; value: any; name: any; ref: any; }; export declare const base_graph: (graph: any) => { id: any; value: any; name: any; nodes: any; edges: any; edges_in: any; out: any; description: any; }; export declare const create_randid: (graph: Graph) => any; type FlattenedGraph = { flat_nodes: Record; flat_edges: Record; }; export declare const flattenNode: (graph: NodysseusNode, levels?: number) => FlattenedGraph | NodysseusNode; export declare const expand_node: (data: { nolib: Record; node_id: string; editingGraph: Graph; }) => { editingGraph: Graph; selected: Array; }; export declare const contract_node: (data: { editingGraph: Graph; node_id: string; nolib: any; }, keep_expanded?: boolean) => { editingGraph: Graph; selected: string[]; } | { selected: string[]; editingGraph?: undefined; }; export declare const parseArg: (arg: string) => FullyTypedArg & { name: string; }; export declare const ancestor_graph: (node_id: string, from_graph: Graph | SavedGraph, nolib?: Record) => Graph; export declare const descendantGraph: (nodeId: string, graph: Graph, traverse: (nodeId: string, edgeIn: Edge) => T) => Record; export declare const newEnv: (data: Args, _output?: any, env?: Env) => Env; export declare const combineEnv: (data: Args, env: Env, node_id?: string, _output?: string) => Env; export declare const mergeEnv: (data: Args, env: Env) => Env; export declare const newLib: (data: any) => Lib; export declare const mergeLib: (a: Record | Lib, b: Lib) => Lib; export declare const runnableId: (runnable: Runnable) => string | false; export declare function compareObjects(value1: any, value2: any, isUpdate?: boolean, excludedFields?: Set): boolean; export declare function set_mutable(obj: any, propsArg: any, value: any): boolean; export declare const bfs: (graph: Graph, fn: any) => (id: any, level: any) => void; export declare const handleError: (e: any, lib: any, graph: any, node: any, graphid: any) => any; export declare const appendGraphId: (graphId: string, nodeId: string) => string; export {};