{
  "id": "@typed/fx#RefSubject.hydrate",
  "canonicalId": "@typed/fx/RefSubject#hydrate",
  "symbol": {
    "id": "@typed/fx#RefSubject.hydrate",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "RefSubject.hydrate",
    "kind": "function",
    "signatures": [
      "export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name: string;\n}): HydrateEffect<S, E, R>;",
      "export declare function hydrate<S extends Schema.Top, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options?: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name?: undefined;\n}): HydrateEffect<S, E, R>;"
    ],
    "summary": "Creates a named hydrated RefSubject using a string-encoded Schema codec.",
    "sections": {
      "Why": "Creates state whose server value is Schema-encoded and whose browser value is Schema-decoded\nbefore the initializer resumes.",
      "Ownership and lifetime": "The creation Effect requires Scope; that Scope owns initializer subscriptions and deferred\nserver/client coordination. Schema errors and codec services remain typed.\n\nValues, Effects, Effect Streams, and Fx are accepted as initializers. A named string codec uses\nits own `data-*` attribute; unnamed values share the versioned `data-typed-refsubject` envelope.\nSee {@link https://effect.website/docs/schema/introduction/ Effect Schema} for the codec and\nservice model used by this boundary.",
      "Synchronous configuration errors": "Supplying an empty name, the reserved `typed-refsubject` name, or a name containing characters\nforbidden in an HTML attribute throws `TypeError` immediately while `hydrate` is called. These\nprogrammer errors are outside the returned Effect's typed error channel. Schema decoding and\nencoding failures remain `Schema.SchemaError`, and codec requirements remain typed services."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Schema } from \"effect\"\nimport * as Hydration from \"@typed/fx/RefSubject\"\nimport { RefSubject } from \"@typed/fx\"\n\nconst attributes = Effect.scoped(Effect.gen(function* () {\n  const count = yield* Hydration.hydrate(Schema.FiniteFromString, 0, { name: \"count\" })\n  yield* RefSubject.update(count, (value) => value + 1)\n  return yield* count[Hydration.HydrationRefTypeId].toAttributes\n}))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/Hydration.ts",
      "line": 486
    },
    "since": "2.0.0",
    "category": "Hydration construction"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#RefSubject.hydrate",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "RefSubject",
    "qualifiedName": "RefSubject.hydrate",
    "declarationKey": "declaration:2af1eeec5c4adafc485c08f3",
    "family": "function",
    "signatures": [
      "export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name: string;\n}): HydrateEffect<S, E, R>;",
      "export declare function hydrate<S extends Schema.Top, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options?: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name?: undefined;\n}): HydrateEffect<S, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/Hydration.ts",
        "start": {
          "line": 486,
          "column": 1
        },
        "end": {
          "line": 490,
          "column": 27
        }
      },
      {
        "file": "packages/fx/src/RefSubject/Hydration.ts",
        "start": {
          "line": 508,
          "column": 1
        },
        "end": {
          "line": 512,
          "column": 27
        }
      }
    ],
    "aliases": [
      "@typed/fx/RefSubject#hydrate"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#RefSubject",
    "static": false,
    "importedFrom": "declaration:2af1eeec5c4adafc485c08f3"
  },
  "declaration": {
    "declarationKey": "declaration:2af1eeec5c4adafc485c08f3",
    "name": "hydrate",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name: string;\n}): HydrateEffect<S, E, R>;",
          "export declare function hydrate<S extends Schema.Top, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options?: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name?: undefined;\n}): HydrateEffect<S, E, R>;"
        ],
        "typeParameters": [
          "S extends Schema.Codec<any, string, any, any>",
          "E = never",
          "R = never",
          "S extends Schema.Top"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/Hydration.ts",
            "start": {
              "line": 486,
              "column": 1
            },
            "end": {
              "line": 490,
              "column": 27
            }
          },
          {
            "file": "packages/fx/src/RefSubject/Hydration.ts",
            "start": {
              "line": 508,
              "column": 1
            },
            "end": {
              "line": 512,
              "column": 27
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function hydrate<S extends Schema.Codec<any, string, any, any>, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name: string;\n}): HydrateEffect<S, E, R>;",
      "export declare function hydrate<S extends Schema.Top, E = never, R = never>(schema: S, effect: HydrationInput<NoInfer<Schema.Schema.Type<S>>, E, R>, options?: HydrateOptions<Schema.Schema.Type<S>> & {\n    readonly name?: undefined;\n}): HydrateEffect<S, E, R>;"
    ],
    "typeParameters": [
      "S extends Schema.Codec<any, string, any, any>",
      "E = never",
      "R = never",
      "S extends Schema.Top"
    ],
    "summary": "Creates a named hydrated RefSubject using a string-encoded Schema codec.",
    "sections": {
      "Why": "Creates state whose server value is Schema-encoded and whose browser value is Schema-decoded\nbefore the initializer resumes.",
      "Ownership and lifetime": "The creation Effect requires Scope; that Scope owns initializer subscriptions and deferred\nserver/client coordination. Schema errors and codec services remain typed.\n\nValues, Effects, Effect Streams, and Fx are accepted as initializers. A named string codec uses\nits own `data-*` attribute; unnamed values share the versioned `data-typed-refsubject` envelope.\nSee {@link https://effect.website/docs/schema/introduction/ Effect Schema} for the codec and\nservice model used by this boundary.",
      "Synchronous configuration errors": "Supplying an empty name, the reserved `typed-refsubject` name, or a name containing characters\nforbidden in an HTML attribute throws `TypeError` immediately while `hydrate` is called. These\nprogrammer errors are outside the returned Effect's typed error channel. Schema decoding and\nencoding failures remain `Schema.SchemaError`, and codec requirements remain typed services."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Schema } from \"effect\"\nimport * as Hydration from \"@typed/fx/RefSubject\"\nimport { RefSubject } from \"@typed/fx\"\n\nconst attributes = Effect.scoped(Effect.gen(function* () {\n  const count = yield* Hydration.hydrate(Schema.FiniteFromString, 0, { name: \"count\" })\n  yield* RefSubject.update(count, (value) => value + 1)\n  return yield* count[Hydration.HydrationRefTypeId].toAttributes\n}))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/Hydration.ts",
        "start": {
          "line": 486,
          "column": 1
        },
        "end": {
          "line": 490,
          "column": 27
        }
      },
      {
        "file": "packages/fx/src/RefSubject/Hydration.ts",
        "start": {
          "line": 508,
          "column": 1
        },
        "end": {
          "line": 512,
          "column": 27
        }
      }
    ],
    "since": "2.0.0",
    "category": "Hydration construction"
  }
}
