{"version":3,"file":"named_barrier_value.d.ts","names":["BaseChannel","areSetsEqual","T","Set","NamedBarrierValue","Value","NamedBarrierValueAfterFinish"],"sources":["../../src/channels/named_barrier_value.d.ts"],"sourcesContent":["import { BaseChannel } from \"./base.js\";\nexport declare const areSetsEqual: <T>(a: Set<T>, b: Set<T>) => boolean;\n/**\n * A channel that waits until all named values are received before making the value available.\n *\n * This ensures that if node N and node M both write to channel C, the value of C will not be updated\n * until N and M have completed updating.\n */\nexport declare class NamedBarrierValue<Value> extends BaseChannel<void, Value, Value[]> {\n    lc_graph_name: string;\n    names: Set<Value>; // Names of nodes that we want to wait for.\n    seen: Set<Value>;\n    constructor(names: Set<Value>);\n    fromCheckpoint(checkpoint?: Value[]): this;\n    update(values: Value[]): boolean;\n    // If we have not yet seen all the node names we want to wait for,\n    // throw an error to prevent continuing.\n    get(): void;\n    checkpoint(): Value[];\n    consume(): boolean;\n    isAvailable(): boolean;\n}\n/**\n * A channel that waits until all named values are received before making the value ready to be made available.\n * It is only made available after finish() is called.\n * @internal\n */\nexport declare class NamedBarrierValueAfterFinish<Value> extends BaseChannel<void, Value, [\n    Value[],\n    boolean\n]> {\n    lc_graph_name: string;\n    names: Set<Value>; // Names of nodes that we want to wait for.\n    seen: Set<Value>;\n    finished: boolean;\n    constructor(names: Set<Value>);\n    fromCheckpoint(checkpoint?: [Value[], boolean]): this;\n    update(values: Value[]): boolean;\n    get(): void;\n    checkpoint(): [Value[], boolean];\n    consume(): boolean;\n    finish(): boolean;\n    isAvailable(): boolean;\n}\n"],"mappings":";;;;;AAQA;;;;;AAEWG,cAFUC,iBAEVD,CAAAA,KAAAA,CAAAA,SAF2CH,WAE3CG,CAAAA,IAAAA,EAF6DE,KAE7DF,EAFoEE,KAEpEF,EAAAA,CAAAA,CAAAA;eACGE,EAAAA,MAAAA;OAAJF,EADCA,GACDA,CADKE,KACLF,CAAAA,CAAAA,CAAAA;MACiBE,EADjBF,GACiBE,CADbA,KACaA,CAAAA;aAAJF,CAAAA,KAAAA,EAAAA,GAAAA,CAAIE,KAAJF,CAAAA;gBACSE,CAAAA,UAAAA,CAAAA,EAAAA,KAAAA,EAAAA,CAAAA,EAAAA,IAAAA;QACbA,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,CAAAA,EAAAA,OAAAA;;;;EAaEC,UAAAA,CAAAA,CAAAA,EATHD,KASGC,EAAAA;EAA4B,OAAA,CAAA,CAAA,EAAA,OAAA;aAAkCD,CAAAA,CAAAA,EAAAA,OAAAA;;;;;;;AAQ5DF,cARFG,4BAQEH,CAAAA,KAAAA,CAAAA,SAR0CH,WAQ1CG,CAAAA,IAAAA,EAR4DE,KAQ5DF,EAAAA,CAPnBE,KAQ6BA,EAAAA,SACdA;eAV8CL,EAAAA,MAAAA;SAKtDG,IAAIE;QACLF,IAAIE;;qBAESF,IAAIE;+BACMA;iBACdA;;iBAEAA"}