{
  "id": "@typed/async-data#mapError",
  "canonicalId": "@typed/async-data#mapError",
  "symbol": {
    "id": "@typed/async-data#mapError",
    "packageName": "@typed/async-data",
    "moduleName": ".",
    "exportName": "mapError",
    "kind": "constant",
    "signatures": [
      "export declare const mapError: {\n    <A, E, E2>(f: (e: E) => E2): (data: AsyncData<A, E>) => AsyncData<A, E2>;\n    <A, E, E2>(data: AsyncData<A, E>, f: (e: E) => E2): AsyncData<A, E2>;\n};"
    ],
    "summary": "Maps typed failures inside the base Cause while preserving defects, interruption, progress, and optimistic history.",
    "sections": {
      "Why": "Error adaptation should use Effect Cause semantics instead of flattening the failure channel. Cyclic history throws `TypeError`.",
      "Ownership and lifetime": "This pure transformation acquires no resources and returns new plain wrappers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { failure, mapError } from \"@typed/async-data\"\nimport { Cause } from \"effect\"\nconst state = mapError(failure(Cause.fail(404)), String)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/async-data/src/index.ts",
      "line": 1007
    },
    "since": "1.0.0",
    "category": "Failure transformations"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/async-data#mapError",
    "packageName": "@typed/async-data",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/async-data",
    "exportName": "mapError",
    "qualifiedName": "mapError",
    "declarationKey": "declaration:938efd55e0e18c675fc4dfbc",
    "family": "variable",
    "signatures": [
      "export declare const mapError: {\n    <A, E, E2>(f: (e: E) => E2): (data: AsyncData<A, E>) => AsyncData<A, E2>;\n    <A, E, E2>(data: AsyncData<A, E>, f: (e: E) => E2): AsyncData<A, E2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1007,
          "column": 14
        },
        "end": {
          "line": 1019,
          "column": 3
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1008,
          "column": 3
        },
        "end": {
          "line": 1008,
          "column": 76
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1009,
          "column": 3
        },
        "end": {
          "line": 1009,
          "column": 72
        }
      }
    ],
    "aliases": [],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:938efd55e0e18c675fc4dfbc",
    "name": "mapError",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mapError: {\n    <A, E, E2>(f: (e: E) => E2): (data: AsyncData<A, E>) => AsyncData<A, E2>;\n    <A, E, E2>(data: AsyncData<A, E>, f: (e: E) => E2): AsyncData<A, E2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 1007,
              "column": 14
            },
            "end": {
              "line": 1019,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, E, E2>(f: (e: E) => E2): (data: AsyncData<A, E>) => AsyncData<A, E2>;",
          "<A, E, E2>(data: AsyncData<A, E>, f: (e: E) => E2): AsyncData<A, E2>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "E2"
        ],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 1008,
              "column": 3
            },
            "end": {
              "line": 1008,
              "column": 76
            }
          },
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 1009,
              "column": 3
            },
            "end": {
              "line": 1009,
              "column": 72
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mapError: {\n    <A, E, E2>(f: (e: E) => E2): (data: AsyncData<A, E>) => AsyncData<A, E2>;\n    <A, E, E2>(data: AsyncData<A, E>, f: (e: E) => E2): AsyncData<A, E2>;\n};"
    ],
    "typeParameters": [
      "A",
      "E",
      "E2"
    ],
    "summary": "Maps typed failures inside the base Cause while preserving defects, interruption, progress, and optimistic history.",
    "sections": {
      "Why": "Error adaptation should use Effect Cause semantics instead of flattening the failure channel. Cyclic history throws `TypeError`.",
      "Ownership and lifetime": "This pure transformation acquires no resources and returns new plain wrappers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { failure, mapError } from \"@typed/async-data\"\nimport { Cause } from \"effect\"\nconst state = mapError(failure(Cause.fail(404)), String)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1007,
          "column": 14
        },
        "end": {
          "line": 1019,
          "column": 3
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1008,
          "column": 3
        },
        "end": {
          "line": 1008,
          "column": 76
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 1009,
          "column": 3
        },
        "end": {
          "line": 1009,
          "column": 72
        }
      }
    ],
    "since": "1.0.0",
    "category": "Failure transformations"
  }
}
