{
  "id": "@typed/fx/Fx#mergeRight",
  "canonicalId": "@typed/fx/Fx#mergeRight",
  "symbol": {
    "id": "@typed/fx/Fx#mergeRight",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "mergeRight",
    "kind": "constant",
    "signatures": [
      "export declare const mergeRight: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A2, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A2, E | E2, R | R2>;\n};"
    ],
    "summary": "Merges two Fx streams and emits only values from the right stream.\nBoth streams run concurrently; completion when **both** complete.",
    "sections": {
      "Why": "`mergeRight` observes the left producer's completion and failure while exposing only right\nvalues. Each right value is emitted once with no deterministic ordering against hidden left work.",
      "Ownership and lifetime": "The consumer owns both concurrent runs and normal completion waits for both. Interruption cancels\nboth. A Cause is delivered to the Sink without inherently canceling the sibling; left successes\nremain suppressed even while their failures are observable."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Ref } from \"effect\"\nimport { Fx, Sink } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const values = yield* Ref.make<Array<string>>([])\n  yield* Fx.mergeRight(Fx.fail(\"hidden side failed\"), Fx.succeed(\"visible\")).run(\n    Sink.make(() => Effect.void, (value) => Ref.update(values, (xs) => [...xs, value]))\n  )\n  return yield* Ref.get(values) // [\"visible\"]\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/additive.ts",
      "line": 279
    },
    "since": "1.0.0",
    "category": "Combining sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#mergeRight",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "mergeRight",
    "qualifiedName": "mergeRight",
    "declarationKey": "declaration:4a3e8fb191383d287a9c747a",
    "family": "variable",
    "signatures": [
      "export declare const mergeRight: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A2, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A2, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 279,
          "column": 14
        },
        "end": {
          "line": 291,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 280,
          "column": 3
        },
        "end": {
          "line": 280,
          "column": 94
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 281,
          "column": 3
        },
        "end": {
          "line": 281,
          "column": 90
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.mergeRight"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:4a3e8fb191383d287a9c747a",
    "name": "mergeRight",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mergeRight: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A2, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A2, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 279,
              "column": 14
            },
            "end": {
              "line": 291,
              "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<A2, E | E2, R | R2>;",
          "<A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A2, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "A2",
          "E2",
          "R2",
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 280,
              "column": 3
            },
            "end": {
              "line": 280,
              "column": 94
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/additive.ts",
            "start": {
              "line": 281,
              "column": 3
            },
            "end": {
              "line": 281,
              "column": 90
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mergeRight: {\n    <A2, E2, R2>(that: Fx<A2, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A2, E | E2, R | R2>;\n    <A, E, R, A2, E2, R2>(self: Fx<A, E, R>, that: Fx<A2, E2, R2>): Fx<A2, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "A2",
      "E2",
      "R2",
      "A",
      "E",
      "R"
    ],
    "summary": "Merges two Fx streams and emits only values from the right stream.\nBoth streams run concurrently; completion when **both** complete.",
    "sections": {
      "Why": "`mergeRight` observes the left producer's completion and failure while exposing only right\nvalues. Each right value is emitted once with no deterministic ordering against hidden left work.",
      "Ownership and lifetime": "The consumer owns both concurrent runs and normal completion waits for both. Interruption cancels\nboth. A Cause is delivered to the Sink without inherently canceling the sibling; left successes\nremain suppressed even while their failures are observable."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Ref } from \"effect\"\nimport { Fx, Sink } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const values = yield* Ref.make<Array<string>>([])\n  yield* Fx.mergeRight(Fx.fail(\"hidden side failed\"), Fx.succeed(\"visible\")).run(\n    Sink.make(() => Effect.void, (value) => Ref.update(values, (xs) => [...xs, value]))\n  )\n  return yield* Ref.get(values) // [\"visible\"]\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 279,
          "column": 14
        },
        "end": {
          "line": 291,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 280,
          "column": 3
        },
        "end": {
          "line": 280,
          "column": 94
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/additive.ts",
        "start": {
          "line": 281,
          "column": 3
        },
        "end": {
          "line": 281,
          "column": 90
        }
      }
    ],
    "since": "1.0.0",
    "category": "Combining sources"
  }
}
