DataAdapter
Defined in: store/adapters/DataAdapter.ts:53
A class representing a storage adapter that uses the local storage.
Extends
Type Parameters
• D extends DataSchema
= DataSchema
Implements
IDataAdapter
<D
>
Constructors
new DataAdapter()
new DataAdapter<
D
>(id
):DataAdapter
<D
>
Defined in: store/adapters/DataAdapter.ts:63
Parameters
id
string
= 'data'
Returns
DataAdapter
<D
>
Overrides
Properties
__dill_pixel_method_binding_root
__dill_pixel_method_binding_root:
boolean
Defined in: plugins/Plugin.ts:37
Inherited from
StorageAdapter
.__dill_pixel_method_binding_root
data
data:
D
Defined in: store/adapters/DataAdapter.ts:54
id
readonly
id:string
='data'
Defined in: store/adapters/DataAdapter.ts:63
The ID of the adapter. Default is ‘StorageAdapter’.
Inherited from
onDataChange
onDataChange:
Signal
<(detail
) =>void
>
Defined in: store/adapters/DataAdapter.ts:56
Implementation of
Accessors
app
Get Signature
get app():
T
Defined in: plugins/Plugin.ts:45
Returns
T
Inherited from
Methods
addSignalConnection()
addSignalConnection(…
args
):void
Defined in: plugins/Plugin.ts:71
Add signal connections to the container.
Parameters
args
…SignalConnection
[]
The signal connections to add.
Returns
void
Inherited from
StorageAdapter
.addSignalConnection
clear()
clear<
K
>(key
):void
Defined in: store/adapters/DataAdapter.ts:147
Deletes data from a specified key in the local storage.
Type Parameters
• K extends string
| number
| symbol
Parameters
key
K
The key from which to delete the data.
Returns
void
Implementation of
clearSignalConnections()
clearSignalConnections():
void
Defined in: plugins/Plugin.ts:77
Returns
void
Inherited from
StorageAdapter
.clearSignalConnections
destroy()
destroy():
void
Defined in: store/adapters/DataAdapter.ts:74
Destroys the adapter.
Returns
void
Overrides
get()
get():
D
Defined in: store/adapters/DataAdapter.ts:139
Returns
D
Implementation of
getCoreSignals()
getCoreSignals():
string
[]
Defined in: store/adapters/DataAdapter.ts:67
Returns
string
[]
Overrides
StorageAdapter.getCoreSignals
initialize()
initialize(
_app
,options
?):void
Defined in: store/adapters/DataAdapter.ts:83
Initializes the adapter.
Parameters
_app
The application that the adapter belongs to.
options?
Partial
<IDataAdapterOptions
<D
>>
The options to initialize the adapter with.
Returns
void
Overrides
load()
load<
K
>(key
):undefined
|D
[K
]
Defined in: store/adapters/DataAdapter.ts:119
Loads data from a specified key in the local storage.
Type Parameters
• K extends string
| number
| symbol
Parameters
key
K
The key from which to load the data.
Returns
undefined
| D
[K
]
The loaded data.
Implementation of
Overrides
postInitialize()
postInitialize(
_app
):void
|Promise
<void
>
Defined in: plugins/Plugin.ts:60
Parameters
_app
Returns
void
| Promise
<void
>
Inherited from
save()
save<
K
>(key
,data
):D
Defined in: store/adapters/DataAdapter.ts:104
Saves data under a specified key in the local storage.
Type Parameters
• K extends string
| number
| symbol
Parameters
key
K
The key under which to save the data.
data
D
[K
]
The data to save.
Returns
D
The saved data.
Implementation of
Overrides
set()
set(
data
,merge
):D
Defined in: store/adapters/DataAdapter.ts:123
Parameters
data
DeepPartial
<D
>
merge
boolean
= true
Returns
D