Skip to content

Vizel API / core/src / getVizelStorageBackend

Function: getVizelStorageBackend()

ts
function getVizelStorageBackend(storage, key): object;

Defined in: packages/core/src/auto-save.ts:99

Resolve the auto-save storage backend for a document.

Delegates to resolveVizelValueStorageBackend; a parsed value that fails isVizelJsonContent resolves to null.

Parameters

ParameterType
storageVizelStorageBackend
keystring

Returns

object

load

ts
load: () => Promise<JSONContent | null>;

Returns

Promise&lt;JSONContent | null&gt;

save

ts
save: (content) => Promise<void>;

Parameters

ParameterType
contentJSONContent

Returns

Promise&lt;void&gt;

Released under the MIT License.