Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 542 Bytes

File metadata and controls

43 lines (31 loc) · 542 Bytes

typelab / assertions / IsObject

type IsObject<T> = _IsTrue<IfObject<T, true, false>>;

Checks if a given type T is an object type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is an object type, false otherwise.

Example

type Valid = IsObject<[]>; // true
type Invalid = IsObject<string>; // false