/** * An array of elements or a single element */ export type MaybeArray = T | T[]; /** * Picks keys of specified type */ export type PickKeysOfType = { [K in keyof T]: T[K] extends U ? T[K] : never; }; /** * Keys of specified type */ export type KeysOfType = keyof PickKeysOfType; /** * Makes specified keys non-nullable and required */ export type RequiredKeys = Omit & { [K in U]-?: NonNullable; };