function / @typed/fx

Versioned.tuple

Combines multiple Versioned values into a single tuple.

Package version
2.0.0-beta.7
Category
State composition
Since
1.0.0
Member of
Versioned

Import

import { Versioned } from "@typed/fx";

Access Versioned.tuple 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 tuple<const VS extends ReadonlyArray<Versioned<any, any, any, any, any, any, any, any>>>(versioneds: VS): Versioned<Versioned.VersionContext<VS[number]>, Versioned.VersionError<VS[number]>, {
    readonly [K in keyof VS]: Fx.Success<VS[K]>;
}, Fx.Error<VS[number]>, Fx.Services<VS[number]>, {
    readonly [K in keyof VS]: Effect.Success<VS[K]>;
}, Effect.Error<VS[number]>, Effect.Services<VS[number]>>;

Why

Combines several Versioned values positionally and uses their versions as one invalidation token for the assembled tuple.

Ownership and lifetime

tuple does not take ownership of its inputs. Its observation and current-read channels retain upstream lifetime, typed failures, services, and interruption behavior.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source