tguard-js
    Preparing search index...

    Function isCallable

    • Determines whether the provided value is callable.

      Callable values include normal functions, arrow functions, and bound functions. ES6 class constructors are not callable without new, so this function returns false for classes.

      Symbol Value
      function () {} true
      () => {} true
      function () {}.bind() true
      class {} false
      class A extends B {} false
      class A {} false

      Parameters

      • x: unknown

        The value to be checked.

      Returns x is (...args: any[]) => unknown

      true if the value is callable, otherwise false.

      1.0