effect-io-ai

Package: effect
Module: Queue

Queue.asDequeue

Narrows a Queue to a Dequeue, exposing the consumer side of the queue.

When to use

Use to pass a queue to code that should consume values while keeping producer-side operations out of that code’s TypeScript type.

Gotchas

This is a type-level narrowing operation. It returns the same queue object and does not create a runtime wrapper.

See

Signature

declare const asDequeue: <A, E>(self: Queue<A, E>) => Dequeue<A, E>

Source

Since v4.0.0