Skip to content

Storage

StorageSDK

StorageSDK = object

Utilities to interact with frontend-plugin storage.

Properties

get()

get: () => JSONValue

Get the storage.

Returns

JSONValue

The storage.

onChange()

onChange: (callback: (value: JSONValue) => void) => void

Subscribe to storage changes.

Parameters
ParameterTypeDescription
callback(value: JSONValue) => voidThe callback to call when the storage changes.
Returns

void

set()

set: <T>(value: JSONCompatible<T>) => Promise<void>

Set the storage.

Type Parameters
Type Parameter
T
Parameters
ParameterTypeDescription
valueJSONCompatible<T>The value to set the storage to
Returns

Promise<void>

A promise that resolves when the storage has been set.