import { AsyncIterableX } from '../asynciterablex' ; import { MonoTypeOperatorAsyncFunction } from '../../interfaces' ; import { wrapWithAbort } from './withabort' ; import { throwIfAborted } from '../../aborterror' ; export class IgnoreElementsAsyncIterable < TSource > extends AsyncIterableX < TSource > { private _source : AsyncIterable < TSource > ; constructor ( source ) { super ( ) ; this . _source = source ; } async * [ Symbol . asyncIterator ] ( signal ? ) { throwIfAborted ( signal ) ; for await ( const _ of wrapWithAbort ( this . _source , signal ) ) { } } } template TSource returns { MonoTypeOperatorAsyncFunction < TSource > } export function ignoreElements < TSource > ( ) { return function ignoreElementsOperatorFunction ( source ) : AsyncIterableX < TSource > { return new IgnoreElementsAsyncIterable < TSource > ( source ) ; } ; }