import { AsyncIterableX } from './asynciterablex' ; import { throwIfAborted , AbortError } from '../aborterror' ; export class NeverAsyncIterable extends AsyncIterableX < never > { constructor ( ) { super ( ) ; } async * [ Symbol . asyncIterator ] ( signal ? ) { throwIfAborted ( signal ) ; await new Promise < never > ( ( _ , reject ) => { if ( signal ) { signal . addEventListener ( 'abort' , ( ) => reject ( new AbortError ( ) ) , { once : true } ) ; } } ) ; } } returns { AsyncIterableX < never > } export function never ( ) { return new NeverAsyncIterable ( ) ; }