Types

Utility-Types for micro-db

MicroDBOptions

property
type

fileName

string

defaultData

MicroDBData | undefined

serializer

MicroDBSerializer

janitorCronjob

string | undefined

lazy

boolean

MicroDBData

Type: Record<string, any>

WherePredicate<T>

Type: (object: MicroDBEntry<T>) => boolean

Mutation<A, B>

Type: (object: A, id: string) => B | void | Promise<B | void>

Mutations can by async.

MicroDBEntry<T>

Constraints: T extends {}

Type: T & { _microdbId: string }

SubscriptionCallback<Value, ExtraArguments>

Type: (value: Value, extraArguments: ExtraArguments, subscription: Subscription) => void

SubscriptionOptions<T>

property
type

predicate

(newValue: T, lastValue: T | undefined) => boolean

callImmediate

boolean

Last updated