(item: T): Effect.Effect<void, E, R>
(items: ReadonlyArray<T>): Effect.Effect<void, E, R>
(itemOrItems: T | ReadonlyArray<T>): Effect.Effect<void, E, R>Enqueue a single item or a readonly batch of items.
export interface interface QueueEnqueue<T, E = never, R = never>Enqueue a single item or a readonly batch of items.
QueueEnqueue<function (type parameter) T in QueueEnqueue<T, E = never, R = never>T, function (type parameter) E in QueueEnqueue<T, E = never, R = never>E = never, function (type parameter) R in QueueEnqueue<T, E = never, R = never>R = never> {
(item: Titem: function (type parameter) T in QueueEnqueue<T, E = never, R = never>T): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void, function (type parameter) E in QueueEnqueue<T, E = never, R = never>E, function (type parameter) R in QueueEnqueue<T, E = never, R = never>R>;
(items: readonly T[]items: interface ReadonlyArray<T>ReadonlyArray<function (type parameter) T in QueueEnqueue<T, E = never, R = never>T>): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void, function (type parameter) E in QueueEnqueue<T, E = never, R = never>E, function (type parameter) R in QueueEnqueue<T, E = never, R = never>R>;
// Union overload: lets a `T | ReadonlyArray<T>` argument resolve directly (the engine impl already
// accepts the union), so callers holding the decoded union don't need an `Array.isArray` narrowing.
(itemOrItems: T | readonly T[]itemOrItems: function (type parameter) T in QueueEnqueue<T, E = never, R = never>T | interface ReadonlyArray<T>ReadonlyArray<function (type parameter) T in QueueEnqueue<T, E = never, R = never>T>): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void, function (type parameter) E in QueueEnqueue<T, E = never, R = never>E, function (type parameter) R in QueueEnqueue<T, E = never, R = never>R>;
}