rhodonite
    Preparing search index...

    Interface IsType

    Extended interface that includes the base validation methods plus derivative methods. Provides not, all, and any modifiers for complex validation scenarios.

    interface IsType {
        all: {
            defined(val: unknown, ..._args: unknown[]): val is Object;
            exist(val?: unknown, ..._args: unknown[]): val is Object;
            false(val: unknown, ..._args: unknown[]): boolean;
            falsy(val: unknown, ..._args: unknown[]): boolean;
            function(val: unknown, ..._args: unknown[]): val is Function;
            null(val: unknown, ..._args: unknown[]): val is null;
            stringContaining(thisStr: string, queryStr: string): boolean;
            true(val: unknown, ..._args: unknown[]): boolean;
            truly(val: unknown, ..._args: unknown[]): boolean;
            undefined(val: unknown, ..._args: unknown[]): val is undefined;
        };
        any: {
            defined(val: unknown, ..._args: unknown[]): val is Object;
            exist(val?: unknown, ..._args: unknown[]): val is Object;
            false(val: unknown, ..._args: unknown[]): boolean;
            falsy(val: unknown, ..._args: unknown[]): boolean;
            function(val: unknown, ..._args: unknown[]): val is Function;
            null(val: unknown, ..._args: unknown[]): val is null;
            stringContaining(thisStr: string, queryStr: string): boolean;
            true(val: unknown, ..._args: unknown[]): boolean;
            truly(val: unknown, ..._args: unknown[]): boolean;
            undefined(val: unknown, ..._args: unknown[]): val is undefined;
        };
        not: {
            defined(val: unknown, ..._args: unknown[]): val is undefined;
            exist(val?: unknown, ..._args: unknown[]): val is null | undefined;
            false(val: unknown, ..._args: unknown[]): boolean;
            falsy(val: unknown, ..._args: unknown[]): boolean;
            function(val: unknown, ..._args: unknown[]): val is unknown;
            null(val: unknown, ..._args: unknown[]): val is Object;
            true(val: unknown, ..._args: unknown[]): boolean;
            truly(val: unknown, ..._args: unknown[]): boolean;
            undefined(val: unknown, ..._args: unknown[]): val is Object;
        };
        defined(val: unknown, ..._args: unknown[]): val is Object;
        exist(val?: unknown, ..._args: unknown[]): val is Object;
        false(val: unknown, ..._args: unknown[]): boolean;
        falsy(val: unknown, ..._args: unknown[]): boolean;
        function(val: unknown, ..._args: unknown[]): val is Function;
        null(val: unknown, ..._args: unknown[]): val is null;
        stringContaining(thisStr: string, queryStr: string): boolean;
        true(val: unknown, ..._args: unknown[]): boolean;
        truly(val: unknown, ..._args: unknown[]): boolean;
        undefined(val: unknown, ..._args: unknown[]): val is undefined;
    }

    Hierarchy

    • IsImplType
      • IsType
    Index

    Properties

    all: {
        defined(val: unknown, ..._args: unknown[]): val is Object;
        exist(val?: unknown, ..._args: unknown[]): val is Object;
        false(val: unknown, ..._args: unknown[]): boolean;
        falsy(val: unknown, ..._args: unknown[]): boolean;
        function(val: unknown, ..._args: unknown[]): val is Function;
        null(val: unknown, ..._args: unknown[]): val is null;
        stringContaining(thisStr: string, queryStr: string): boolean;
        true(val: unknown, ..._args: unknown[]): boolean;
        truly(val: unknown, ..._args: unknown[]): boolean;
        undefined(val: unknown, ..._args: unknown[]): val is undefined;
    }

    Type Declaration

    • defined: function
      • Checks if a value is defined (not undefined).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not undefined

    • exist: function
      • Checks if a value exists (is neither null nor undefined).

        Parameters

        • Optionalval: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not null and not undefined

    • false: function
      • Checks if a value is strictly equal to false.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is exactly false

    • falsy: function
      • Checks if a value is falsy (converts to false in boolean context).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is falsy

    • function: function
      • Checks if a value is a function.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Function

        True if the value is a function

    • null: function
      • Checks if a value is null.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is null

        True if the value is null

    • stringContaining: function
      • Checks if a string contains another string.

        Parameters

        • thisStr: string

          The string to search in

        • queryStr: string

          The string to search for

        Returns boolean

        True if thisStr contains queryStr

    • true: function
      • Checks if a value is strictly equal to true.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is exactly true

    • truly: function
      • Checks if a value is truthy (converts to true in boolean context).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is truthy

    • undefined: function
      • Checks if a value is undefined.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is undefined

        True if the value is undefined

    any: {
        defined(val: unknown, ..._args: unknown[]): val is Object;
        exist(val?: unknown, ..._args: unknown[]): val is Object;
        false(val: unknown, ..._args: unknown[]): boolean;
        falsy(val: unknown, ..._args: unknown[]): boolean;
        function(val: unknown, ..._args: unknown[]): val is Function;
        null(val: unknown, ..._args: unknown[]): val is null;
        stringContaining(thisStr: string, queryStr: string): boolean;
        true(val: unknown, ..._args: unknown[]): boolean;
        truly(val: unknown, ..._args: unknown[]): boolean;
        undefined(val: unknown, ..._args: unknown[]): val is undefined;
    }

    Type Declaration

    • defined: function
      • Checks if a value is defined (not undefined).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not undefined

    • exist: function
      • Checks if a value exists (is neither null nor undefined).

        Parameters

        • Optionalval: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not null and not undefined

    • false: function
      • Checks if a value is strictly equal to false.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is exactly false

    • falsy: function
      • Checks if a value is falsy (converts to false in boolean context).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is falsy

    • function: function
      • Checks if a value is a function.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Function

        True if the value is a function

    • null: function
      • Checks if a value is null.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is null

        True if the value is null

    • stringContaining: function
      • Checks if a string contains another string.

        Parameters

        • thisStr: string

          The string to search in

        • queryStr: string

          The string to search for

        Returns boolean

        True if thisStr contains queryStr

    • true: function
      • Checks if a value is strictly equal to true.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is exactly true

    • truly: function
      • Checks if a value is truthy (converts to true in boolean context).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is truthy

    • undefined: function
      • Checks if a value is undefined.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is undefined

        True if the value is undefined

    not: {
        defined(val: unknown, ..._args: unknown[]): val is undefined;
        exist(val?: unknown, ..._args: unknown[]): val is null | undefined;
        false(val: unknown, ..._args: unknown[]): boolean;
        falsy(val: unknown, ..._args: unknown[]): boolean;
        function(val: unknown, ..._args: unknown[]): val is unknown;
        null(val: unknown, ..._args: unknown[]): val is Object;
        true(val: unknown, ..._args: unknown[]): boolean;
        truly(val: unknown, ..._args: unknown[]): boolean;
        undefined(val: unknown, ..._args: unknown[]): val is Object;
    }

    Type Declaration

    • defined: function
      • Checks if a value is undefined (negated version of defined).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is undefined

        True if the value is undefined

    • exist: function
      • Checks if a value does not exist (is null or undefined).

        Parameters

        • Optionalval: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is null | undefined

        True if the value is null or undefined

    • false: function
      • Checks if a value is not strictly equal to false.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is not exactly false

    • falsy: function
      • Checks if a value is not falsy (negated version of falsy).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is not falsy

    • function: function
      • Checks if a value is not a function.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is unknown

        True if the value is not a function

    • null: function
      • Checks if a value is not null.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not null

    • true: function
      • Checks if a value is not strictly equal to true.

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is not exactly true

    • truly: function
      • Checks if a value is not truthy (negated version of truly).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns boolean

        True if the value is not truthy

    • undefined: function
      • Checks if a value is defined (negated version of undefined).

        Parameters

        • val: unknown

          The value to check

        • ..._args: unknown[]

        Returns val is Object

        True if the value is not undefined

    Methods

    • Checks if a value is defined (not undefined).

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns val is Object

      True if the value is not undefined

    • Checks if a value exists (is neither null nor undefined).

      Parameters

      • Optionalval: unknown

        The value to check

      • ..._args: unknown[]

      Returns val is Object

      True if the value is not null and not undefined

    • Checks if a value is strictly equal to false.

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns boolean

      True if the value is exactly false

    • Checks if a value is falsy (converts to false in boolean context).

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns boolean

      True if the value is falsy

    • Checks if a value is a function.

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns val is Function

      True if the value is a function

    • Checks if a value is null.

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns val is null

      True if the value is null

    • Checks if a string contains another string.

      Parameters

      • thisStr: string

        The string to search in

      • queryStr: string

        The string to search for

      Returns boolean

      True if thisStr contains queryStr

    • Checks if a value is strictly equal to true.

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns boolean

      True if the value is exactly true

    • Checks if a value is truthy (converts to true in boolean context).

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns boolean

      True if the value is truthy

    • Checks if a value is undefined.

      Parameters

      • val: unknown

        The value to check

      • ..._args: unknown[]

      Returns val is undefined

      True if the value is undefined