{
  "id": "@typed/fx#Push.mapBoth",
  "canonicalId": "@typed/fx/Push#mapBoth",
  "symbol": {
    "id": "@typed/fx#Push.mapBoth",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Push.mapBoth",
    "kind": "constant",
    "signatures": [
      "export declare const mapBoth: {\n    <B, C, E2, E3>(options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): <A, E, R, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E3, R2>;\n    <A, E, R, B, E2, R2, C, E3>(push: Push<A, E, R, B, E2, R2>, options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): Push<A, E, R, C, E3, R2>;\n};"
    ],
    "summary": "Transforms both the output (Fx) success and error channels of a `Push` using the provided options.\n\nMirrors `Effect.mapBoth` on the Fx side: `onSuccess` maps every emitted value\none-to-one and `onFailure` maps typed failures via `Cause.map`; defects and\ninterrupts are preserved. Ordering, services, and the input side are unchanged.",
    "sections": {
      "Why": "Adapt both observable result channels at once while leaving command handling\nand non-typed Cause information intact.",
      "Ownership and lifetime": "Both functions run synchronously in the output delivery path and acquire no\nresources. The wrapped Fx retains ownership of its subscription and finalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Fx from \"@typed/fx/Fx\"\nimport * as Push from \"@typed/fx/Push\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nconst push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.succeed(2))\nconst labeled = Push.mapBoth(push, {\n  onFailure: (error: never) => error,\n  onSuccess: (value) => `value:${value}`\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 999
    },
    "since": "1.0.0",
    "category": "Transforming outputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Push.mapBoth",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Push",
    "qualifiedName": "Push.mapBoth",
    "declarationKey": "declaration:bcdcbc6fa0d12848a367d7cc",
    "family": "variable",
    "signatures": [
      "export declare const mapBoth: {\n    <B, C, E2, E3>(options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): <A, E, R, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E3, R2>;\n    <A, E, R, B, E2, R2, C, E3>(push: Push<A, E, R, B, E2, R2>, options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): Push<A, E, R, C, E3, R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 999,
          "column": 14
        },
        "end": {
          "line": 1019,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1000,
          "column": 3
        },
        "end": {
          "line": 1003,
          "column": 81
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1004,
          "column": 3
        },
        "end": {
          "line": 1007,
          "column": 31
        }
      }
    ],
    "aliases": [
      "@typed/fx/Push#mapBoth"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Push",
    "static": false,
    "importedFrom": "declaration:bcdcbc6fa0d12848a367d7cc"
  },
  "declaration": {
    "declarationKey": "declaration:bcdcbc6fa0d12848a367d7cc",
    "name": "mapBoth",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mapBoth: {\n    <B, C, E2, E3>(options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): <A, E, R, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E3, R2>;\n    <A, E, R, B, E2, R2, C, E3>(push: Push<A, E, R, B, E2, R2>, options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): Push<A, E, R, C, E3, R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 999,
              "column": 14
            },
            "end": {
              "line": 1019,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, C, E2, E3>(options: {\n    readonly onFailure: (e: E2) => E3;\n    readonly onSuccess: (b: B) => C;\n}): <A, E, R, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E3, R2>;",
          "<A, E, R, B, E2, R2, C, E3>(push: Push<A, E, R, B, E2, R2>, options: {\n    readonly onFailure: (e: E2) => E3;\n    readonly onSuccess: (b: B) => C;\n}): Push<A, E, R, C, E3, R2>;"
        ],
        "typeParameters": [
          "B",
          "C",
          "E2",
          "E3",
          "A",
          "E",
          "R",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 1000,
              "column": 3
            },
            "end": {
              "line": 1003,
              "column": 81
            }
          },
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 1004,
              "column": 3
            },
            "end": {
              "line": 1007,
              "column": 31
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mapBoth: {\n    <B, C, E2, E3>(options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): <A, E, R, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E3, R2>;\n    <A, E, R, B, E2, R2, C, E3>(push: Push<A, E, R, B, E2, R2>, options: {\n        readonly onFailure: (e: E2) => E3;\n        readonly onSuccess: (b: B) => C;\n    }): Push<A, E, R, C, E3, R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "C",
      "E2",
      "E3",
      "A",
      "E",
      "R",
      "R2"
    ],
    "summary": "Transforms both the output (Fx) success and error channels of a `Push` using the provided options.\n\nMirrors `Effect.mapBoth` on the Fx side: `onSuccess` maps every emitted value\none-to-one and `onFailure` maps typed failures via `Cause.map`; defects and\ninterrupts are preserved. Ordering, services, and the input side are unchanged.",
    "sections": {
      "Why": "Adapt both observable result channels at once while leaving command handling\nand non-typed Cause information intact.",
      "Ownership and lifetime": "Both functions run synchronously in the output delivery path and acquire no\nresources. The wrapped Fx retains ownership of its subscription and finalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Fx from \"@typed/fx/Fx\"\nimport * as Push from \"@typed/fx/Push\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nconst push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.succeed(2))\nconst labeled = Push.mapBoth(push, {\n  onFailure: (error: never) => error,\n  onSuccess: (value) => `value:${value}`\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 999,
          "column": 14
        },
        "end": {
          "line": 1019,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1000,
          "column": 3
        },
        "end": {
          "line": 1003,
          "column": 81
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1004,
          "column": 3
        },
        "end": {
          "line": 1007,
          "column": 31
        }
      }
    ],
    "since": "1.0.0",
    "category": "Transforming outputs"
  }
}
