{
  "id": "@typed/fx#Fx.filterMap",
  "canonicalId": "@typed/fx/Fx#filterMap",
  "symbol": {
    "id": "@typed/fx#Fx.filterMap",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Fx.filterMap",
    "kind": "constant",
    "signatures": [
      "export declare const filterMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;\n    <A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;\n};"
    ],
    "summary": "Maps and filters elements of an Fx in a single operation.",
    "sections": {
      "Why": "`filterMap` represents a partial synchronous transformation explicitly with `Option`. Each input\nproduces at most one output: `Some` is unwrapped and `None` is omitted, with source order intact.",
      "Ownership and lifetime": "This operation is stateless and acquires no resources. It preserves the source's error and\nservice channels and stops whenever the source or consuming fiber stops."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Option } from \"effect\"\n\nconst numbers = Fx.fromIterable([\"1\", \"x\", \"2\"]).pipe(\n  Fx.filterMap((text) => Number.isNaN(Number(text)) ? Option.none() : Option.some(Number(text))),\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/filterMap.ts",
      "line": 34
    },
    "since": "1.0.0",
    "category": "Selecting values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Fx.filterMap",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Fx",
    "qualifiedName": "Fx.filterMap",
    "declarationKey": "declaration:fd589bee4967db7cf3483ac6",
    "family": "variable",
    "signatures": [
      "export declare const filterMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;\n    <A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 40,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 83
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 37,
          "column": 79
        }
      }
    ],
    "aliases": [
      "@typed/fx/Fx#filterMap"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Fx",
    "static": false,
    "importedFrom": "declaration:fd589bee4967db7cf3483ac6"
  },
  "declaration": {
    "declarationKey": "declaration:fd589bee4967db7cf3483ac6",
    "name": "filterMap",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const filterMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;\n    <A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMap.ts",
            "start": {
              "line": 34,
              "column": 14
            },
            "end": {
              "line": 40,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;",
          "<A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;"
        ],
        "typeParameters": [
          "A",
          "B",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/filterMap.ts",
            "start": {
              "line": 35,
              "column": 3
            },
            "end": {
              "line": 35,
              "column": 83
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/filterMap.ts",
            "start": {
              "line": 37,
              "column": 3
            },
            "end": {
              "line": 37,
              "column": 79
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const filterMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;\n    <A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;\n};"
    ],
    "typeParameters": [
      "A",
      "B",
      "E",
      "R"
    ],
    "summary": "Maps and filters elements of an Fx in a single operation.",
    "sections": {
      "Why": "`filterMap` represents a partial synchronous transformation explicitly with `Option`. Each input\nproduces at most one output: `Some` is unwrapped and `None` is omitted, with source order intact.",
      "Ownership and lifetime": "This operation is stateless and acquires no resources. It preserves the source's error and\nservice channels and stops whenever the source or consuming fiber stops."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Option } from \"effect\"\n\nconst numbers = Fx.fromIterable([\"1\", \"x\", \"2\"]).pipe(\n  Fx.filterMap((text) => Number.isNaN(Number(text)) ? Option.none() : Option.some(Number(text))),\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 34,
          "column": 14
        },
        "end": {
          "line": 40,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 35,
          "column": 3
        },
        "end": {
          "line": 35,
          "column": 83
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/filterMap.ts",
        "start": {
          "line": 37,
          "column": 3
        },
        "end": {
          "line": 37,
          "column": 79
        }
      }
    ],
    "since": "1.0.0",
    "category": "Selecting values"
  }
}
