UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

19 lines (17 loc) 576 B
import { AsyncIterableX } from './asynciterablex.js'; import { throwIfAborted } from '../aborterror.js'; class EmptyAsyncIterable extends AsyncIterableX { async *[Symbol.asyncIterator](signal) { throwIfAborted(signal); } } /** * Returns an empty async-iterable sequence. * * @template TSource The type used for the async-iterable type parameter of the resulting sequence. * @returns {AsyncIterableX<never>} An async-iterable sequence with no elements. */ export function empty() { return new EmptyAsyncIterable(); } //# sourceMappingURL=empty.js.map