Function isConstructor

  • Checks if the given value is a constructor.

    Parameters

    • value: unknown

      The value to check.

    Returns value is TConstructor

    A boolean indicating whether the value is a constructor or not.

    Example

    isConstructor(class {}); => true
    isConstructor(function() {}); => true
    isConstructor(() => {}); => false

Generated using TypeDoc