moderator-toolbox-nxg-for-reddit / modules/modbar/schema
modules/modbar/schema¶
Interfaces¶
ApiBudgetSnapshot¶
Defined in: extension/data/modules/modbar/schema.ts:6
Snapshot consumed by the API budget readout: the budget plus the time it was read, so the countdown is stable per render.
Properties¶
readAt¶
readAt:
number
Defined in: extension/data/modules/modbar/schema.ts:10
Time (ms) the snapshot was taken.
status¶
status:
ApiBudgetStatus|null
Defined in: extension/data/modules/modbar/schema.ts:8
Latest budget, or null before the first reply or when the background is unreachable.
ApiBudgetStore¶
Defined in: extension/data/modules/modbar/schema.ts:14
External-store handle for the API budget readout, shaped for useSyncExternalStore.
Properties¶
getSnapshot¶
getSnapshot: () =>
ApiBudgetSnapshot
Defined in: extension/data/modules/modbar/schema.ts:18
Returns the current snapshot (stable between changes).
Returns¶
subscribe¶
subscribe: (
listener) => () =>void
Defined in: extension/data/modules/modbar/schema.ts:16
Registers a change listener; returns its unsubscribe function.
Parameters¶
listener¶
() => void
Returns¶
() => void