Skip to main content

Interface: AsyncIterableIteratorToArray<V>

An interface that adds a toArray method to AsyncIterableIterator.

Usage:

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

Type parameters

Name
V

Hierarchy

  • AsyncIterableIterator<V>

    AsyncIterableIteratorToArray

Methods

[asyncIterator]

[asyncIterator](): AsyncIterableIterator<V>

Returns

AsyncIterableIterator<V>

Inherited from

AsyncIterableIterator.[asyncIterator]


next

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

Parameters

NameType
...args[] | [undefined]

Returns

Promise<IteratorResult<V, any>>

Inherited from

AsyncIterableIterator.next


return

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

Parameters

NameType
value?any

Returns

Promise<IteratorResult<V, any>>

Inherited from

AsyncIterableIterator.return


throw

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

Parameters

NameType
e?any

Returns

Promise<IteratorResult<V, any>>

Inherited from

AsyncIterableIterator.throw


toArray

toArray(): Promise<V[]>

Returns

Promise<V[]>