CounterAddOptions
Defined in: src/counters/contract.ts:15
Options for CounterStore.add.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
expiresAt? |
number |
Retention hint (unix ms) — the backend may expire the key after this. | src/counters/contract.ts:27 |
max? |
number |
Upper bound. Without partial, the add is all-or-nothing: applied only if value + amount <= max. With partial, applies as much as fits (never negative). |
src/counters/contract.ts:21 |
min? |
number |
Lower bound for negative amounts (refunds clamp at min, usually 0). |
src/counters/contract.ts:23 |
partial? |
boolean |
Apply as much of amount as fits under max instead of nothing. |
src/counters/contract.ts:25 |