Skip to main content

Interface: PendingSwapStoreOptions

Options for PendingSwapStore.

Properties​

PropertyTypeDescription
darkFlagField?"isDarkSwap" | "shadow"The stored name of the dark-swap flag: isDarkSwap (default) or shadow, for storage written by an older web app. Entries are always exposed to callers as isDarkSwap.
insertAt?"end" | "start"Where remember puts a new entry in the stored array: end (default) or start.
listOrder?"stored" | "newest-first"The order of list: stored (default: oldest first for insertAt: 'end') or newest-first.
now?() => numberClock, in epoch milliseconds. Defaults to Date.now.
onPrune?(pruned) => voidCalled once per dropped entry (after the drop is persisted, for list; at once for a remember that refuses an invalid key), so the app can tell the user or log why a swap it was tracking is gone. Diagnostics only: what it does, or throws, never changes the store.
storageKey?stringStorage key. Default PENDING_SWAPS_STORAGE_KEY.