Skip to main content
The handle tap.storage.<name> exposes for a singleton collection, which holds one document per scope key.

Remarks

A collection is a singleton when the manifest declares it with singleton set to true. Every call needs the storage:write scope, get included.

Type Parameters

T

T

Methods

get()

Resolves to null until the document has been written once.

Returns

Promise<T | null>

patch()

Merges the fields into the document and resolves to the merged document.

Parameters

partial
Partial<T>

Returns

Promise<T>

set()

Replaces the whole document.

Parameters

document
T

Returns

Promise<void>