MCPcopy Create free account
hub / github.com/Effect-TS/effect / getAndDecrement

Function getAndDecrement

packages/effect/src/MutableRef.ts:350–350  ·  view source on GitHub ↗
(self: MutableRef<number>)

Source from the content-addressed store, hash-verified

348 * @since 2.0.0
349 */
350export const getAndDecrement = (self: MutableRef<number>): number => getAndUpdate(self, (n) => n - 1)
351
352/**
353 * Increments a numeric MutableRef by 1 and returns the previous value.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected