Skip to main content
Version: Next

StorageApi.set()

Home > @backstage/core-plugin-api > StorageApi > set

Save persistent data, and emit messages to anyone that is using StorageApi.observe$() for this key.

Signature:

set<T extends JsonValue>(key: string, data: T): Promise<void>;

Parameters

Parameter

Type

Description

key

string

Unique key associated with the data.

data

T

The data to be stored under the key.

**Returns:**

Promise<void>