withCancel.d.cts 438 B

123
  1. export declare function getAsyncIteratorWithCancel<T, TReturn = any>(asyncIterator: AsyncIterator<T>, onCancel: (value?: TReturn) => void | Promise<void>): AsyncIterator<T>;
  2. export declare function getAsyncIterableWithCancel<T, TAsyncIterable extends AsyncIterable<T>, TReturn = any>(asyncIterable: TAsyncIterable, onCancel: (value?: TReturn) => void | Promise<void>): TAsyncIterable;
  3. export { getAsyncIterableWithCancel as withCancel };