devtypes - v1.1.0
    Preparing search index...

    Type Alias IsAny<T>

    IsAny: 0 extends 1 & T ? true : false

    Type guard: detect any.

    Type Parameters

    • T

      Type to test

    Uses the 0 extends (1 & T) trick to reliably distinguish any from all other types, including unknown.

    type A = IsAny< any >;     // true
    type B = IsAny< string >; // false