{
  "id": "@typed/fx#Push.filterInputEffect",
  "canonicalId": "@typed/fx/Push#filterInputEffect",
  "symbol": {
    "id": "@typed/fx#Push.filterInputEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Push.filterInputEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterInputEffect: {\n    <A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;\n    <A, E, R, B, E2, R2, R3>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => Effect.Effect<boolean, E, R3>): Push<A, E, R | R3, B, E2, R2>;\n};"
    ],
    "summary": "Effectfully decides whether each successful input reaches the Sink.\n\nCalling `onSuccess(value)` invokes `f(value)` immediately to construct the\npredicate Effect; allocation and throws happen before an acknowledgment is\nreturned. Running the acknowledgment later executes that Effect in the caller's\nfiber. `true` forwards one value, `false` none, and failure sends its Cause to\nthe Sink failure callback. Calls are not serialized; the producer controls\norder and concurrency. Output behavior is unchanged.",
    "sections": {
      "Why": "This supports authorization and service-backed eligibility checks directly at\nthe consumer boundary.",
      "Ownership and lifetime": "Predicate Effect construction is eager; its execution and downstream callback\nbelong to the fiber that runs the returned acknowledgment, whose interruption\nstops them. Predicate services join input `R`; typed `E` is consumed through\nthe Sink failure channel."
    },
    "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 even = Push.filterInputEffect(\n  Push.make(Sink.make(() => Effect.void, (_n: number) => Effect.void), Fx.empty),\n  (n) => Effect.succeed(n % 2 === 0)\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 616
    },
    "since": "1.0.0",
    "category": "Selecting inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Push.filterInputEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Push",
    "qualifiedName": "Push.filterInputEffect",
    "declarationKey": "declaration:b3091041eb716363d4ae62df",
    "family": "variable",
    "signatures": [
      "export declare const filterInputEffect: {\n    <A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;\n    <A, E, R, B, E2, R2, R3>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => Effect.Effect<boolean, E, R3>): Push<A, E, R | R3, B, E2, R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 616,
          "column": 14
        },
        "end": {
          "line": 642,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 617,
          "column": 3
        },
        "end": {
          "line": 619,
          "column": 86
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 621,
          "column": 3
        },
        "end": {
          "line": 624,
          "column": 36
        }
      }
    ],
    "aliases": [
      "@typed/fx/Push#filterInputEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Push",
    "static": false,
    "importedFrom": "declaration:b3091041eb716363d4ae62df"
  },
  "declaration": {
    "declarationKey": "declaration:b3091041eb716363d4ae62df",
    "name": "filterInputEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterInputEffect: {\n    <A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;\n    <A, E, R, B, E2, R2, R3>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => Effect.Effect<boolean, E, R3>): Push<A, E, R | R3, B, E2, R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 616,
              "column": 14
            },
            "end": {
              "line": 642,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;",
          "<A, E, R, B, E2, R2, R3>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => Effect.Effect<boolean, E, R3>): Push<A, E, R | R3, B, E2, R2>;"
        ],
        "typeParameters": [
          "A",
          "R3",
          "E",
          "R",
          "B",
          "E2",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 617,
              "column": 3
            },
            "end": {
              "line": 619,
              "column": 86
            }
          },
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 621,
              "column": 3
            },
            "end": {
              "line": 624,
              "column": 36
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterInputEffect: {\n    <A, R3, E>(f: (a: A) => Effect.Effect<boolean, E, R3>): <R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R | R3, B, E2, R2>;\n    <A, E, R, B, E2, R2, R3>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => Effect.Effect<boolean, E, R3>): Push<A, E, R | R3, B, E2, R2>;\n};"
    ],
    "typeParameters": [
      "A",
      "R3",
      "E",
      "R",
      "B",
      "E2",
      "R2"
    ],
    "summary": "Effectfully decides whether each successful input reaches the Sink.\n\nCalling `onSuccess(value)` invokes `f(value)` immediately to construct the\npredicate Effect; allocation and throws happen before an acknowledgment is\nreturned. Running the acknowledgment later executes that Effect in the caller's\nfiber. `true` forwards one value, `false` none, and failure sends its Cause to\nthe Sink failure callback. Calls are not serialized; the producer controls\norder and concurrency. Output behavior is unchanged.",
    "sections": {
      "Why": "This supports authorization and service-backed eligibility checks directly at\nthe consumer boundary.",
      "Ownership and lifetime": "Predicate Effect construction is eager; its execution and downstream callback\nbelong to the fiber that runs the returned acknowledgment, whose interruption\nstops them. Predicate services join input `R`; typed `E` is consumed through\nthe Sink failure channel."
    },
    "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 even = Push.filterInputEffect(\n  Push.make(Sink.make(() => Effect.void, (_n: number) => Effect.void), Fx.empty),\n  (n) => Effect.succeed(n % 2 === 0)\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 616,
          "column": 14
        },
        "end": {
          "line": 642,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 617,
          "column": 3
        },
        "end": {
          "line": 619,
          "column": 86
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 621,
          "column": 3
        },
        "end": {
          "line": 624,
          "column": 36
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting inputs"
  }
}
