• Binds a function to a specific context.

    Type Parameters

    • T extends ((...args) => unknown)

      The type of the function.

    Parameters

    • fn: T | ((...args) => unknown)

      The function to bind.

    • thisArg: unknown

      The context to bind the function to.

    Returns ((...args) => ReturnType<T>)

    • The bound function.
      • (...args): ReturnType<T>
      • Parameters

        • Rest ...args: Parameters<T>

        Returns ReturnType<T>

Generated using TypeDoc