{
  "id": "@typed/ui/Collection#makeState",
  "canonicalId": "@typed/ui/Collection#makeState",
  "symbol": {
    "id": "@typed/ui/Collection#makeState",
    "packageName": "@typed/ui",
    "moduleName": "Collection",
    "exportName": "makeState",
    "kind": "function",
    "signatures": [
      "export declare function makeState<Value = unknown, Element extends object = globalThis.Element>(initial?: State<Value, Element>): Effect.Effect<RefSubject.RefSubject<State<Value, Element>>, never, Scope.Scope>;"
    ],
    "summary": "Creates hydrated Collection state. The collection starts with the supplied immutable item array,\nor empty.",
    "sections": {
      "Why": "State and collection ownership can be composed and tested independently from any renderer.",
      "Ownership and lifetime": "The returned Effect creates the RefSubject when run. That state is renderer-independent;\ncollection registrations belong to the separate Scope that runs register or ref, not to state\ncreation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Effect from \"effect/Effect\";\nimport * as Collection from \"@typed/ui/Collection\";\n\nconst program = Effect.scoped(\n  Effect.gen(function* () {\n    const collection = yield* Collection.makeState<string>();\n    return yield* collection;\n  }),\n);"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/ui/src/Collection.ts",
      "line": 138
    },
    "since": "1.0.0",
    "category": "Collection state"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/ui/Collection#makeState",
    "packageName": "@typed/ui",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": "Collection",
    "consumerSpecifier": "@typed/ui/Collection",
    "exportName": "makeState",
    "qualifiedName": "makeState",
    "declarationKey": "declaration:d74e5291a16592ae60ad8c00",
    "family": "function",
    "signatures": [
      "export declare function makeState<Value = unknown, Element extends object = globalThis.Element>(initial?: State<Value, Element>): Effect.Effect<RefSubject.RefSubject<State<Value, Element>>, never, Scope.Scope>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Collection.ts",
        "start": {
          "line": 138,
          "column": 1
        },
        "end": {
          "line": 143,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/ui#Collection.makeState",
      "@typed/ui/index#Collection.makeState"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:d74e5291a16592ae60ad8c00",
    "name": "makeState",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function makeState<Value = unknown, Element extends object = globalThis.Element>(initial?: State<Value, Element>): Effect.Effect<RefSubject.RefSubject<State<Value, Element>>, never, Scope.Scope>;"
        ],
        "typeParameters": [
          "Value = unknown",
          "Element extends object = globalThis.Element"
        ],
        "sourceSpans": [
          {
            "file": "packages/ui/src/Collection.ts",
            "start": {
              "line": 138,
              "column": 1
            },
            "end": {
              "line": 143,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function makeState<Value = unknown, Element extends object = globalThis.Element>(initial?: State<Value, Element>): Effect.Effect<RefSubject.RefSubject<State<Value, Element>>, never, Scope.Scope>;"
    ],
    "typeParameters": [
      "Value = unknown",
      "Element extends object = globalThis.Element"
    ],
    "summary": "Creates hydrated Collection state. The collection starts with the supplied immutable item array,\nor empty.",
    "sections": {
      "Why": "State and collection ownership can be composed and tested independently from any renderer.",
      "Ownership and lifetime": "The returned Effect creates the RefSubject when run. That state is renderer-independent;\ncollection registrations belong to the separate Scope that runs register or ref, not to state\ncreation."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import * as Effect from \"effect/Effect\";\nimport * as Collection from \"@typed/ui/Collection\";\n\nconst program = Effect.scoped(\n  Effect.gen(function* () {\n    const collection = yield* Collection.makeState<string>();\n    return yield* collection;\n  }),\n);"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/Collection.ts",
        "start": {
          "line": 138,
          "column": 1
        },
        "end": {
          "line": 143,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Collection state"
  }
}
