{
  "id": "@typed/fx/Fx#mapError",
  "canonicalId": "@typed/fx/Fx#mapError",
  "symbol": {
    "id": "@typed/fx/Fx#mapError",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "mapError",
    "kind": "constant",
    "signatures": [
      "export declare const mapError: {\n    <E, E2>(f: (e: E) => E2): <A, R>(self: Fx<A, E, R>) => Fx<A, E2, R>;\n    <A, E, R, E2>(self: Fx<A, E, R>, f: (e: E) => E2): Fx<A, E2, R>;\n};"
    ],
    "summary": "Transforms typed failures while preserving defects and interruption.",
    "sections": {
      "Why": "Libraries can expose a domain error without losing the richer Cause that\nEffect uses for defects, interruption, and composed failures.",
      "Ownership and lifetime": "The mapping function runs synchronously for each `Cause.Fail` reported by\nthe source. It does not run for defects or interrupts, which pass through\nunchanged. Values retain order and cardinality. No resource is acquired and\nthe returned Fx has the same subscription lifetime and services as its source."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { mapError } from \"@typed/fx/Fx\"\nimport { fail } from \"@typed/fx/Fx\"\n\nconst domainFailure = mapError(fail(404), (status) => ({ _tag: \"HttpError\", status }))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/mapError.ts",
      "line": 34
    },
    "since": "1.0.0",
    "category": "Errors and recovery"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#mapError",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "mapError",
    "qualifiedName": "mapError",
    "declarationKey": "declaration:6f9f928ef4dbc87b4f9242fb",
    "family": "variable",
    "signatures": [
      "export declare const mapError: {\n    <E, E2>(f: (e: E) => E2): <A, R>(self: Fx<A, E, R>) => Fx<A, E2, R>;\n    <A, E, R, E2>(self: Fx<A, E, R>, f: (e: E) => E2): Fx<A, E2, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 42,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 71
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 37,
          "column": 67
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.mapError"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:6f9f928ef4dbc87b4f9242fb",
    "name": "mapError",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mapError: {\n    <E, E2>(f: (e: E) => E2): <A, R>(self: Fx<A, E, R>) => Fx<A, E2, R>;\n    <A, E, R, E2>(self: Fx<A, E, R>, f: (e: E) => E2): Fx<A, E2, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/mapError.ts",
            "start": {
              "line": 34,
              "column": 14
            },
            "end": {
              "line": 42,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<E, E2>(f: (e: E) => E2): <A, R>(self: Fx<A, E, R>) => Fx<A, E2, R>;",
          "<A, E, R, E2>(self: Fx<A, E, R>, f: (e: E) => E2): Fx<A, E2, R>;"
        ],
        "typeParameters": [
          "E",
          "E2",
          "A",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/mapError.ts",
            "start": {
              "line": 35,
              "column": 3
            },
            "end": {
              "line": 35,
              "column": 71
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/mapError.ts",
            "start": {
              "line": 37,
              "column": 3
            },
            "end": {
              "line": 37,
              "column": 67
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mapError: {\n    <E, E2>(f: (e: E) => E2): <A, R>(self: Fx<A, E, R>) => Fx<A, E2, R>;\n    <A, E, R, E2>(self: Fx<A, E, R>, f: (e: E) => E2): Fx<A, E2, R>;\n};"
    ],
    "typeParameters": [
      "E",
      "E2",
      "A",
      "R"
    ],
    "summary": "Transforms typed failures while preserving defects and interruption.",
    "sections": {
      "Why": "Libraries can expose a domain error without losing the richer Cause that\nEffect uses for defects, interruption, and composed failures.",
      "Ownership and lifetime": "The mapping function runs synchronously for each `Cause.Fail` reported by\nthe source. It does not run for defects or interrupts, which pass through\nunchanged. Values retain order and cardinality. No resource is acquired and\nthe returned Fx has the same subscription lifetime and services as its source."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { mapError } from \"@typed/fx/Fx\"\nimport { fail } from \"@typed/fx/Fx\"\n\nconst domainFailure = mapError(fail(404), (status) => ({ _tag: \"HttpError\", status }))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 42,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 71
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/mapError.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 37,
          "column": 67
        }
      }
    ],
    "since": "1.0.0",
    "category": "Errors and recovery"
  }
}
