{
  "id": "@typed/fx#RefOption.flatMap",
  "canonicalId": "@typed/fx/RefOption#flatMap",
  "symbol": {
    "id": "@typed/fx#RefOption.flatMap",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "RefOption.flatMap",
    "kind": "constant",
    "signatures": [
      "export declare const flatMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;\n    <A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;\n};"
    ],
    "summary": "FlatMap the value inside the Option of a RefOption.",
    "sections": {
      "Why": "Projects the optional value with `Option.flatMap` for both a current read and later source\npushes; it never changes the RefOption itself.",
      "Ownership and lifetime": "The flat map view retains no independent state. An Effect read samples the source once; Fx\nobservation follows later pushes and its observing Scope owns subscription cleanup."
    },
    "examples": [],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefOption.ts",
      "line": 163
    },
    "since": "1.18.0",
    "category": "Derived queries"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#RefOption.flatMap",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "RefOption",
    "qualifiedName": "RefOption.flatMap",
    "declarationKey": "declaration:3077bf55d533a9a07243a012",
    "family": "variable",
    "signatures": [
      "export declare const flatMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;\n    <A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 163,
          "column": 14
        },
        "end": {
          "line": 173,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 164,
          "column": 3
        },
        "end": {
          "line": 166,
          "column": 85
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 167,
          "column": 3
        },
        "end": {
          "line": 170,
          "column": 50
        }
      }
    ],
    "aliases": [
      "@typed/fx/RefOption#flatMap"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#RefOption",
    "static": false,
    "importedFrom": "declaration:3077bf55d533a9a07243a012"
  },
  "declaration": {
    "declarationKey": "declaration:3077bf55d533a9a07243a012",
    "name": "flatMap",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const flatMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;\n    <A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefOption.ts",
            "start": {
              "line": 163,
              "column": 14
            },
            "end": {
              "line": 173,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;",
          "<A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;"
        ],
        "typeParameters": [
          "A",
          "B",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefOption.ts",
            "start": {
              "line": 164,
              "column": 3
            },
            "end": {
              "line": 166,
              "column": 85
            }
          },
          {
            "file": "packages/fx/src/RefSubject/RefOption.ts",
            "start": {
              "line": 167,
              "column": 3
            },
            "end": {
              "line": 170,
              "column": 50
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const flatMap: {\n    <A, B>(f: (a: A) => Option.Option<B>): <E, R>(ref: RefOption<A, E, R>) => RefSubject.Computed<Option.Option<B>, E, R>;\n    <A, E, R, B>(ref: RefOption<A, E, R>, f: (a: A) => Option.Option<B>): RefSubject.Computed<Option.Option<B>, E, R>;\n};"
    ],
    "typeParameters": [
      "A",
      "B",
      "E",
      "R"
    ],
    "summary": "FlatMap the value inside the Option of a RefOption.",
    "sections": {
      "Why": "Projects the optional value with `Option.flatMap` for both a current read and later source\npushes; it never changes the RefOption itself.",
      "Ownership and lifetime": "The flat map view retains no independent state. An Effect read samples the source once; Fx\nobservation follows later pushes and its observing Scope owns subscription cleanup."
    },
    "examples": [],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 163,
          "column": 14
        },
        "end": {
          "line": 173,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 164,
          "column": 3
        },
        "end": {
          "line": 166,
          "column": 85
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefOption.ts",
        "start": {
          "line": 167,
          "column": 3
        },
        "end": {
          "line": 170,
          "column": 50
        }
      }
    ],
    "since": "1.18.0",
    "category": "Derived queries"
  }
}
