Skip to main content

Class: EventIterator<V>

event-iterator/src.EventIterator

Type parameters

NameType
Vextends unknown[]

Implements

  • AsyncIterableIterator<V>

Constructors

constructor

new EventIterator<V>(emitter, event, options?)

Type parameters

NameType
Vextends unknown[]

Parameters

NameTypeDescription
emitterEventEmitter
eventstring
optionsEventIteratorOptions<V>

Defined in

projects/utilities/packages/event-iterator/src/index.ts:88

Properties

#ended

Private #ended: boolean = false

Defined in

projects/utilities/packages/event-iterator/src/index.ts:50


#idle

Private Optional #idle: number

Defined in

projects/utilities/packages/event-iterator/src/index.ts:55


#idleTimer

Private #idleTimer: null | Timer = null

Defined in

projects/utilities/packages/event-iterator/src/index.ts:75


#limit

Private #limit: number

Defined in

projects/utilities/packages/event-iterator/src/index.ts:70


#passed

Private #passed: number = 0

Defined in

projects/utilities/packages/event-iterator/src/index.ts:65


#push

Private #push: (this: EventIterator<V>, ...value: V) => void

Type declaration

▸ (this, ...value): void

Parameters
NameType
thisEventIterator<V>
...valueV
Returns

void

Defined in

projects/utilities/packages/event-iterator/src/index.ts:80


#queue

Private #queue: V[] = []

Defined in

projects/utilities/packages/event-iterator/src/index.ts:60


emitter

Readonly emitter: EventEmitter

Defined in

projects/utilities/packages/event-iterator/src/index.ts:35


event

Readonly event: string

Defined in

projects/utilities/packages/event-iterator/src/index.ts:40


filter

filter: EventIteratorFilter<V>

Defined in

projects/utilities/packages/event-iterator/src/index.ts:45

Accessors

ended

get ended(): boolean

Returns

boolean

Defined in

projects/utilities/packages/event-iterator/src/index.ts:109

Methods

[asyncIterator]

[asyncIterator](): AsyncIterableIterator<V>

Returns

AsyncIterableIterator<V>

Implementation of

AsyncIterableIterator.__@asyncIterator@81207

Defined in

projects/utilities/packages/event-iterator/src/index.ts:187


end

end(): void

Returns

void

Defined in

projects/utilities/packages/event-iterator/src/index.ts:116


next

next(): Promise<IteratorResult<V, any>>

Returns

Promise<IteratorResult<V, any>>

Implementation of

AsyncIterableIterator.next

Defined in

projects/utilities/packages/event-iterator/src/index.ts:130


push

Protected push(...value): void

Parameters

NameType
...valueV

Returns

void

Defined in

projects/utilities/packages/event-iterator/src/index.ts:194


return

return(): Promise<IteratorResult<V, any>>

Returns

Promise<IteratorResult<V, any>>

Implementation of

AsyncIterableIterator.return

Defined in

projects/utilities/packages/event-iterator/src/index.ts:171


throw

throw(): Promise<IteratorResult<V, any>>

Returns

Promise<IteratorResult<V, any>>

Implementation of

AsyncIterableIterator.throw

Defined in

projects/utilities/packages/event-iterator/src/index.ts:179