{
  "id": "@typed/fx#Sink.mapEffect",
  "canonicalId": "@typed/fx/Sink#mapEffect",
  "symbol": {
    "id": "@typed/fx#Sink.mapEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Sink.mapEffect",
    "kind": "constant",
    "signatures": [
      "export declare const mapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
    ],
    "summary": "Runs an Effect for each input and forwards its successful value to the sink.",
    "sections": {
      "Why": "Consumer-side adaptation can use services and typed failure without creating an intermediate Fx.",
      "Ownership and lifetime": "One transition Effect runs per callback invocation. Its success is forwarded once; its complete\nfailure Cause is sent to `onFailure`. Calls themselves are not serialized by this adapter, so\nordering follows the invoking producer. Services join the sink requirements; interruption is local\nto each callback Effect."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst numbers = Sink.mapEffect(Sink.make(Effect.logError, Effect.log), (text: string) =>\n  Effect.succeed(Number(text)))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1236
    },
    "since": "1.0.0",
    "category": "Transforming inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Sink.mapEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Sink",
    "qualifiedName": "Sink.mapEffect",
    "declarationKey": "declaration:13a13f5d7b4f046c7b4b908c",
    "family": "variable",
    "signatures": [
      "export declare const mapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1236,
          "column": 14
        },
        "end": {
          "line": 1253,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1237,
          "column": 3
        },
        "end": {
          "line": 1239,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1240,
          "column": 3
        },
        "end": {
          "line": 1243,
          "column": 30
        }
      }
    ],
    "aliases": [
      "@typed/fx/Sink#mapEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Sink",
    "static": false,
    "importedFrom": "declaration:13a13f5d7b4f046c7b4b908c"
  },
  "declaration": {
    "declarationKey": "declaration:13a13f5d7b4f046c7b4b908c",
    "name": "mapEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1236,
              "column": 14
            },
            "end": {
              "line": 1253,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;",
          "<A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "B",
          "A",
          "E2",
          "R2",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1237,
              "column": 3
            },
            "end": {
              "line": 1239,
              "column": 66
            }
          },
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1240,
              "column": 3
            },
            "end": {
              "line": 1243,
              "column": 30
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<A, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<B, E | E2, R | R2>;\n    <A, E, R, B, E2, R2>(sink: Sink<A, E | E2, R>, f: (b: B) => Effect.Effect<A, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "A",
      "E2",
      "R2",
      "E",
      "R"
    ],
    "summary": "Runs an Effect for each input and forwards its successful value to the sink.",
    "sections": {
      "Why": "Consumer-side adaptation can use services and typed failure without creating an intermediate Fx.",
      "Ownership and lifetime": "One transition Effect runs per callback invocation. Its success is forwarded once; its complete\nfailure Cause is sent to `onFailure`. Calls themselves are not serialized by this adapter, so\nordering follows the invoking producer. Services join the sink requirements; interruption is local\nto each callback Effect."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst numbers = Sink.mapEffect(Sink.make(Effect.logError, Effect.log), (text: string) =>\n  Effect.succeed(Number(text)))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1236,
          "column": 14
        },
        "end": {
          "line": 1253,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1237,
          "column": 3
        },
        "end": {
          "line": 1239,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1240,
          "column": 3
        },
        "end": {
          "line": 1243,
          "column": 30
        }
      }
    ],
    "since": "1.0.0",
    "category": "Transforming inputs"
  }
}
