{
  "id": "@typed/fx/Sink#mapError",
  "canonicalId": "@typed/fx/Sink#mapError",
  "symbol": {
    "id": "@typed/fx/Sink#mapError",
    "packageName": "@typed/fx",
    "moduleName": "Sink",
    "exportName": "mapError",
    "kind": "function",
    "signatures": [
      "export declare function mapError<A, E, E2, R>(sink: Sink<A, E2, R>, f: (e: E) => E2): Sink<A, E, R>;"
    ],
    "summary": "Maps the error channel of a sink using the provided function.\nFailures are mapped via `Cause.map`; defects and interrupts are preserved.",
    "sections": {
      "Why": "A producer's typed error can be translated into the vocabulary expected by an existing consumer\nwithout losing Cause structure.",
      "Ownership and lifetime": "Mapping is synchronous and resource-free. Success order is unchanged; only `Fail` reasons are\nmapped, while defects and interruption reasons pass through untouched."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target: Sink.Sink<number, string> = Sink.make(Effect.logError, Effect.log)\nconst acceptsNumbers = Sink.mapError(target, (error: number) => `code:${error}`)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 133
    },
    "since": "1.0.0",
    "category": "Failure handling"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Sink#mapError",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Sink",
    "consumerSpecifier": "@typed/fx/Sink",
    "exportName": "mapError",
    "qualifiedName": "mapError",
    "declarationKey": "declaration:a0128e5d2b7b2f10756812c5",
    "family": "function",
    "signatures": [
      "export declare function mapError<A, E, E2, R>(sink: Sink<A, E2, R>, f: (e: E) => E2): Sink<A, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 133,
          "column": 1
        },
        "end": {
          "line": 135,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#Sink.mapError"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:a0128e5d2b7b2f10756812c5",
    "name": "mapError",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function mapError<A, E, E2, R>(sink: Sink<A, E2, R>, f: (e: E) => E2): Sink<A, E, R>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "E2",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 133,
              "column": 1
            },
            "end": {
              "line": 135,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function mapError<A, E, E2, R>(sink: Sink<A, E2, R>, f: (e: E) => E2): Sink<A, E, R>;"
    ],
    "typeParameters": [
      "A",
      "E",
      "E2",
      "R"
    ],
    "summary": "Maps the error channel of a sink using the provided function.\nFailures are mapped via `Cause.map`; defects and interrupts are preserved.",
    "sections": {
      "Why": "A producer's typed error can be translated into the vocabulary expected by an existing consumer\nwithout losing Cause structure.",
      "Ownership and lifetime": "Mapping is synchronous and resource-free. Success order is unchanged; only `Fail` reasons are\nmapped, while defects and interruption reasons pass through untouched."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst target: Sink.Sink<number, string> = Sink.make(Effect.logError, Effect.log)\nconst acceptsNumbers = Sink.mapError(target, (error: number) => `code:${error}`)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 133,
          "column": 1
        },
        "end": {
          "line": 135,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Failure handling"
  }
}
