diff --git a/src/types/predicates.ts b/src/types/predicates.ts index b2731b6..2eeb176 100644 --- a/src/types/predicates.ts +++ b/src/types/predicates.ts @@ -1,4 +1,4 @@ -import { False, True, And, Or, Not } from './conditionals'; +import { False, True, And, Or, Not, If } from './conditionals'; /** no-doc */ export type KnownProblemPrototypeKeys = 'toString' | 'toLocaleString' | 'hasOwnProperty' | 'isPrototypeOf' | 'propertyIsEnumerable' | 'constructor' | 'valueOf'; @@ -15,7 +15,7 @@ export type ObjectPrototypeKeys = keyof Object; /** no-doc */ export type FunctionPrototypeKeys = keyof Function; -export type IsNever = Not<(Record & Record)[S]>; +export type IsNever = keyof any extends keyof T ? If, False, True> : False; export type IsType = X extends T ? True : False; export type IsArray = T extends unknown[] ? True : False; export type IsNumber = T extends number ? True : False;