Skip to content

IDataAdapter

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

D extends DataSchema = DataSchema

onDataChange: Signal<(detail) => void>

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

Emits a signal when data changes.

append<K>(key, value, separator?): D[K]

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

Appends a string to a string property.

K extends string | number | symbol

K

The key of the string property

string

The string to append

string

The separator to use (default: ”)

D[K]

The new string after concatenation


clear(): void

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

Clears all data from storage.

void

clear<K>(key): void

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

Clears data for a specific key from storage.

K extends string | number | symbol

K

The key from which to delete the data

void


concat<K>(key, value): D[K]

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

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

K extends string | number | symbol

K

The key of the array property

D[K] extends E[] ? E | E[] : never

The value(s) to concatenate

D[K]

The new array after concatenation


get(): D

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

D

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

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

K extends string | number | symbol

K

undefined | D[K]


increment<K>(key, amount?): D[K]

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

Increments a numeric property by a specified amount.

K extends string | number | symbol

K

The key of the property to increment

number

The amount to increment by (default: 1)

D[K]

The new value after incrementing


set<K>(key, data): D

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

Sets data for a specific key in storage.

K extends string | number | symbol

K

The key under which to save the data

D[K]

The data to save

D

The updated data object

set(data, merge?): D

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

Merges data into storage.

DeepPartial<D>

The data object to set

boolean

Whether to merge with existing data

D

The updated data object


snapshot(): D

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

Returns a snapshot of the current data.

D

A snapshot of the current data

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

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

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

K extends string | number | symbol

K

The key of the data to snapshot

D[K]

A snapshot of the current data for the specified key