diff --git a/packages/shared/src/typeUtils.ts b/packages/shared/src/typeUtils.ts index f5b9e6ec3c8..dcecfe03532 100644 --- a/packages/shared/src/typeUtils.ts +++ b/packages/shared/src/typeUtils.ts @@ -13,10 +13,10 @@ export type LooseRequired = { [P in keyof (T & Required)]: T[P] } // https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360 export type IfAny = 0 extends 1 & T ? Y : N -export type IsKeyValues = IfAny< +export type IsKeyValues = IfAny< T, false, - T extends object ? (keyof T extends K ? true : false) : false + T extends object ? (NonNullable extends K ? true : false) : false > /**