{
  "id": "@typed/fx#RefSubject.set",
  "canonicalId": "@typed/fx/RefSubject#set",
  "symbol": {
    "id": "@typed/fx#RefSubject.set",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "RefSubject.set",
    "kind": "constant",
    "signatures": [
      "export declare const set: {\n    <A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;\n    <A, E, R>(ref: RefSubject<A, E, R>, a: A): Effect.Effect<A, E, R>;\n};"
    ],
    "summary": "Sets the value of a `RefSubject`.",
    "sections": {
      "Why": "Sets the value of a `RefSubject`. The transition is serialized at the RefSubject rather than\ncoordinated by callers or UI components.",
      "Ownership and lifetime": "Running set performs one serialized subject transition and resolves with its committed value. It\nacquires no resource; failures and services remain those of the source ref."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefSubject from \"@typed/fx/RefSubject\"\n\nconst program = Effect.gen(function* () {\n  const count = yield* RefSubject.make(0)\n\n  // Set the value\n  yield* RefSubject.set(count, 10)\n  const value = yield* count\n  console.log(value) // 10\n\n  // Can also use pipe syntax\n  yield* count.pipe(RefSubject.set(20))\n  const newValue = yield* count\n  console.log(newValue) // 20\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefSubject.ts",
      "line": 2155
    },
    "since": "1.0.0",
    "category": "State updates"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#RefSubject.set",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "RefSubject",
    "qualifiedName": "RefSubject.set",
    "declarationKey": "declaration:f9451b3030ecb092be273409",
    "family": "variable",
    "signatures": [
      "export declare const set: {\n    <A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;\n    <A, E, R>(ref: RefSubject<A, E, R>, a: A): Effect.Effect<A, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2155,
          "column": 14
        },
        "end": {
          "line": 2160,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2156,
          "column": 3
        },
        "end": {
          "line": 2156,
          "column": 77
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2157,
          "column": 3
        },
        "end": {
          "line": 2157,
          "column": 69
        }
      }
    ],
    "aliases": [
      "@typed/fx/RefSubject#set"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#RefSubject",
    "static": false,
    "importedFrom": "declaration:f9451b3030ecb092be273409"
  },
  "declaration": {
    "declarationKey": "declaration:f9451b3030ecb092be273409",
    "name": "set",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const set: {\n    <A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;\n    <A, E, R>(ref: RefSubject<A, E, R>, a: A): Effect.Effect<A, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefSubject.ts",
            "start": {
              "line": 2155,
              "column": 14
            },
            "end": {
              "line": 2160,
              "column": 3
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;",
          "<A, E, R>(ref: RefSubject<A, E, R>, a: A): Effect.Effect<A, E, R>;"
        ],
        "typeParameters": [
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefSubject.ts",
            "start": {
              "line": 2156,
              "column": 3
            },
            "end": {
              "line": 2156,
              "column": 77
            }
          },
          {
            "file": "packages/fx/src/RefSubject/RefSubject.ts",
            "start": {
              "line": 2157,
              "column": 3
            },
            "end": {
              "line": 2157,
              "column": 69
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const set: {\n    <A>(value: A): <E, R>(ref: RefSubject<A, E, R>) => Effect.Effect<A, E, R>;\n    <A, E, R>(ref: RefSubject<A, E, R>, a: A): Effect.Effect<A, E, R>;\n};"
    ],
    "typeParameters": [
      "A",
      "E",
      "R"
    ],
    "summary": "Sets the value of a `RefSubject`.",
    "sections": {
      "Why": "Sets the value of a `RefSubject`. The transition is serialized at the RefSubject rather than\ncoordinated by callers or UI components.",
      "Ownership and lifetime": "Running set performs one serialized subject transition and resolves with its committed value. It\nacquires no resource; failures and services remain those of the source ref."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as RefSubject from \"@typed/fx/RefSubject\"\n\nconst program = Effect.gen(function* () {\n  const count = yield* RefSubject.make(0)\n\n  // Set the value\n  yield* RefSubject.set(count, 10)\n  const value = yield* count\n  console.log(value) // 10\n\n  // Can also use pipe syntax\n  yield* count.pipe(RefSubject.set(20))\n  const newValue = yield* count\n  console.log(newValue) // 20\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2155,
          "column": 14
        },
        "end": {
          "line": 2160,
          "column": 3
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2156,
          "column": 3
        },
        "end": {
          "line": 2156,
          "column": 77
        }
      },
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2157,
          "column": 3
        },
        "end": {
          "line": 2157,
          "column": 69
        }
      }
    ],
    "since": "1.0.0",
    "category": "State updates"
  }
}
