{
  "id": "@typed/fx#Fx.zipLeft",
  "canonicalId": "@typed/fx/Fx#zipLeft",
  "symbol": {
    "id": "@typed/fx#Fx.zipLeft",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.zipLeft",
    "kind": "constant",
    "signatures": [
      "export declare const zipLeft: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "summary": "Zips two Fx streams in strict lockstep and emits only the left value.\nCompletes when the **first** of the two streams completes.",
    "sections": {
      "Why": "`zipLeft` uses the right source as a one-for-one pacing or validation partner while retaining the\nleft payload. It emits one left value per completed pair and preserves pair order.",
      "Ownership and lifetime": "Both sources run concurrently. The first run to complete ends pairing and interrupts the other,\nwhile consumer interruption stops both. A failure Cause is delivered to the Sink but does not by\nitself end pairing; a producer may continue and supply a value afterward."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Cause, Effect, Ref } from \"effect\"\nimport { Fx, Sink } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const deliveries = yield* Ref.make<Array<string>>([])\n  const left = Fx.make<number, string>((sink) =>\n    sink.onFailure(Cause.fail(\"warning\")).pipe(Effect.andThen(sink.onSuccess(1)))\n  )\n  yield* Fx.zipLeft(left, Fx.succeed(\"pair\")).run(Sink.make(\n    () => Ref.update(deliveries, (xs) => [...xs, \"failure\"]),\n    (value) => Ref.update(deliveries, (xs) => [...xs, `value:${value}`])\n  ))\n  return yield* Ref.get(deliveries) // [\"failure\", \"value:1\"]\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/additive.ts",
      "line": 148
    },
    "since": "1.0.0",
    "category": "Combining sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.zipLeft",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.zipLeft",
    "declarationKey": "declaration:f244c353f919264ab9c551ab",
    "family": "variable",
    "signatures": [
      "export declare const zipLeft: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 148,
          "column": 14
        },
        "end": {
          "line": 153,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 149,
          "column": 3
        },
        "end": {
          "line": 149,
          "column": 93
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 150,
          "column": 3
        },
        "end": {
          "line": 150,
          "column": 89
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#zipLeft"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:f244c353f919264ab9c551ab"
  },
  "declaration": {
    "declarationKey": "declaration:f244c353f919264ab9c551ab",
    "name": "zipLeft",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const zipLeft: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 148,
              "column": 14
            },
            "end": {
              "line": 153,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;",
          "<A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "A2",
          "E2",
          "R2",
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 149,
              "column": 3
            },
            "end": {
              "line": 149,
              "column": 93
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 150,
              "column": 3
            },
            "end": {
              "line": 150,
              "column": 89
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const zipLeft: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "A2",
      "E2",
      "R2",
      "A",
      "E",
      "R"
    ],
    "summary": "Zips two Fx streams in strict lockstep and emits only the left value.\nCompletes when the **first** of the two streams completes.",
    "sections": {
      "Why": "`zipLeft` uses the right source as a one-for-one pacing or validation partner while retaining the\nleft payload. It emits one left value per completed pair and preserves pair order.",
      "Ownership and lifetime": "Both sources run concurrently. The first run to complete ends pairing and interrupts the other,\nwhile consumer interruption stops both. A failure Cause is delivered to the Sink but does not by\nitself end pairing; a producer may continue and supply a value afterward."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Cause, Effect, Ref } from \"effect\"\nimport { Fx, Sink } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const deliveries = yield* Ref.make<Array<string>>([])\n  const left = Fx.make<number, string>((sink) =>\n    sink.onFailure(Cause.fail(\"warning\")).pipe(Effect.andThen(sink.onSuccess(1)))\n  )\n  yield* Fx.zipLeft(left, Fx.succeed(\"pair\")).run(Sink.make(\n    () => Ref.update(deliveries, (xs) => [...xs, \"failure\"]),\n    (value) => Ref.update(deliveries, (xs) => [...xs, `value:${value}`])\n  ))\n  return yield* Ref.get(deliveries) // [\"failure\", \"value:1\"]\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 148,
          "column": 14
        },
        "end": {
          "line": 153,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 149,
          "column": 3
        },
        "end": {
          "line": 149,
          "column": 93
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 150,
          "column": 3
        },
        "end": {
          "line": 150,
          "column": 89
        }
      }
    ],
    "since": "1.0.0",
    "category": "Combining sources"
  }
}
