# RefSubject.decrement

Decrements a numeric `RefSubject` by 1.

## Signatures

```ts
export declare function decrement<E, R>(ref: RefSubject<number, E, R>): Effect.Effect<number, E, R>;
```

## Why

Decrements a numeric `RefSubject` by 1. The transition is serialized at the RefSubject rather
than coordinated by callers or UI components.

## Ownership and lifetime

Running decrement performs one serialized subject transition and resolves with its committed
value. It acquires no resource; failures and services remain those of the source ref.

## Examples

```ts
import { Effect } from "effect"
import * as RefSubject from "@typed/fx/RefSubject"

const program = Effect.gen(function* () {
  const count = yield* RefSubject.make(10)

  yield* RefSubject.decrement(count)
  const value = yield* count
  console.log(value) // 9

  yield* RefSubject.decrement(count)
  const newValue = yield* count
  console.log(newValue) // 8
})
```
