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

Function getAndIncrement

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

Source from the content-addressed store, hash-verified

400 * @since 2.0.0
401 */
402export const getAndIncrement = (self: MutableRef<number>): number => getAndUpdate(self, (n) => n + 1)
403
404/**
405 * Sets the MutableRef to a new value and returns the previous value.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected