Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 580 Bytes

File metadata and controls

27 lines (18 loc) · 580 Bytes

Home > types-kit > IsUnknown

IsUnknown type

If T is unknown, return true, else return false.

Signature:

export type IsUnknown<T> = IfExtends<
  [unknown, T],
  IfExtends<[IsAny<T>, true], false, true>,
  false
>

References: IfExtends, IsAny

Example

// Expect: true
type Foo = IsUnknown<unknown>