{
  "id": "@typed/fx#Sink.filterMapEffect",
  "canonicalId": "@typed/fx/Sink#filterMapEffect",
  "symbol": {
    "id": "@typed/fx#Sink.filterMapEffect",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Sink.filterMapEffect",
    "kind": "constant",
    "signatures": [
      "export declare const filterMapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<Option.Option<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<Option.Option<A>, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
    ],
    "summary": "Runs an Effect for each input and forwards its optional successful value.",
    "sections": {
      "Why": "Service-backed validation, selection, and transformation can happen in one consumer adapter.",
      "Ownership and lifetime": "Each input runs one Effect. `Some` invokes the sink once, `None` zero times, and failure is routed\nas a Cause. Invocation order and concurrency are controlled by the producer; services and\ninterruption remain explicit in the returned sink."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst sink = Sink.filterMapEffect(Sink.make(Effect.logError, Effect.log), (n: number) =>\n  Effect.succeed(n > 0 ? Option.some(n) : Option.none()))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/combinators.ts",
      "line": 1320
    },
    "since": "1.0.0",
    "category": "Selecting inputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Sink.filterMapEffect",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Sink",
    "qualifiedName": "Sink.filterMapEffect",
    "declarationKey": "declaration:c8d5619505bac7971ae8ce53",
    "family": "variable",
    "signatures": [
      "export declare const filterMapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<Option.Option<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<Option.Option<A>, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1320,
          "column": 14
        },
        "end": {
          "line": 1342,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1321,
          "column": 3
        },
        "end": {
          "line": 1323,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1325,
          "column": 3
        },
        "end": {
          "line": 1328,
          "column": 30
        }
      }
    ],
    "aliases": [
      "@typed/fx/Sink#filterMapEffect"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Sink",
    "static": false,
    "importedFrom": "declaration:c8d5619505bac7971ae8ce53"
  },
  "declaration": {
    "declarationKey": "declaration:c8d5619505bac7971ae8ce53",
    "name": "filterMapEffect",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterMapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<Option.Option<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<Option.Option<A>, E2, R2>): Sink<B, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1320,
              "column": 14
            },
            "end": {
              "line": 1342,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, A, E2, R2>(f: (b: B) => Effect.Effect<Option.Option<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<Option.Option<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": 1321,
              "column": 3
            },
            "end": {
              "line": 1323,
              "column": 66
            }
          },
          {
            "file": "packages/fx/src/Sink/combinators.ts",
            "start": {
              "line": 1325,
              "column": 3
            },
            "end": {
              "line": 1328,
              "column": 30
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterMapEffect: {\n    <B, A, E2, R2>(f: (b: B) => Effect.Effect<Option.Option<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<Option.Option<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 optional successful value.",
    "sections": {
      "Why": "Service-backed validation, selection, and transformation can happen in one consumer adapter.",
      "Ownership and lifetime": "Each input runs one Effect. `Some` invokes the sink once, `None` zero times, and failure is routed\nas a Cause. Invocation order and concurrency are controlled by the producer; services and\ninterruption remain explicit in the returned sink."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\nconst sink = Sink.filterMapEffect(Sink.make(Effect.logError, Effect.log), (n: number) =>\n  Effect.succeed(n > 0 ? Option.some(n) : Option.none()))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1320,
          "column": 14
        },
        "end": {
          "line": 1342,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1321,
          "column": 3
        },
        "end": {
          "line": 1323,
          "column": 66
        }
      },
      {
        "file": "packages/fx/src/Sink/combinators.ts",
        "start": {
          "line": 1325,
          "column": 3
        },
        "end": {
          "line": 1328,
          "column": 30
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting inputs"
  }
}
