# Fx.struct

Combines a record of Fx streams into a single Fx that emits a record of the latest values.
Similar to `tuple`, but for objects.

## Signatures

```ts
export declare function struct<FXS extends Readonly<Record<string, Fx<any, any, any>>>>(fxs: FXS): Fx<{
    readonly [K in keyof FXS]: Fx.Success<FXS[K]>;
}, Fx.Error<FXS[keyof FXS]>, Fx.Services<FXS[keyof FXS]>>;
```

## Why

`struct` gives latest-value combination stable field names. It waits for every field once and
then emits a new immutable record when any field source updates.

## Ownership and lifetime

It delegates concurrent ownership and retained latest values to `tuple`. Input failures and
services are unioned, and all runs end with the consuming Fx.

## Examples

```ts
import { Fx } from "@typed/fx"
const user = Fx.struct({ name: Fx.succeed("Ada"), online: Fx.succeed(true) })
```
