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