import { wrapWithAbort } from './operators/withabort' ; import { throwIfAborted } from '../aborterror' ; template T param { AsyncIterable < T > } source param { AbortSignal } signal returns { Promise < boolean > } export async function isEmpty < T > ( source , signal ? ) { throwIfAborted ( signal ) ; for await ( const _ of wrapWithAbort ( source , signal ) ) { return false ; } return true ; }