{
  "id": "@typed/fx/RefSubject#increment",
  "canonicalId": "@typed/fx/RefSubject#increment",
  "symbol": {
    "id": "@typed/fx/RefSubject#increment",
    "packageName": "@typed/fx",
    "moduleName": "RefSubject",
    "exportName": "increment",
    "kind": "function",
    "signatures": [
      "export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;"
    ],
    "summary": "Increments a numeric `RefSubject` by 1.",
    "sections": {
      "Why": "Increments a numeric `RefSubject` by 1. The transition is serialized at the RefSubject rather\nthan coordinated by callers or UI components.",
      "Ownership and lifetime": "Running increment performs one serialized subject transition and resolves with its committed\nvalue. It acquires 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  yield* RefSubject.increment(count)\n  const value = yield* count\n  console.log(value) // 1\n\n  yield* RefSubject.increment(count)\n  const newValue = yield* count\n  console.log(newValue) // 2\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/RefSubject/RefSubject.ts",
      "line": 2631
    },
    "since": "1.0.0",
    "category": "State updates"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/RefSubject#increment",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "RefSubject",
    "consumerSpecifier": "@typed/fx/RefSubject",
    "exportName": "increment",
    "qualifiedName": "increment",
    "declarationKey": "declaration:f737808fecb91860e746e0cb",
    "family": "function",
    "signatures": [
      "export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2631,
          "column": 1
        },
        "end": {
          "line": 2633,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#RefSubject.increment"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:f737808fecb91860e746e0cb",
    "name": "increment",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;"
        ],
        "typeParameters": [
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/RefSubject/RefSubject.ts",
            "start": {
              "line": 2631,
              "column": 1
            },
            "end": {
              "line": 2633,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function increment<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;"
    ],
    "typeParameters": [
      "E",
      "R"
    ],
    "summary": "Increments a numeric `RefSubject` by 1.",
    "sections": {
      "Why": "Increments a numeric `RefSubject` by 1. The transition is serialized at the RefSubject rather\nthan coordinated by callers or UI components.",
      "Ownership and lifetime": "Running increment performs one serialized subject transition and resolves with its committed\nvalue. It acquires 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  yield* RefSubject.increment(count)\n  const value = yield* count\n  console.log(value) // 1\n\n  yield* RefSubject.increment(count)\n  const newValue = yield* count\n  console.log(newValue) // 2\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/RefSubject/RefSubject.ts",
        "start": {
          "line": 2631,
          "column": 1
        },
        "end": {
          "line": 2633,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "State updates"
  }
}
