Interfaces
micro-db interfaces
MicroDBSerializer
MicroDBSerializer
serializeObject
(key: string, value: any) => string
serializeAll
(data: MicroDBData) => string
deserialize
(raw: string) => MicroDBData
Builtin
JSONSerializer
JSONSerializer
JSONSerializer
key: json-string
key:{...}
MicroDBWatchable
Provides an interface for subscribing and watching for data changes in a class.
Generic Types:
<Value>
: type of the data, that is going to be watched Generic type<CallbackArguments>
: type of extra arguments provided to the callback
Implemented by: MicroDBJanitor
$watch()
$watch()
Watch for all upcoming value changes while the subscription is active.
callback
SubscriptionCallback<Value, CallbackArguments>
options
Partial<SubscriptionOptions<Value>>
Returns: Subscription
$watchNext()
$watchNext()
Watch for the next value change.
callback
SubscriptionCallback<Value, CallbackArguments>
(required)
times
number
1
options
Partial<SubscriptionOptions<Value>>
{}
Returns: Subscription
MicroDBPropertyWatchable
Extends MicroDBWatchable
with methods for subscribing and watching for changes of individual properties of an object.
Generic Types:
<Value>
: type of the data, that is going to be watched Generic type<CallbackArguments>
: type of extra arguments provided to the callback
Implemented by: MicroDBBase
, MicroDBDriver
$watchProperty()
$watchProperty()
Watch for all upcoming property changes while the subscription is active.
property
P extends keyof Value
callback
SubscriptionCallback<Value, CallbackArguments>
options
Partial<SubscriptionOptions<Value>>
Returns: Subscription
$watchPropertyNext()
$watchPropertyNext()
Watch for the next property change.
property
P extends keyof Value
(required)
callback
SubscriptionCallback<Value, CallbackArguments>
(required)
times
number
1
options
Partial<SubscriptionOptions<Value>>
{}
Returns: Subscription
Last updated