{
  "id": "@typed/fx#Push.mapInput",
  "canonicalId": "@typed/fx/Push#mapInput",
  "symbol": {
    "id": "@typed/fx#Push.mapInput",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Push.mapInput",
    "kind": "constant",
    "signatures": [
      "export declare const mapInput: {\n    <C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => A): Push<C, E, R, B, E2, R2>;\n};"
    ],
    "summary": "Synchronously transforms each successful input before sending it to the Sink.\n\nOne input maps to exactly one downstream input. Calling `onSuccess` evaluates\n`f` immediately, before the returned downstream Effect is run; allocation and\nthrown exceptions therefore occur at callback invocation (and become defects\nonly when that invocation itself occurs inside Effect evaluation). The Sink\ncallback Effect remains the acknowledgment. Calls are not serialized; execution\norder and concurrency follow the producer. The Fx output is unchanged.",
    "sections": {
      "Why": "Adapt an external command shape to an existing consumer without rebuilding or\nchanging the independent output stream.",
      "Ownership and lifetime": "`f` runs synchronously when `onSuccess` is called, before its returned Effect\nexists, and acquires no resource. Downstream handling retains the original\nSink's `E`, `R`, caller fiber, interruption, and cleanup behavior."
    },
    "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 events: Array<string> = []\nconst base = Push.make(\n  Sink.make(() => Effect.void, (n: number) => Effect.sync(() => events.push(`sink:${n}`))),\n  Fx.empty\n)\nconst mapped = Push.mapInput(base, (text: string) => {\n  events.push(`map:${text}`)\n  return Number(text)\n})\nconst acknowledgement = mapped.onSuccess(\"42\")\n// events is already [\"map:42\"]; the Sink Effect has not run yet.\nconst program = Effect.as(acknowledgement, events)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 428
    },
    "since": "1.0.0",
    "category": "Transforming inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Push.mapInput",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Push",
    "qualifiedName": "Push.mapInput",
    "declarationKey": "declaration:bb4388132c60d7ecfb25e2b4",
    "family": "variable",
    "signatures": [
      "export declare const mapInput: {\n    <C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => A): Push<C, E, R, B, E2, R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 428,
          "column": 14
        },
        "end": {
          "line": 444,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 429,
          "column": 3
        },
        "end": {
          "line": 431,
          "column": 84
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 433,
          "column": 3
        },
        "end": {
          "line": 433,
          "column": 101
        }
      }
    ],
    "aliases": [
      "@typed/fx/Push#mapInput"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Push",
    "static": false,
    "importedFrom": "declaration:bb4388132c60d7ecfb25e2b4"
  },
  "declaration": {
    "declarationKey": "declaration:bb4388132c60d7ecfb25e2b4",
    "name": "mapInput",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const mapInput: {\n    <C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => A): Push<C, E, R, B, E2, R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 428,
              "column": 14
            },
            "end": {
              "line": 444,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;",
          "<A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => A): Push<C, E, R, B, E2, R2>;"
        ],
        "typeParameters": [
          "C",
          "A",
          "E",
          "R",
          "B",
          "E2",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 429,
              "column": 3
            },
            "end": {
              "line": 431,
              "column": 84
            }
          },
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 433,
              "column": 3
            },
            "end": {
              "line": 433,
              "column": 101
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const mapInput: {\n    <C, A>(f: (c: C) => A): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<C, E, R, B, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => A): Push<C, E, R, B, E2, R2>;\n};"
    ],
    "typeParameters": [
      "C",
      "A",
      "E",
      "R",
      "B",
      "E2",
      "R2"
    ],
    "summary": "Synchronously transforms each successful input before sending it to the Sink.\n\nOne input maps to exactly one downstream input. Calling `onSuccess` evaluates\n`f` immediately, before the returned downstream Effect is run; allocation and\nthrown exceptions therefore occur at callback invocation (and become defects\nonly when that invocation itself occurs inside Effect evaluation). The Sink\ncallback Effect remains the acknowledgment. Calls are not serialized; execution\norder and concurrency follow the producer. The Fx output is unchanged.",
    "sections": {
      "Why": "Adapt an external command shape to an existing consumer without rebuilding or\nchanging the independent output stream.",
      "Ownership and lifetime": "`f` runs synchronously when `onSuccess` is called, before its returned Effect\nexists, and acquires no resource. Downstream handling retains the original\nSink's `E`, `R`, caller fiber, interruption, and cleanup behavior."
    },
    "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 events: Array<string> = []\nconst base = Push.make(\n  Sink.make(() => Effect.void, (n: number) => Effect.sync(() => events.push(`sink:${n}`))),\n  Fx.empty\n)\nconst mapped = Push.mapInput(base, (text: string) => {\n  events.push(`map:${text}`)\n  return Number(text)\n})\nconst acknowledgement = mapped.onSuccess(\"42\")\n// events is already [\"map:42\"]; the Sink Effect has not run yet.\nconst program = Effect.as(acknowledgement, events)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 428,
          "column": 14
        },
        "end": {
          "line": 444,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 429,
          "column": 3
        },
        "end": {
          "line": 431,
          "column": 84
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 433,
          "column": 3
        },
        "end": {
          "line": 433,
          "column": 101
        }
      }
    ],
    "since": "1.0.0",
    "category": "Transforming inputs"
  }
}
