import { O } from 'ts-toolbelt' import { Comparable } from './condition/comparable' import { Condition } from './condition/condition' import { Placeholder } from './condition/placeholder' export type Where = _Where< PickComparableValues, P > type _Where = { [K in keyof T]?: T[K] extends Comparable ? T[K] | Placeholder

| Condition> : never } type PickComparableValues = O.Select< ReplaceNonComparableValues, Comparable > type ReplaceNonComparableValues = O.Replace< Required, StartDateTime, string | Date > interface StartDateTime { date?: StartDate hour?: number minute?: number second?: number timeZoneId?: string } interface StartDate { year?: number month?: number day?: number }