Function isBool

  • Checks if a given value is of boolean type and has a value of true or false.

    Example

    isBool(true)
    // => true

    isBool('hello')
    // => false

    Type Parameters

    • T extends boolean

      The expected type of the boolean value.

    Parameters

    • value: unknown

      The value to be checked.

    Returns value is T

    true if the given value is of boolean type and has a value of true or false, false otherwise.

Generated using TypeDoc v0.24.7