devtypes - v2.0.0
    Preparing search index...

    Type Alias IsNonLiteral<T>

    IsNonLiteral: IsAny<T> extends true
        ? false
        : IsLiteral<T> extends true ? false : true

    Type guard: detect whether a type is not a literal type.

    Type Parameters

    • T

      Type to test

    Logical negation of IsLiteral. The any type always resolves to false to avoid false positives.

    type A = IsNonLiteral< string >;  // true
    type B = IsNonLiteral< 'a' >; // false