Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / snapshotUsage

Function: snapshotUsage()

ts
function snapshotUsage(usage): Usage;

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

One field read per property, returning a detached plain copy. Both accounting boundaries validate and consume THIS snapshot, never the adapter-owned object, so a hostile accessor cannot answer the validator with valid counts and the accumulator with garbage.

Parameters

ParameterType
usageUsage

Returns

Usage