Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "database/types"

Index

Type aliases

PickStoreValueProperties

PickStoreValueProperties<T>: Omit<T, StorePropertyTypeProperties>

The type T without its inherent primitive prototype properties.

Type parameters

  • T

StoreKey

StoreKey<DBSchema, StoreName>: DBSchema[StoreName]["key"]

The type of keys for the given store.

Type parameters

StoreNames

StoreNames<DBSchema>: DBStoreNames<DBSchema> & string

Known store names extracted from the schema.

Type parameters

StorePropertyType

StorePropertyType: string | number | boolean | Date

StorePropertyTypeProperties

StorePropertyTypeProperties: StringProperties | NumberProperties | BooleanProperties | keyof Date | keyof StorePropertyType[]

StoreSchemaValue

StoreSchemaValue: StorePropertyType | StorePropertyType[] | {} | {}

The type of a possible value in a StoreSchema.

StoreValue

StoreValue<DBSchema, StoreName>: DBSchema[StoreName]["value"]

The type of values in the given store.

Type parameters

StoreValuePropertyPath

StoreValuePropertyPath<Value>: NonNullable<StoreValuePropertyPathLevelOne<Value> | StoreValuePropertyPathLevelTwo<Value>>

The type describing the "path" to a deep property of a StoreValue.

The resulting type is a union of arrays describing all valid "paths" to deep properties.

This only goes two levels deep, at the most, including the base level. If your Schema has deeper nesting than that and it needs to connect a DynamicComponent to a deep property, consider refactoring. More than two levels implies a schema of some complexity that will be difficult to maintain.

For example

type PropertyPath = StoreValuePropertyPath<{
  a: { b: boolean };
  z: number;
}>;

is the same as

type PropertyPath =
  | ["a"] | ["z"]
  | ["a", "b"];

Type parameters

  • Value: {}

Transaction

Transaction<DBSchema, TxStoreNames>: IDBPTransaction<DBSchema, TxStoreNames>

A transaction on one or more stores.

Type parameters

Generated using TypeDoc