devtypes - v1.1.0
    Preparing search index...

    Type Alias IsUnknown<T>

    IsUnknown: IsAny<T> extends true
        ? false
        : unknown extends T ? T extends {} ? false : true : false

    Type guard: detect unknown (excluding any).

    Type Parameters

    • T

      Type to test

    Differentiates unknown from any and from concrete types by combining constraint checks with an explicit any exclusion.

    type A = IsUnknown< unknown >; // true
    type B = IsUnknown< any >; // false
    type C = IsUnknown< string >; // false