UNPKG

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