{
  "id": "@typed/fx/Fx#struct",
  "canonicalId": "@typed/fx/Fx#struct",
  "symbol": {
    "id": "@typed/fx/Fx#struct",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "struct",
    "kind": "function",
    "signatures": [
      "export declare function struct<FXS extends Readonly<Record<string, Fx<any, any, any>>>>(fxs: FXS): Fx<{\n    readonly [K in keyof FXS]: Fx.Success<FXS[K]>;\n}, Fx.Error<FXS[keyof FXS]>, Fx.Services<FXS[keyof FXS]>>;"
    ],
    "summary": "Combines a record of Fx streams into a single Fx that emits a record of the latest values.\nSimilar to `tuple`, but for objects.",
    "sections": {
      "Why": "`struct` gives latest-value combination stable field names. It waits for every field once and\nthen emits a new immutable record when any field source updates.",
      "Ownership and lifetime": "It delegates concurrent ownership and retained latest values to `tuple`. Input failures and\nservices are unioned, and all runs end with the consuming Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nconst user = Fx.struct({ name: Fx.succeed(\"Ada\"), online: Fx.succeed(true) })"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/tuple.ts",
      "line": 98
    },
    "since": "1.0.0",
    "category": "Combining sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#struct",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "struct",
    "qualifiedName": "struct",
    "declarationKey": "declaration:6ce34e8a0628f5c598c0f00c",
    "family": "function",
    "signatures": [
      "export declare function struct<FXS extends Readonly<Record<string, Fx<any, any, any>>>>(fxs: FXS): Fx<{\n    readonly [K in keyof FXS]: Fx.Success<FXS[K]>;\n}, Fx.Error<FXS[keyof FXS]>, Fx.Services<FXS[keyof FXS]>>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/tuple.ts",
        "start": {
          "line": 98,
          "column": 1
        },
        "end": {
          "line": 111,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.struct"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:6ce34e8a0628f5c598c0f00c",
    "name": "struct",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function struct<FXS extends Readonly<Record<string, Fx<any, any, any>>>>(fxs: FXS): Fx<{\n    readonly [K in keyof FXS]: Fx.Success<FXS[K]>;\n}, Fx.Error<FXS[keyof FXS]>, Fx.Services<FXS[keyof FXS]>>;"
        ],
        "typeParameters": [
          "FXS extends Readonly<Record<string, Fx<any, any, any>>>"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/tuple.ts",
            "start": {
              "line": 98,
              "column": 1
            },
            "end": {
              "line": 111,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function struct<FXS extends Readonly<Record<string, Fx<any, any, any>>>>(fxs: FXS): Fx<{\n    readonly [K in keyof FXS]: Fx.Success<FXS[K]>;\n}, Fx.Error<FXS[keyof FXS]>, Fx.Services<FXS[keyof FXS]>>;"
    ],
    "typeParameters": [
      "FXS extends Readonly<Record<string, Fx<any, any, any>>>"
    ],
    "summary": "Combines a record of Fx streams into a single Fx that emits a record of the latest values.\nSimilar to `tuple`, but for objects.",
    "sections": {
      "Why": "`struct` gives latest-value combination stable field names. It waits for every field once and\nthen emits a new immutable record when any field source updates.",
      "Ownership and lifetime": "It delegates concurrent ownership and retained latest values to `tuple`. Input failures and\nservices are unioned, and all runs end with the consuming Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nconst user = Fx.struct({ name: Fx.succeed(\"Ada\"), online: Fx.succeed(true) })"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/tuple.ts",
        "start": {
          "line": 98,
          "column": 1
        },
        "end": {
          "line": 111,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Combining sources"
  }
}
