# withLatestFrom

Emits `[source, latest]` whenever the source emits, using the latest value
from `that`. Source values are dropped until `that` has emitted at least once.

Unlike {@link zipLatest}, this does **not** emit when `that` updates.

**Completion:** Completes when the source completes.
**Errors:** The first failure from either stream fails the result.

## Signatures

```ts
export declare const withLatestFrom: {
    <B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [
        A,
        B
    ], E | E2, R | R2>;
    <A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [
        A,
        B
    ], E | E2, R | R2>;
};
```

## Why

`withLatestFrom` makes the left source the sole emission trigger while enriching it with right-side
state. Left values before the right's first value are dropped; right updates never emit alone.

## Ownership and lifetime

The right source runs in a child fiber and one latest value is retained. Left completion or
consumer interruption interrupts that fiber; failure from either side is forwarded.

## Examples

```ts
import { Fx } from "@typed/fx"
const labeled = Fx.withLatestFrom(Fx.fromIterable([1, 2]), Fx.succeed("ready"))
```
