UNPKG

@langchain/langgraph

Version:

LangGraph

1 lines 2.11 kB
{"version":3,"file":"last_value.d.cts","names":["BaseChannel","LastValue","Value","LastValueAfterFinish"],"sources":["../../src/channels/last_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\n/**\n * Stores the last value received, can receive at most one value per step.\n *\n * Since `update` is only called once per step and value can only be of length 1,\n * LastValue always stores the last value of a single node. If multiple nodes attempt to\n * write to this channel in a single step, an error will be thrown.\n * @internal\n */\nexport declare class LastValue<Value> extends BaseChannel<Value, Value, Value> {\n lc_graph_name: string;\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [];\n fromCheckpoint(checkpoint?: Value): this;\n update(values: Value[]): boolean;\n get(): Value;\n checkpoint(): Value;\n isAvailable(): boolean;\n}\n/**\n * Stores the last value received, but only made available after finish().\n * Once made available, clears the value.\n */\nexport declare class LastValueAfterFinish<Value> extends BaseChannel<Value, Value, [\n Value,\n boolean\n]> {\n lc_graph_name: string;\n // value is an array so we don't misinterpret an update to undefined as no write\n value: [Value] | [];\n finished: boolean;\n fromCheckpoint(checkpoint?: [Value, boolean]): this;\n update(values: Value[]): boolean;\n get(): Value;\n checkpoint(): [Value, boolean] | undefined;\n consume(): boolean;\n finish(): boolean;\n isAvailable(): boolean;\n}\n"],"mappings":";;;;;;AASA;;;;;;AAIgCE,cAJXD,SAIWC,CAAAA,KAAAA,CAAAA,SAJcF,WAIdE,CAJ0BA,KAI1BA,EAJiCA,KAIjCA,EAJwCA,KAIxCA,CAAAA,CAAAA;eACbA,EAAAA,MAAAA;;OAEDA,EAAAA,CAJNA,KAIMA,CAAAA,GAAAA,EAAAA;gBAP4BF,CAAAA,UAAAA,CAAAA,EAIdE,KAJcF,CAAAA,EAAAA,IAAAA;iBAK3BE;EASEC,GAAAA,CAAAA,CAAAA,EARVD,KAQUC;EAAoB,UAAA,CAAA,CAAA,EAPvBD,KAOuB;aAA4BA,CAAAA,CAAAA,EAAAA,OAAAA;;;;;;AAU1DA,cAVUC,oBAUVD,CAAAA,KAAAA,CAAAA,SAV8CF,WAU9CE,CAV0DA,KAU1DA,EAViEA,KAUjEA,EAAAA,CATPA,KAUeA,SAXsCF;;;UAM7CE;;+BAEqBA;iBACdA;SACRA;iBACQA"}