# hold

Shares an `Fx` and immediately replays its latest success or failure to each new subscriber.

## Signatures

```ts
export declare function hold<A, E, R>(fx: Fx.Fx<A, E, R>): Fx.Fx<A, E, R | Scope.Scope>;
```

## Why

`hold` gives late subscribers the current publication without restarting an already active
source, making it suitable for current-value streams and state-like projections.

## Ownership and lifetime

One retained `Exit` belongs to the active shared subject. The first subscriber starts the source,
the last subscriber interrupts it, and interruption clears the retained exit. Source errors and
services remain visible in the returned `Fx`; subscription cleanup belongs to `Scope`.

## Join-during-publication behavior

The latest `Exit` is retained before it enters the serialized publication queue. If a subscriber
joins while an earlier publication is still draining, it can receive that queued exit immediately
as replay and then receive it again when the queue reaches it. Consumers that require exactly-once
delivery across concurrent subscription and publication must coordinate that boundary externally.

## Examples

```ts
import { Fx } from "@typed/fx"
import * as Subject from "@typed/fx/Subject"

const currentStatus = Subject.hold(Fx.succeed("ready"))
```
