NumericKeys type

Numeric keys of an entity, used to constrain the field argument of sum, avg, min, and max aggregations.

type NumericKeys<T> = {
  [K in keyof T]-?: NonNullable<T[K]> extends number ? K : never
}[keyof T]