Import
import { Versioned } from "@typed/fx";Access Versioned.Service through the imported Versioned 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 Service<Self, E1 = never, A2 = never, E2 = never, A3 = never, E3 = never>(): <const Id extends string>(id: Id) => Versioned.Class<Self, Id, E1, A2, E2, A3, E3>;Why
Creates an Effect service tag that exposes current reads, pushed updates, and versions through one Layer-provided state dependency.
Ownership and lifetime
Calling Service is pure. The generated make Layer captures required environments and owns the provided state for the Layer Scope.
Examples
import { Effect } from "effect"
import * as Fx from "@typed/fx/Fx"
import * as Versioned from "@typed/fx/Versioned"
class Status extends Versioned.Service<Status, never, string, never, string>()(
"example/Status"
) {}
const StatusLive = Status.make(
Effect.succeed(1),
Fx.succeed("ready"),
Effect.succeed("ready")
)Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.