Skip to content

IDataAdapter

Defined in: store/adapters/DataAdapter.ts:41

optional clearOnResume: boolean

Defined in: store/adapters/DataAdapter.ts:123


onDataChange: Signal<(detail) => void>

Defined in: store/adapters/DataAdapter.ts:122

Emits a signal when data changes.

append<K>(key, value, separator?): any

Defined in: store/adapters/DataAdapter.ts:100

Appends a string to a string property.

K extends string

K

The key of the string property

string

The string to append

string

The separator to use (default: ”)

any

The new string after concatenation


clear(): void

Defined in: store/adapters/DataAdapter.ts:61

Clears all data from storage.

void

clear<K>(key): void

Defined in: store/adapters/DataAdapter.ts:66

Clears data for a specific key from storage.

K extends string | number

K

The key from which to delete the data

void


concat<K>(key, value): any

Defined in: store/adapters/DataAdapter.ts:86

Concatenates a value or array of values to an array property.

K extends string

K

The key of the array property

unknown

The value(s) to concatenate

any

The new array after concatenation


get(): DataSchema

Defined in: store/adapters/DataAdapter.ts:42

DataSchema

get<K>(key): undefined | DataSchema[K]

Defined in: store/adapters/DataAdapter.ts:43

K extends string | number

K

undefined | DataSchema[K]


increment<K>(key, amount?): any

Defined in: store/adapters/DataAdapter.ts:73

Increments a numeric property by a specified amount.

K extends string

K

The key of the property to increment

number

The amount to increment by (default: 1)

any

The new value after incrementing


set<K>(key, data): DataSchema

Defined in: store/adapters/DataAdapter.ts:50

Sets data for a specific key in storage.

K extends string | number

K

The key under which to save the data

DataSchema[K]

The data to save

DataSchema

The updated data object

set(data, merge?): DataSchema

Defined in: store/adapters/DataAdapter.ts:57

Merges data into storage.

DeepPartial<DataAdapterType>

The data object to set

boolean

Whether to merge with existing data

DataSchema

The updated data object


snapshot(): DataSchema

Defined in: store/adapters/DataAdapter.ts:112

Returns a snapshot of the current data.

DataSchema

A snapshot of the current data

snapshot<K>(key?): DataSchema[K]

Defined in: store/adapters/DataAdapter.ts:118

Returns a snapshot of the current data for a specific key.

K extends string | number

K

The key of the data to snapshot

DataSchema[K]

A snapshot of the current data for the specified key