(min: number, max: number): <A, E>(
self: TxDequeue<A, E>
) => Effect.Effect<Array<A>, E>
<A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<
Array<A>,
E
>Takes between min and max currently available items, waiting for min on
an open queue.
Details
If the queue is closing, drains the currently available items even when fewer than min are available and transitions to Done. Invalid ranges (min <= 0, max <= 0, or min > max) return an empty array. If the queue is already done, the effect fails with the queue's completion cause.
Example (Taking batches within bounds)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offerAll(queue, [1, 2, 3, 4, 5, 6, 7, 8])
// Take between 2 and 5 items
const batch1 = yield* TxQueue.takeBetween(queue, 2, 5)
console.log(batch1) // [1, 2, 3, 4, 5] - took 5 (up to max)
// Take between 1 and 10 items (but only 3 remain)
const batch2 = yield* TxQueue.takeBetween(queue, 1, 10)
console.log(batch2) // [6, 7, 8] - took 3 (all remaining)
// Would wait for at least 1 item to be available
// const batch3 = yield* TxQueue.takeBetween(queue, 1, 3)
})export const const takeBetween: {
(min: number, max: number): <A, E>(
self: TxDequeue<A, E>
) => Effect.Effect<Array<A>, E>
<A, E>(
self: TxDequeue<A, E>,
min: number,
max: number
): Effect.Effect<Array<A>, E>
}
Takes between min and max currently available items, waiting for min on
an open queue.
Details
If the queue is closing, drains the currently available items even when fewer than min are available and transitions to Done. Invalid ranges (min <= 0, max <= 0, or min > max) return an empty array. If the queue is already done, the effect fails with the queue's completion cause.
Example (Taking batches within bounds)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offerAll(queue, [1, 2, 3, 4, 5, 6, 7, 8])
// Take between 2 and 5 items
const batch1 = yield* TxQueue.takeBetween(queue, 2, 5)
console.log(batch1) // [1, 2, 3, 4, 5] - took 5 (up to max)
// Take between 1 and 10 items (but only 3 remain)
const batch2 = yield* TxQueue.takeBetween(queue, 1, 10)
console.log(batch2) // [6, 7, 8] - took 3 (all remaining)
// Would wait for at least 1 item to be available
// const batch3 = yield* TxQueue.takeBetween(queue, 1, 3)
})
takeBetween: {
(min: numbermin: number, max: numbermax: number): <function (type parameter) A in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>E>(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self: interface TxDequeue<out A, out E = never>Namespace containing type definitions for TxDequeue variance annotations.
A TxDequeue represents the read-only interface of a transactional queue, providing
operations for consuming elements (dequeue operations) and inspecting queue state.
Example (Taking values through dequeue handles)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
// Queue without error channel
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offer(queue, 42)
const item = yield* TxQueue.take(queue)
console.log(item) // 42
// Queue with error channel - errors propagate through E-channel
const faultTolerantQueue = yield* TxQueue.bounded<number, string>(10)
yield* TxQueue.fail(faultTolerantQueue, "processing failed")
// All dequeue operations now fail with the error directly
const takeResult = yield* Effect.flip(TxQueue.take(faultTolerantQueue)) // "processing failed"
const peekResult = yield* Effect.flip(TxQueue.peek(faultTolerantQueue)) // "processing failed"
})
TxDequeue<function (type parameter) A in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>E>) => import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<interface Array<T>Array<function (type parameter) A in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>A>, function (type parameter) E in <A, E>(self: TxDequeue<A, E>): Effect.Effect<Array<A>, E>E>
<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E>(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self: interface TxDequeue<out A, out E = never>Namespace containing type definitions for TxDequeue variance annotations.
A TxDequeue represents the read-only interface of a transactional queue, providing
operations for consuming elements (dequeue operations) and inspecting queue state.
Example (Taking values through dequeue handles)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
// Queue without error channel
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offer(queue, 42)
const item = yield* TxQueue.take(queue)
console.log(item) // 42
// Queue with error channel - errors propagate through E-channel
const faultTolerantQueue = yield* TxQueue.bounded<number, string>(10)
yield* TxQueue.fail(faultTolerantQueue, "processing failed")
// All dequeue operations now fail with the error directly
const takeResult = yield* Effect.flip(TxQueue.take(faultTolerantQueue)) // "processing failed"
const peekResult = yield* Effect.flip(TxQueue.peek(faultTolerantQueue)) // "processing failed"
})
TxDequeue<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E>, min: numbermin: number, max: numbermax: number): import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<interface Array<T>Array<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A>, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E>
} = import dualdual(
3,
<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E>(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self: interface TxDequeue<out A, out E = never>Namespace containing type definitions for TxDequeue variance annotations.
A TxDequeue represents the read-only interface of a transactional queue, providing
operations for consuming elements (dequeue operations) and inspecting queue state.
Example (Taking values through dequeue handles)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
// Queue without error channel
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offer(queue, 42)
const item = yield* TxQueue.take(queue)
console.log(item) // 42
// Queue with error channel - errors propagate through E-channel
const faultTolerantQueue = yield* TxQueue.bounded<number, string>(10)
yield* TxQueue.fail(faultTolerantQueue, "processing failed")
// All dequeue operations now fail with the error directly
const takeResult = yield* Effect.flip(TxQueue.take(faultTolerantQueue)) // "processing failed"
const peekResult = yield* Effect.flip(TxQueue.peek(faultTolerantQueue)) // "processing failed"
})
TxDequeue<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E>, min: numbermin: number, max: numbermax: number): import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<interface Array<T>Array<function (type parameter) A in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>A>, function (type parameter) E in <A, E>(self: TxDequeue<A, E>, min: number, max: number): Effect.Effect<Array<A>, E>E> =>
import EffectEffect.gen(function*() {
const const state: State<any, any>state = yield* import TxRefTxRef.const get: <A>(
self: TxRef<A>
) => Effect.Effect<A>
Reads the current value of the TxRef.
When to use
Use to read the current value of a TxRef.
Example (Reading transactional references)
import { Effect, TxRef } from "effect"
const program = Effect.gen(function*() {
const counter = yield* TxRef.make(42)
// Read the value within a transaction
const value = yield* Effect.tx(
TxRef.get(counter)
)
console.log(value) // 42
})
get(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.stateRef: TxRef.TxRef<State<any, any>>(property) TxQueueState.stateRef: {
version: number;
pending: Map<unknown, () => void>;
value: A;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
stateRef)
// Check if queue is done - forward the cause directly
if (const state: State<any, any>state._tag === "Done") {
return yield* import EffectEffect.failCause(const state: anyconst state: {
_tag: "Done";
cause: Cause.Cause<E>;
}
state.cause)
}
// Validate parameters
if (min: numbermin <= 0 || max: numbermax <= 0 || min: numbermin > max: numbermax) {
return []
}
const const currentSize: anycurrentSize = yield* const size: (
self: TxQueueState
) => Effect.Effect<number>
Gets the current size of the queue.
Example (Reading queue size)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
yield* TxQueue.offerAll(queue, [1, 2, 3])
const size = yield* TxQueue.size(queue)
console.log(size) // 3
})
size(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self)
// If we have less than minimum required items
if (const currentSize: anycurrentSize < min: numbermin) {
// If queue is closing, transition to done and return what we have
if (const state: anystate._tag === "Closing") {
if (yield* const isEmpty: (
self: TxQueueState
) => Effect.Effect<boolean>
Checks whether the queue is empty.
Example (Checking whether a queue is empty)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
const empty = yield* TxQueue.isEmpty(queue)
console.log(empty) // true
yield* TxQueue.offer(queue, 42)
const stillEmpty = yield* TxQueue.isEmpty(queue)
console.log(stillEmpty) // false
})
isEmpty(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self)) {
yield* import TxRefTxRef.const set: {
<A>(value: A): (
self: TxRef<A>
) => Effect.Effect<void>
<A>(
self: TxRef<A>,
value: A
): Effect.Effect<void>
}
set(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.stateRef: TxRef.TxRef<State<any, any>>(property) TxQueueState.stateRef: {
version: number;
pending: Map<unknown, () => void>;
value: A;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
stateRef, { _tag: "Done"_tag: "Done", cause: Cause.Cause<any>(property) cause: {
reasons: ReadonlyArray<Reason<E>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
cause: const state: anyconst state: {
_tag: "Closing";
cause: Cause.Cause<E>;
}
state.cause })
return []
}
// Take all remaining items when closing (if >= min or all available)
const const chunk: Chunk.Chunk<any>const chunk: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
chunk = yield* import TxChunkTxChunk.get(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.items: TxChunk.TxChunk<any>(property) TxQueueState.items: {
ref: TxRef.TxRef<Chunk.Chunk<A>>;
toString: () => string;
toJSON: () => unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
items)
const const taken: anytaken = import ChunkChunk.toArray(const chunk: Chunk.Chunk<any>const chunk: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
chunk)
yield* import TxChunkTxChunk.set(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.items: TxChunk.TxChunk<any>(property) TxQueueState.items: {
ref: TxRef.TxRef<Chunk.Chunk<A>>;
toString: () => string;
toJSON: () => unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
items, import ChunkChunk.empty())
yield* import TxRefTxRef.const set: {
<A>(value: A): (
self: TxRef<A>
) => Effect.Effect<void>
<A>(
self: TxRef<A>,
value: A
): Effect.Effect<void>
}
set(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.stateRef: TxRef.TxRef<State<any, any>>(property) TxQueueState.stateRef: {
version: number;
pending: Map<unknown, () => void>;
value: A;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
stateRef, { _tag: "Done"_tag: "Done", cause: Cause.Cause<any>(property) cause: {
reasons: ReadonlyArray<Reason<E>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
cause: const state: anyconst state: {
_tag: "Closing";
cause: Cause.Cause<E>;
}
state.cause })
return const taken: anytaken
}
// Queue is still open but not enough items - retry transaction
return yield* import EffectEffect.txRetry
}
// We have at least the minimum, take up to the maximum
const const toTake: numbertoTake = var Math: MathAn intrinsic object that provides basic mathematics functionality and constants.
Math.Math.min(...values: number[]): numberReturns the smaller of a set of supplied numeric expressions.
min(const currentSize: anycurrentSize, max: numbermax)
const const chunk: Chunk.Chunk<any>const chunk: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
chunk = yield* import TxChunkTxChunk.get(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.items: TxChunk.TxChunk<any>(property) TxQueueState.items: {
ref: TxRef.TxRef<Chunk.Chunk<A>>;
toString: () => string;
toJSON: () => unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
items)
const const taken: Chunk.Chunk<any>const taken: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
taken = import ChunkChunk.take(const chunk: Chunk.Chunk<any>const chunk: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
chunk, const toTake: numbertoTake)
yield* import TxChunkTxChunk.drop(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.items: TxChunk.TxChunk<any>(property) TxQueueState.items: {
ref: TxRef.TxRef<Chunk.Chunk<A>>;
toString: () => string;
toJSON: () => unknown;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
items, const toTake: numbertoTake)
// Check if we need to transition Closing → Done
if (const state: anystate._tag === "Closing" && (yield* const isEmpty: (
self: TxQueueState
) => Effect.Effect<boolean>
Checks whether the queue is empty.
Example (Checking whether a queue is empty)
import { Effect, TxQueue } from "effect"
const program = Effect.gen(function*() {
const queue = yield* TxQueue.bounded<number>(10)
const empty = yield* TxQueue.isEmpty(queue)
console.log(empty) // true
yield* TxQueue.offer(queue, 42)
const stillEmpty = yield* TxQueue.isEmpty(queue)
console.log(stillEmpty) // false
})
isEmpty(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self))) {
yield* import TxRefTxRef.const set: {
<A>(value: A): (
self: TxRef<A>
) => Effect.Effect<void>
<A>(
self: TxRef<A>,
value: A
): Effect.Effect<void>
}
set(self: TxDequeue<A, E>(parameter) self: {
strategy: "bounded" | "unbounded" | "dropping" | "sliding";
capacity: number;
items: TxChunk.TxChunk<any>;
stateRef: TxRef.TxRef<State<any, any>>;
toString: () => string;
toJSON: () => unknown;
}
self.TxQueueState.stateRef: TxRef.TxRef<State<any, any>>(property) TxQueueState.stateRef: {
version: number;
pending: Map<unknown, () => void>;
value: A;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
stateRef, { _tag: "Done"_tag: "Done", cause: Cause.Cause<any>(property) cause: {
reasons: ReadonlyArray<Reason<E>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
cause: const state: anyconst state: {
_tag: "Closing";
cause: Cause.Cause<E>;
}
state.cause })
}
return import ChunkChunk.toArray(const taken: Chunk.Chunk<any>const taken: {
length: number;
right: Chunk<A>;
left: Chunk<A>;
backing: Backing<A>;
depth: number;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
taken)
}).pipe(import EffectEffect.tx)
)