UNPKG

@langchain/core

Version:
1 lines 1.04 kB
{"version":3,"file":"signal.d.cts","names":["raceWithSignal","T","Promise","AbortSignal","getAbortSignalError","Error"],"sources":["../../src/utils/signal.d.ts"],"sourcesContent":["/**\n * Race a promise with an abort signal. If the signal is aborted, the promise will\n * be rejected with the error from the signal. If the promise is rejected, the signal will be aborted.\n *\n * @param promise - The promise to race.\n * @param signal - The abort signal.\n * @returns The result of the promise.\n */\nexport declare function raceWithSignal<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;\n/**\n * Get the error from an abort signal. Since you can set the reason to anything,\n * we have to do some type gymnastics to get a proper error message.\n *\n * @param signal - The abort signal.\n * @returns The error from the abort signal.\n */\nexport declare function getAbortSignalError(signal?: AbortSignal): Error;\n//# sourceMappingURL=signal.d.ts.map"],"mappings":";;AAQA;;;;;;AAA6F;iBAArEA,2BAA2BE,QAAQD,aAAaE,cAAcD,QAAQD"}