Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 518 Bytes

IsObject.md

File metadata and controls

23 lines (17 loc) · 518 Bytes

IsObject<T> Type

Determines if the specified type is object and returns the checking result as boolean.

References in this doc

Implementation

export type IsObject<T> = T extends null
    ? false
    : T extends undefined
    ? false
    : T extends any[]
    ? false
    : T extends Record<any, any> ? true : false
  • Type Parameters:
    • T (any): The type to check.