Import
import { RefStruct } from "@typed/fx";Access RefStruct.make through the imported RefStruct 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 make<S extends object, E = never, R = never>(initial: S | Effect.Effect<S, E, R> | Fx.Fx<S, E, R>, eq?: Equivalence<S>): Effect.Effect<RefStruct<S, E>, never, R | Scope.Scope>;Why
Creates struct state with equality suited to that Effect data type, so unchanged values do not produce redundant pushed updates.
Ownership and lifetime
The creation Effect requires Scope. It owns initializer acquisition, live source subscriptions, and cleanup; source failures and services stay on reads and pushes.
Examples
import { Effect } from "effect"
import * as RefStruct from "@typed/fx/RefStruct"
const program = Effect.gen(function* () {
const value = yield* RefStruct.make({ name: "John", age: 30 })
const current = yield* value
console.log(current) // { name: "John", age: 30 }
})Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.