typesafe-ts API Documentation - v1.7.0
    Preparing search index...

    Type Alias IsUnknown<T>

    IsUnknown: Equal<T, unknown>

    Utility type to check if a type is exactly unknown.

    Type Parameters

    • T

      The type to check

    true if T is exactly the unknown type, false otherwise

    type Test1 = IsUnknown<unknown>;     // true
    type Test2 = IsUnknown<any>; // false
    type Test3 = IsUnknown<never>; // false
    type Test4 = IsUnknown<{}>; // false
    type Test5 = IsUnknown<object>; // false