{
  "id": "@typed/fx#Fx.filterEffect",
  "canonicalId": "@typed/fx/Fx#filterEffect",
  "symbol": {
    "id": "@typed/fx#Fx.filterEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.filterEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(self: Fx<A, E | E2, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "summary": "Filters elements of an Fx using an effectful predicate function.",
    "sections": {
      "Why": "`filterEffect` supports service-backed or failing decisions without flattening a second Fx. Each\ninput runs one predicate Effect; `true` emits once and `false` emits nothing. The adapter does not\nserialize concurrent producer deliveries, so accepted values may arrive out of input order.",
      "Ownership and lifetime": "A predicate Effect belongs to the producer callback that invoked it. Its Cause is sent to the\nSink, `R2` stays required, and interruption follows that delivery. No lock or queue is added."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst concurrent = Fx.make<number>((sink) =>\n  Effect.all([sink.onSuccess(1), sink.onSuccess(2)], { concurrency: \"unbounded\", discard: true })\n)\nconst positive = concurrent.pipe(Fx.filterEffect((n) => Effect.succeed(n > 0)))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
      "line": 36
    },
    "since": "1.0.0",
    "category": "Selecting values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.filterEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.filterEffect",
    "declarationKey": "declaration:c4e92179a6d2a69ddc60cb33",
    "family": "variable",
    "signatures": [
      "export declare const filterEffect: {\n    <A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(self: Fx<A, E | E2, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 36,
          "column": 14
        },
        "end": {
          "line": 52,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 39,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 41,
          "column": 3
        },
        "end": {
          "line": 44,
          "column": 28
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#filterEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:c4e92179a6d2a69ddc60cb33"
  },
  "declaration": {
    "declarationKey": "declaration:c4e92179a6d2a69ddc60cb33",
    "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>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(self: Fx<A, E | E2, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
            "start": {
              "line": 36,
              "column": 14
            },
            "end": {
              "line": 52,
              "column": 2
            }
          }
        ],
        "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>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;",
          "<A, E, R, E2, R2>(self: Fx<A, E | E2, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "A",
          "E2",
          "R2",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
            "start": {
              "line": 37,
              "column": 3
            },
            "end": {
              "line": 39,
              "column": 62
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
            "start": {
              "line": 41,
              "column": 3
            },
            "end": {
              "line": 44,
              "column": 28
            }
          }
        ],
        "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>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, E2, R2>(self: Fx<A, E | E2, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "A",
      "E2",
      "R2",
      "E",
      "R"
    ],
    "summary": "Filters elements of an Fx using an effectful predicate function.",
    "sections": {
      "Why": "`filterEffect` supports service-backed or failing decisions without flattening a second Fx. Each\ninput runs one predicate Effect; `true` emits once and `false` emits nothing. The adapter does not\nserialize concurrent producer deliveries, so accepted values may arrive out of input order.",
      "Ownership and lifetime": "A predicate Effect belongs to the producer callback that invoked it. Its Cause is sent to the\nSink, `R2` stays required, and interruption follows that delivery. No lock or queue is added."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { Fx } from \"@typed/fx\"\n\nconst concurrent = Fx.make<number>((sink) =>\n  Effect.all([sink.onSuccess(1), sink.onSuccess(2)], { concurrency: \"unbounded\", discard: true })\n)\nconst positive = concurrent.pipe(Fx.filterEffect((n) => Effect.succeed(n > 0)))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 36,
          "column": 14
        },
        "end": {
          "line": 52,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 39,
          "column": 62
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterEffect.ts",
        "start": {
          "line": 41,
          "column": 3
        },
        "end": {
          "line": 44,
          "column": 28
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting values"
  }
}
