{
  "id": "@typed/fx/Fx#withLatestFrom",
  "canonicalId": "@typed/fx/Fx#withLatestFrom",
  "symbol": {
    "id": "@typed/fx/Fx#withLatestFrom",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "withLatestFrom",
    "kind": "constant",
    "signatures": [
      "export declare const withLatestFrom: {\n    <B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n};"
    ],
    "summary": "Emits `[source, latest]` whenever the source emits, using the latest value\nfrom `that`. Source values are dropped until `that` has emitted at least once.\n\nUnlike {@link zipLatest}, this does **not** emit when `that` updates.\n\n**Completion:** Completes when the source completes.\n**Errors:** The first failure from either stream fails the result.",
    "sections": {
      "Why": "`withLatestFrom` makes the left source the sole emission trigger while enriching it with right-side\nstate. 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\nconsumer interruption interrupts that fiber; failure from either side is forwarded."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nconst labeled = Fx.withLatestFrom(Fx.fromIterable([1, 2]), Fx.succeed(\"ready\"))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
      "line": 38
    },
    "since": "1.0.0",
    "category": "Combining sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#withLatestFrom",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "withLatestFrom",
    "qualifiedName": "withLatestFrom",
    "declarationKey": "declaration:e98e5898135c9bc46dc88551",
    "family": "variable",
    "signatures": [
      "export declare const withLatestFrom: {\n    <B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 38,
          "column": 14
        },
        "end": {
          "line": 72,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 39,
          "column": 3
        },
        "end": {
          "line": 41,
          "column": 74
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 42,
          "column": 3
        },
        "end": {
          "line": 42,
          "column": 101
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.withLatestFrom"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:e98e5898135c9bc46dc88551",
    "name": "withLatestFrom",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const withLatestFrom: {\n    <B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
            "start": {
              "line": 38,
              "column": 14
            },
            "end": {
              "line": 72,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [\n    A,\n    B\n], E | E2, R | R2>;",
          "<A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [\n    A,\n    B\n], E | E2, R | R2>;"
        ],
        "typeParameters": [
          "B",
          "E2",
          "R2",
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
            "start": {
              "line": 39,
              "column": 3
            },
            "end": {
              "line": 41,
              "column": 74
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
            "start": {
              "line": 42,
              "column": 3
            },
            "end": {
              "line": 42,
              "column": 101
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const withLatestFrom: {\n    <B, E2, R2>(that: Fx<B, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(self: Fx<A, E, R>, that: Fx<B, E2, R2>): Fx<readonly [\n        A,\n        B\n    ], E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "E2",
      "R2",
      "A",
      "E",
      "R"
    ],
    "summary": "Emits `[source, latest]` whenever the source emits, using the latest value\nfrom `that`. Source values are dropped until `that` has emitted at least once.\n\nUnlike {@link zipLatest}, this does **not** emit when `that` updates.\n\n**Completion:** Completes when the source completes.\n**Errors:** The first failure from either stream fails the result.",
    "sections": {
      "Why": "`withLatestFrom` makes the left source the sole emission trigger while enriching it with right-side\nstate. 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\nconsumer interruption interrupts that fiber; failure from either side is forwarded."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nconst labeled = Fx.withLatestFrom(Fx.fromIterable([1, 2]), Fx.succeed(\"ready\"))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 38,
          "column": 14
        },
        "end": {
          "line": 72,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 39,
          "column": 3
        },
        "end": {
          "line": 41,
          "column": 74
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/withLatestFrom.ts",
        "start": {
          "line": 42,
          "column": 3
        },
        "end": {
          "line": 42,
          "column": 101
        }
      }
    ],
    "since": "1.0.0",
    "category": "Combining sources"
  }
}
