{
  "id": "@typed/fx#RefSubject.struct",
  "canonicalId": "@typed/fx/RefSubject#struct",
  "symbol": {
    "id": "@typed/fx#RefSubject.struct",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "RefSubject.struct",
    "kind": "function",
    "signatures": [
      "export declare function struct<const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>>(refs: Refs): StructFrom<Refs>;"
    ],
    "summary": "Combines multiple `RefSubject`, `Computed`, or `Filtered` instances into a single struct.",
    "sections": {
      "Why": "Combines several refs into one state value while preserving whether the result is writable,\ncomputed, or filtered from its inputs.",
      "Ownership and lifetime": "This declaration performs no acquisition and retains no resources. Implementations preserve\nsource errors, services, and lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefSubject from \"@typed/fx/RefSubject\"\n\nconst program = Effect.gen(function* () {\n  const firstName = yield* RefSubject.make(\"Alice\")\n  const lastName = yield* RefSubject.make(\"Smith\")\n  const age = yield* RefSubject.make(30)\n\n  // Combine into a struct\n  const person = RefSubject.struct({\n    firstName,\n    lastName,\n    age\n  })\n\n  const fullPerson = yield* person\n  console.log(fullPerson) // { firstName: \"Alice\", lastName: \"Smith\", age: 30 }\n\n  // Update one field\n  yield* RefSubject.set(firstName, \"Bob\")\n\n  // Struct automatically updates\n  const updated = yield* person\n  console.log(updated.firstName) // \"Bob\"\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefSubject.ts",
      "line": 3796
    },
    "since": "1.0.0",
    "category": "State composition"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#RefSubject.struct",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "RefSubject",
    "qualifiedName": "RefSubject.struct",
    "declarationKey": "declaration:6b71a2165b24e812d100bbbf",
    "family": "function",
    "signatures": [
      "export declare function struct<const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>>(refs: Refs): StructFrom<Refs>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 3796,
          "column": 1
        },
        "end": {
          "line": 3808,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/RefSubject#struct"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#RefSubject",
    "static": false,
    "importedFrom": "declaration:6b71a2165b24e812d100bbbf"
  },
  "declaration": {
    "declarationKey": "declaration:6b71a2165b24e812d100bbbf",
    "name": "struct",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function struct<const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>>(refs: Refs): StructFrom<Refs>;"
        ],
        "typeParameters": [
          "const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefSubject.ts",
            "start": {
              "line": 3796,
              "column": 1
            },
            "end": {
              "line": 3808,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function struct<const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>>(refs: Refs): StructFrom<Refs>;"
    ],
    "typeParameters": [
      "const Refs extends Readonly<Record<string, RefSubject.Any | Computed.Any | Filtered.Any>>"
    ],
    "summary": "Combines multiple `RefSubject`, `Computed`, or `Filtered` instances into a single struct.",
    "sections": {
      "Why": "Combines several refs into one state value while preserving whether the result is writable,\ncomputed, or filtered from its inputs.",
      "Ownership and lifetime": "This declaration performs no acquisition and retains no resources. Implementations preserve\nsource errors, services, and lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefSubject from \"@typed/fx/RefSubject\"\n\nconst program = Effect.gen(function* () {\n  const firstName = yield* RefSubject.make(\"Alice\")\n  const lastName = yield* RefSubject.make(\"Smith\")\n  const age = yield* RefSubject.make(30)\n\n  // Combine into a struct\n  const person = RefSubject.struct({\n    firstName,\n    lastName,\n    age\n  })\n\n  const fullPerson = yield* person\n  console.log(fullPerson) // { firstName: \"Alice\", lastName: \"Smith\", age: 30 }\n\n  // Update one field\n  yield* RefSubject.set(firstName, \"Bob\")\n\n  // Struct automatically updates\n  const updated = yield* person\n  console.log(updated.firstName) // \"Bob\"\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 3796,
          "column": 1
        },
        "end": {
          "line": 3808,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "State composition"
  }
}
