{
  "id": "@typed/fx#Sink.filterEffect",
  "canonicalId": "@typed/fx/Sink#filterEffect",
  "symbol": {
    "id": "@typed/fx#Sink.filterEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Sink.filterEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<A, E | E2, R | R2>;\n    <A, E, R>(sink: Sink<A, E, R>, f: (a: A) => Effect.Effect<boolean, E, R>): Sink<A, E, R>;\n};"
    ],
    "summary": "Runs an effectful predicate and forwards inputs for which it succeeds with `true`.",
    "sections": {
      "Why": "A consumer can filter using service-backed or asynchronous policy without changing the producer.",
      "Ownership and lifetime": "Each input runs one predicate Effect. `true` forwards once, `false` not at all, and predicate\nfailure reaches the sink's failure callback. The producer controls callback ordering and\nconcurrency; predicate services and interruption remain typed."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst positive = Sink.filterEffect(Sink.make(Effect.logError, Effect.log), (n: number) => Effect.succeed(n > 0))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1391
    },
    "since": "1.0.0",
    "category": "Selecting inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Sink.filterEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Sink",
    "qualifiedName": "Sink.filterEffect",
    "declarationKey": "declaration:e50c4cc039490646c76a6e72",
    "family": "variable",
    "signatures": [
      "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<A, E | E2, R | R2>;\n    <A, E, R>(sink: Sink<A, E, R>, f: (a: A) => Effect.Effect<boolean, E, R>): Sink<A, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1391,
          "column": 14
        },
        "end": {
          "line": 1403,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1392,
          "column": 3
        },
        "end": {
          "line": 1394,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1395,
          "column": 3
        },
        "end": {
          "line": 1395,
          "column": 92
        }
      }
    ],
    "aliases": [
      "@typed/fx/Sink#filterEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Sink",
    "static": false,
    "importedFrom": "declaration:e50c4cc039490646c76a6e72"
  },
  "declaration": {
    "declarationKey": "declaration:e50c4cc039490646c76a6e72",
    "name": "filterEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<A, E | E2, R | R2>;\n    <A, E, R>(sink: Sink<A, E, R>, f: (a: A) => Effect.Effect<boolean, E, R>): Sink<A, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1391,
              "column": 14
            },
            "end": {
              "line": 1403,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<A, E | E2, R | R2>;",
          "<A, E, R>(sink: Sink<A, E, R>, f: (a: A) => Effect.Effect<boolean, E, R>): Sink<A, E, R>;"
        ],
        "typeParameters": [
          "A",
          "E2",
          "R2",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1392,
              "column": 3
            },
            "end": {
              "line": 1394,
              "column": 66
            }
          },
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1395,
              "column": 3
            },
            "end": {
              "line": 1395,
              "column": 92
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(sink: Sink<A, E | E2, R>) => Sink<A, E | E2, R | R2>;\n    <A, E, R>(sink: Sink<A, E, R>, f: (a: A) => Effect.Effect<boolean, E, R>): Sink<A, E, R>;\n};"
    ],
    "typeParameters": [
      "A",
      "E2",
      "R2",
      "E",
      "R"
    ],
    "summary": "Runs an effectful predicate and forwards inputs for which it succeeds with `true`.",
    "sections": {
      "Why": "A consumer can filter using service-backed or asynchronous policy without changing the producer.",
      "Ownership and lifetime": "Each input runs one predicate Effect. `true` forwards once, `false` not at all, and predicate\nfailure reaches the sink's failure callback. The producer controls callback ordering and\nconcurrency; predicate services and interruption remain typed."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst positive = Sink.filterEffect(Sink.make(Effect.logError, Effect.log), (n: number) => Effect.succeed(n > 0))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1391,
          "column": 14
        },
        "end": {
          "line": 1403,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1392,
          "column": 3
        },
        "end": {
          "line": 1394,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1395,
          "column": 3
        },
        "end": {
          "line": 1395,
          "column": 92
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting inputs"
  }
}
