Function isSymbol

  • Checks if a given value is of type symbol.

    Example

    isObject(Symbol('message'))
    // => true

    isSymbol(Symbol(10))
    // => true

    isSymbol({})
    // => false

    Type Parameters

    • T extends symbol

      The expected symbol type.

    Parameters

    • value: unknown

      The value to be checked.

    Returns value is T

    true if the given value is of type symbol, false otherwise.

Generated using TypeDoc v0.24.7