Skip to main content

Class: AsyncIterableIteratorToArrayWrapper<V>#

A class that wraps an async iterable iterator to add a toArray method.

Usage:

const keys: string[] = await rep.scan().keys().toArray();

Type parameters#

Name
V

Implements#

  • AsyncIterableIterator<V>

Constructors#

constructor#

+ new AsyncIterableIteratorToArrayWrapper<V>(it: AsyncIterableIterator<V>): AsyncIterableIteratorToArrayWrapper<V>

Type parameters:#

Name
V

Parameters:#

NameType
itAsyncIterableIterator<V>

Returns: AsyncIterableIteratorToArrayWrapper<V>

Defined in: scan-iterator.ts:96

Properties#

next#

Readonly next: (v?: any) => Promise<IteratorResult<V, any>>

Type declaration:#

▸ (v?: any): Promise<IteratorResult<V, any>>

Parameters:#

NameType
v?any

Returns: Promise<IteratorResult<V, any>>

Defined in: scan-iterator.ts:92

Implementation of: AsyncIterableIterator.next

Defined in: scan-iterator.ts:92


return#

Optional Readonly return: (value?: any) => Promise<IteratorResult<V, any>>

Type declaration:#

▸ (value?: any): Promise<IteratorResult<V, any>>

Parameters:#

NameType
value?any

Returns: Promise<IteratorResult<V, any>>

Defined in: scan-iterator.ts:94

Implementation of: AsyncIterableIterator.return

Defined in: scan-iterator.ts:94


throw#

Optional Readonly throw: (e?: any) => Promise<IteratorResult<V, any>>

Type declaration:#

▸ (e?: any): Promise<IteratorResult<V, any>>

Parameters:#

NameType
e?any

Returns: Promise<IteratorResult<V, any>>

Defined in: scan-iterator.ts:96

Implementation of: AsyncIterableIterator.throw

Defined in: scan-iterator.ts:96

Methods#

[Symbol.asyncIterator]#

[Symbol.asyncIterator](): AsyncIterableIterator<V>

Returns: AsyncIterableIterator<V>

Implementation of: AsyncIterableIterator.__@asyncIterator

Defined in: scan-iterator.ts:113


toArray#

toArray(): Promise<V[]>

Returns: Promise<V[]>

Defined in: scan-iterator.ts:109