{
  "id": "@typed/fx#RefStruct.get",
  "canonicalId": "@typed/fx/RefStruct#get",
  "symbol": {
    "id": "@typed/fx#RefStruct.get",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "RefStruct.get",
    "kind": "constant",
    "signatures": [
      "export declare const get: {\n    <S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;\n    <S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;\n};"
    ],
    "summary": "Get a property value from the current state of a RefStruct.",
    "sections": {
      "Why": "Projects a known property as Computed state, so current reads and future pushes stay linked to\nthe struct without copying that field into a second store.",
      "Ownership and lifetime": "The get 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": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefStruct from \"@typed/fx/RefStruct\"\n\nconst program = Effect.scoped(Effect.gen(function* () {\n  const account = yield* RefStruct.make({ name: \"Ada\", active: true })\n  const name = RefStruct.get(account, \"name\")\n  return yield* name\n}))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefStruct.ts",
      "line": 278
    },
    "since": "1.18.0",
    "category": "Derived queries"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#RefStruct.get",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "RefStruct",
    "qualifiedName": "RefStruct.get",
    "declarationKey": "declaration:b8eb5dbec2cf01b3518b7c45",
    "family": "variable",
    "signatures": [
      "export declare const get: {\n    <S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;\n    <S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 278,
          "column": 14
        },
        "end": {
          "line": 293,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 279,
          "column": 3
        },
        "end": {
          "line": 281,
          "column": 73
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 282,
          "column": 3
        },
        "end": {
          "line": 285,
          "column": 38
        }
      }
    ],
    "aliases": [
      "@typed/fx/RefStruct#get"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#RefStruct",
    "static": false,
    "importedFrom": "declaration:b8eb5dbec2cf01b3518b7c45"
  },
  "declaration": {
    "declarationKey": "declaration:b8eb5dbec2cf01b3518b7c45",
    "name": "get",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const get: {\n    <S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;\n    <S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefStruct.ts",
            "start": {
              "line": 278,
              "column": 14
            },
            "end": {
              "line": 293,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;",
          "<S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;"
        ],
        "typeParameters": [
          "S extends object",
          "const K extends keyof S",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefStruct.ts",
            "start": {
              "line": 279,
              "column": 3
            },
            "end": {
              "line": 281,
              "column": 73
            }
          },
          {
            "file": "packages/fx/src/RefSubject/RefStruct.ts",
            "start": {
              "line": 282,
              "column": 3
            },
            "end": {
              "line": 285,
              "column": 38
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const get: {\n    <S extends object, const K extends keyof S>(key: K): <E, R>(ref: RefStruct<S, E, R>) => RefSubject.Computed<S[K], E, R>;\n    <S extends object, const K extends keyof S, E, R>(ref: RefStruct<S, E, R>, key: K): RefSubject.Computed<S[K], E, R>;\n};"
    ],
    "typeParameters": [
      "S extends object",
      "const K extends keyof S",
      "E",
      "R"
    ],
    "summary": "Get a property value from the current state of a RefStruct.",
    "sections": {
      "Why": "Projects a known property as Computed state, so current reads and future pushes stay linked to\nthe struct without copying that field into a second store.",
      "Ownership and lifetime": "The get 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": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefStruct from \"@typed/fx/RefStruct\"\n\nconst program = Effect.scoped(Effect.gen(function* () {\n  const account = yield* RefStruct.make({ name: \"Ada\", active: true })\n  const name = RefStruct.get(account, \"name\")\n  return yield* name\n}))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 278,
          "column": 14
        },
        "end": {
          "line": 293,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 279,
          "column": 3
        },
        "end": {
          "line": 281,
          "column": 73
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefStruct.ts",
        "start": {
          "line": 282,
          "column": 3
        },
        "end": {
          "line": 285,
          "column": 38
        }
      }
    ],
    "since": "1.18.0",
    "category": "Derived queries"
  }
}
