Import
import { RefSubject } from "@typed/fx";Access RefSubject.tuple through the imported RefSubject export. Its declaration below describes the member.
This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export declare function tuple<const Refs extends ReadonlyArray<Ref>>(refs: Refs): TupleFrom<Refs>;Why
Combines several refs into one state value while preserving whether the result is writable, computed, or filtered from its inputs.
Ownership and lifetime
This declaration performs no acquisition and retains no resources. Implementations preserve source errors, services, and lifetime.
Examples
import { Effect } from "effect"
import * as RefSubject from "@typed/fx/RefSubject"
const program = Effect.gen(function* () {
const x = yield* RefSubject.make(10)
const y = yield* RefSubject.make(20)
const z = yield* RefSubject.make(30)
// Combine into a tuple
const point = RefSubject.tuple([x, y, z])
const coords = yield* point
console.log(coords) // [10, 20, 30]
// Update one value
yield* RefSubject.set(x, 15)
// Tuple automatically updates
const updated = yield* point
console.log(updated) // [15, 20, 30]
})Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.