UNPKG

528 BTypeScriptView Raw
1/**
2 * Determines whether the given async-iterable is empty.
3 *
4 * @export
5 * @template T The type of elements in the source sequence.
6 * @param {AsyncIterable<T>} source The source async-iterable to determine whether it is empty.
7 * @param {AbortSignal} [signal] An optional abort signal to cancel the operation.
8 * @returns {Promise<boolean>} Returns a promise containing true if the sequence is empty, otherwise false.
9 */
10export declare function isEmpty<T>(source: AsyncIterable<T>, signal?: AbortSignal): Promise<boolean>;