type R = IsNotObject<object> // false
type R = IsNotObject<{}> // false
type R = IsNotObject<{ a: 1 }> // false
type R = IsNotObject<Function> // false
type R = IsNotObject<never> // true
type R = IsNotObject<unknown> // true
type R = IsNotObject<number> // true
type R = IsNotObject<{} | bigint> // boolean
🔢 customize
Filter to ensure T is not an object nor object literals, otherwise returns never.
type R = IsNotObject<{}, { selection: 'filter' }> // never
type R = IsNotObject<{ a: 1 }, { selection: 'filter' }> // never
type R = IsNotObject<Function, { selection: 'filter' }> // never
type R = IsNotObject<never, { selection: 'filter' }> // never
type R = IsNotObject<unknown, { selection: 'filter' }> // unknown
type R = IsNotObject<{} | bigint> // bigint
🔢 customize:
Validate if T is not exactly object.
type R = IsNotObject<object, { exact: true }> // false
type R = IsNotObject<{}, { exact: true }> // true
🔢 customize:
Disable distribution of union types.
type R = IsNotObject<{} | 1> // boolean
type R = IsNotObject<{} | 1, { distributive: false }> // true
🔢 customize
Use unique branch identifiers to allow precise processing of the result.
🎭 predicate
Validate if
Tis not anobjectnor object literals.Note that
Function,Array, and tuple are also objects.