Package: effect
Module: Queue
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
asEnqueue for narrowing a queue to its producer sideDequeue for the consumer-side queue handle returned by this functionSignature
declare const asDequeue: <A, E>(self: Queue<A, E>) => Dequeue<A, E>
Since v4.0.0