UNPKG

@langchain/core

Version:
1 lines 1.07 kB
{"version":3,"file":"callbacks.d.cts","names":["PQueueMod","getQueue","consumeCallback","T","Promise","awaitAllCallbacks"],"sources":["../../src/singletons/callbacks.d.ts"],"sourcesContent":["import PQueueMod from \"p-queue\";\nexport declare function getQueue(): PQueueMod<any, any>;\n/**\n * Consume a promise, either adding it to the queue or waiting for it to resolve\n * @param promiseFn Promise to consume\n * @param wait Whether to wait for the promise to resolve or resolve immediately\n */\nexport declare function consumeCallback<T>(promiseFn: () => Promise<T> | T | void, wait: boolean): Promise<void>;\n/**\n * Waits for all promises in the queue to resolve. If the queue is\n * undefined, it immediately resolves a promise.\n */\nexport declare function awaitAllCallbacks(): Promise<void>;\n//# sourceMappingURL=callbacks.d.ts.map"],"mappings":";;;;;;AAO0G;AAKlFK,iBALAH,eAKqBE,CAAAA,CAAAA,CAAAA,CAAAA,SAAO,EAAA,GAAA,GALQA,OAKR,CALgBD,CAKhB,CAAA,GALqBA,CAKrB,GAAA,IAAA,EAAA,IAAA,EAAA,OAAA,CAAA,EAL+CC,OAK/C,CAAA,IAAA,CAAA;;;;;iBAA5BC,iBAAAA,CAAAA,GAAqBD"}