Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / windowRefund

Function: windowRefund()

ts
function windowRefund(state, amount): SlidingWindowState;

Defined in: packages/core/dist/index.d.ts

Refunds into the head slot; never below zero across the ring.

Parameters

ParameterType
stateSlidingWindowState
amountnumber

Returns

SlidingWindowState