InterfaceTypes & Utilities@public
FlxAsyncStorageBackend
Storage backend whose durable writes must be awaited.
ts
export interface FlxAsyncStorageBackend extends FlxStorageBackendMethods
eraseAsync()
ts
eraseAsync(key: string): Promise<boolean>Erase data and resolve only after the transaction commits or fails.
Parameters:
| Parameter | Type | Description |
|---|---|---|
key | string | - |
Returns: Promise<boolean>
writeAsync()
ts
writeAsync(key: string, data: Record<string, unknown>): Promise<FlxSaveResult>Persist data and resolve only after the transaction commits or fails.
Parameters:
| Parameter | Type | Description |
|---|---|---|
key | string | - |
data | Record<string, unknown> | - |
Returns: Promise<FlxSaveResult>