{
  "id": "@typed/fx/Push#filterMap",
  "canonicalId": "@typed/fx/Push#filterMap",
  "symbol": {
    "id": "@typed/fx/Push#filterMap",
    "packageName": "@typed/fx",
    "moduleName": "Push",
    "exportName": "filterMap",
    "kind": "constant",
    "signatures": [
      "export declare const filterMap: {\n    <B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Option.Option<C>): Push<A, E, R, C, E2, R2>;\n};"
    ],
    "summary": "Maps each Fx output and emits only resulting `Some` values.\n\nThe upstream Sink evaluates `f` synchronously for each value, before its\nreturned downstream callback Effect runs. Mapping allocation and throws occur\nat that callback invocation. `Some(c)` emits exactly one `c`; `None` emits\nnothing. Relative order, errors, services, and input behavior are preserved.",
    "sections": {
      "Why": "Combine output parsing and filtering without a sentinel value or a second pass.",
      "Ownership and lifetime": "The mapper is synchronous at upstream `onSuccess` invocation and resource-free.\nThe wrapped Fx retains ownership of subscription, Scope, interruption, and\nfinalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } 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 push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.fromIterable([\"1\", \"x\"]))\nconst numbers = Push.filterMap(push, (text) => /^\\d+$/.test(text) ? Option.some(Number(text)) : Option.none())"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 1169
    },
    "since": "1.0.0",
    "category": "Selecting outputs"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Push#filterMap",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Push",
    "consumerSpecifier": "@typed/fx/Push",
    "exportName": "filterMap",
    "qualifiedName": "filterMap",
    "declarationKey": "declaration:c47ba4a7a7bcc3baaca29ce6",
    "family": "variable",
    "signatures": [
      "export declare const filterMap: {\n    <B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Option.Option<C>): Push<A, E, R, C, E2, R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1169,
          "column": 14
        },
        "end": {
          "line": 1187,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1170,
          "column": 3
        },
        "end": {
          "line": 1172,
          "column": 84
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1173,
          "column": 3
        },
        "end": {
          "line": 1176,
          "column": 31
        }
      }
    ],
    "aliases": [
      "@typed/fx#Push.filterMap"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:c47ba4a7a7bcc3baaca29ce6",
    "name": "filterMap",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterMap: {\n    <B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Option.Option<C>): Push<A, E, R, C, E2, R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 1169,
              "column": 14
            },
            "end": {
              "line": 1187,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;",
          "<A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Option.Option<C>): Push<A, E, R, C, E2, R2>;"
        ],
        "typeParameters": [
          "B",
          "C",
          "A",
          "E",
          "R",
          "E2",
          "R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 1170,
              "column": 3
            },
            "end": {
              "line": 1172,
              "column": 84
            }
          },
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 1173,
              "column": 3
            },
            "end": {
              "line": 1176,
              "column": 31
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterMap: {\n    <B, C>(f: (b: B) => Option.Option<C>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2, R2>;\n    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Option.Option<C>): Push<A, E, R, C, E2, R2>;\n};"
    ],
    "typeParameters": [
      "B",
      "C",
      "A",
      "E",
      "R",
      "E2",
      "R2"
    ],
    "summary": "Maps each Fx output and emits only resulting `Some` values.\n\nThe upstream Sink evaluates `f` synchronously for each value, before its\nreturned downstream callback Effect runs. Mapping allocation and throws occur\nat that callback invocation. `Some(c)` emits exactly one `c`; `None` emits\nnothing. Relative order, errors, services, and input behavior are preserved.",
    "sections": {
      "Why": "Combine output parsing and filtering without a sentinel value or a second pass.",
      "Ownership and lifetime": "The mapper is synchronous at upstream `onSuccess` invocation and resource-free.\nThe wrapped Fx retains ownership of subscription, Scope, interruption, and\nfinalizers."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Option } 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 push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.fromIterable([\"1\", \"x\"]))\nconst numbers = Push.filterMap(push, (text) => /^\\d+$/.test(text) ? Option.some(Number(text)) : Option.none())"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1169,
          "column": 14
        },
        "end": {
          "line": 1187,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1170,
          "column": 3
        },
        "end": {
          "line": 1172,
          "column": 84
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 1173,
          "column": 3
        },
        "end": {
          "line": 1176,
          "column": 31
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting outputs"
  }
}
