collectype / types/utility / DateKeys
DateKeys<
T> ={ [K in keyof T]: T[K] extends Date ? K : never }[keyofT]
Defined in: types/utility.ts:154
Returns the union of keys in T whose value type is Date (including optional properties).
T
The object type to inspect.
type A = { foo: Date; bar?: Date; baz: string };
type Keys = DateKeys<A>; // "foo" | "bar"