/** * Utility type to remove null from a type */ export type RemoveNull = T extends null ? never : T; /** * Utility type to remove null from all properties of an object type */ export type RemoveNullFromObject = { [L in keyof T]: L extends K ? RemoveNull : T[L]; };