@laserware/arcade
    Preparing search index...

    Variable isConst

    is: {
        boolean: (value: unknown) => value is boolean;
        empty: (value: unknown) => boolean;
        equal: <A, B>(a: A, b: B) => boolean;
        function: (value: unknown) => value is Function;
        nil: (value: unknown) => value is undefined | null;
        notNil: <T>(value: undefined | null | T) => value is T;
        number: (value: unknown) => value is number;
        object: (value: unknown) => value is Object;
        objectLiteral: (value: unknown) => value is Record<any, any>;
        string: (value: unknown) => value is string;
        validNumber: (value: unknown) => value is number;
        arrayOf<T>(
            value: unknown,
            predicate: (value: any) => boolean,
        ): value is T[];
    } = ...

    Object with all is available (useful for checking for multiple conditions in the same file).

    Type declaration

    • boolean: (value: unknown) => value is boolean

      Returns true if the specified value is a boolean.

    • empty: (value: unknown) => boolean

      Returns true if the specified value is empty.

    • equal: <A, B>(a: A, b: B) => boolean

      Returns true if the specified values are equal.

    • function: (value: unknown) => value is Function

      Returns true if the specified value is a function.

    • nil: (value: unknown) => value is undefined | null

      Returns true if the specified value is null or undefined.

    • notNil: <T>(value: undefined | null | T) => value is T

      Returns true if the specified value is not null or undefined.

    • number: (value: unknown) => value is number

      Returns true if the specified value is a number.

    • object: (value: unknown) => value is Object

      Returns true if the specified value is a non-null object that is not an Array, RegExp, or Date.

    • objectLiteral: (value: unknown) => value is Record<any, any>

      Returns true if the specified value is an object literal.

    • string: (value: unknown) => value is string

      Returns true if the specified value is a string.

    • validNumber: (value: unknown) => value is number

      Returns true if the specified value is a valid number (i.e. not NaN).

    • arrayOf: function
      • Returns true if the specified value is an array of the specified type T.

        Type Parameters

        • T

        Parameters

        • value: unknown
        • predicate: (value: any) => boolean

        Returns value is T[]