Interface: Storage

twind/sheets.Storage

Allows to reset and snaphot the current state of an sheet and in extension the internal mutable state (caches, ...) of tw.

Hierarchy

Properties

init

init: SheetInit

Register a function that should be called to create a new state.

Defined in: src/sheets/index.ts:35


reset

reset: (snapshot?: unknown[]) => unknown[]

Creates a snapshot of the current state, invokes all init callbacks to create a fresh state and returns the snaphot.

Type declaration:

▸ (snapshot?: unknown[]): unknown[]

Parameters:

NameType
snapshot?unknown[]

Returns: unknown[]

Defined in: src/sheets/index.ts:41

Defined in: src/sheets/index.ts:41