export type FieldType = T[F] export type KeysOf = K | readonly K[] /** * Retrieves the type(s) of the specified {PrimaryKeyField} * * @template {object} T, {DexieTablePrimaryKeyField} PrimaryKeyField * */ export type DexieTablePrimaryKeyType< T extends {}, PrimaryKeyField extends KeysOf > = PrimaryKeyField extends [...infer Fields] ? { [I in keyof Fields]: Fields[I] extends keyof T ? FieldType : never } : PrimaryKeyField extends keyof T ? T[PrimaryKeyField] : never /** * Key(s) of the type T * * @template {object} T */ export type DexieTablePrimaryKeyField = KeysOf