Skip to main content

Variable: emptyAsync()

const emptyAsync: <Value>() => AsyncIterable<Value>

Defined in: core.d.ts:389

An async iterable that contains zero values.

Can be used as an async iterable of any type.

Like [], but for async iterables.

Type Parameters

Value

Value = unknown

Returns

AsyncIterable<Value>

Example

import { emptyAsync, pipe, reduceAsync, toArray } from 'lfi'

console.log(
await pipe(
emptyAsync(),
reduceAsync(toArray()),
),
)
//=> []
Playground

Since

v0.0.1