# hydrateAll

Combines hydrated refs into one serialization and restoration boundary.

## Signatures

```ts
export declare function hydrateAll<const Refs extends readonly [
    HydratedRefSubject.Any,
    ...HydratedRefSubject.Any[]
]>(...refs: Refs): HydrationRef<HydratedRefSubject.HydrationError<Refs[number]>, HydratedRefSubject.HydrationServices<Refs[number]>>;
```

## Why

Combines member metadata so several refs serialize and restore as one boundary while retaining
each member's errors and codec services.

## Ownership and lifetime

The combined boundary acquires nothing and delegates lifetime to its member refs. Encoding or
decoding retains the members' Schema errors and services.

Named attributes must be unique. Unnamed members are encoded together and restored as a group,
so normal initializers cannot race ahead of a partially decoded envelope.

## Synchronous configuration errors

Combining two named refs whose normalized `data-*` attribute names are equal throws `TypeError`
immediately while `hydrateAll` is called. This duplicate-name check is a configuration error,
not a typed Schema failure. Member encoding and decoding errors remain `Schema.SchemaError`, and
their codec services remain visible in the returned `HydrationRef`.

## Examples

```ts
import { Effect, Schema } from "effect"
import * as Hydration from "@typed/fx/RefSubject"

const attributes = Effect.scoped(Effect.gen(function* () {
  const count = yield* Hydration.hydrate(Schema.Finite, 0)
  const status = yield* Hydration.hydrate(Schema.String, "ready")
  const state = Hydration.hydrateAll(count, status)
  return yield* state[Hydration.HydrationRefTypeId].toAttributes
}))
```
