export type Simplify = T extends Object ? { [K in keyof T]: T[K]; } : T; export type StringKeyOf = keyof T extends string ? keyof T : never; export type FunctionType

= (...p: P) => R; export type GraphFunctionID = string; export type GraphFunction = FunctionType>; export type GraphFunctions = { [name: GraphFunctionID]: GraphFunction; }; export type GraphNodeInput = T extends GraphFunction ? Input : never; export type GraphNodeOutput = T extends GraphFunction ? Output : never; export type GraphNodeID = string; export type GraphReference = { ref: ID; }; export type GraphInput = any; export declare function isGraphReference(value: unknown): value is GraphReference; export type GraphNode = StringKeyOf> = GraphNodeByTypeAndFunction; export type GraphNodeByTypeAndFunction = { type: Type; input: GraphInput[] & { [Index in keyof GraphNodeInput]: GraphNodeInput[Index] | GraphReference; }; }; export type Graph = { [id: GraphNodeID]: GraphNode>; }; export type StringKeysOfType = ({ [Key in keyof A]: A[Key] extends T ? (Key extends string ? Key : never) : never; })[keyof A]; export type ValuesOrReference = unknown[] & { [Key in keyof A]: A[Key] | GraphReference>; }; export declare function defineGraphFunctions(gf: GF): GF;