Hyperlinkv0.8.0-beta.28

Queue

Queue.asEnqueueconsteffect/Queue.ts:112
<A, E>(self: Queue<A, E>): Enqueue<A, E>

Converts a Queue to its write-only Enqueue interface.

When to use

Use to expose only the producer side of a Queue to code that should offer values or signal queue lifecycle.

Gotchas

This is a type-level capability restriction. It returns the same queue object, so it does not hide read operations at runtime.

Source effect/Queue.ts:1121 lines
export const asEnqueue = <A, E>(self: Queue<A, E>): Enqueue<A, E> => self