Import
import { RefStruct } from "@typed/fx";Access RefStruct.get 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 const get: {
<S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;
<S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;
};Why
Projects a known property as Computed state, so current reads and future pushes stay linked to the struct without copying that field into a second store.
Ownership and lifetime
The get view retains no independent state. An Effect read samples the source once; Fx observation follows later pushes and its observing Scope owns subscription cleanup.
Examples
import { Effect } from "effect"
import * as RefStruct from "@typed/fx/RefStruct"
const program = Effect.scoped(Effect.gen(function* () {
const account = yield* RefStruct.make({ name: "Ada", active: true })
const name = RefStruct.get(account, "name")
return yield* name
}))Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.