@types/function-bind

  • Version 1.1.6
  • Published
  • 13.3 kB
  • No dependencies
  • MIT license

Install

npm i @types/function-bind
yarn add @types/function-bind
pnpm add @types/function-bind

Overview

TypeScript definitions for function-bind

Index

Functions

function apply

apply: {
<T, AX extends readonly unknown[], A extends readonly unknown[], R>(
func: (this: T, ...args: [...bound: AX, ...args: A]) => R,
args: readonly [thisArg: T, ...bound: AX]
): (...args: A) => R;
<A extends readonly unknown[], R>(
func: new (...args: A) => R,
args: readonly [thisArg: unknown]
): new (...args: A) => R;
<A0, A extends readonly unknown[], R>(
func: new (bound_0: A0, ...args: A) => R,
args: readonly [thisArg: unknown, bound_0: A0]
): new (...args: A) => R;
<A0, A1, A extends readonly unknown[], R>(
func: new (bound_0: A0, bound_1: A1, ...args: A) => R,
args: readonly [thisArg: unknown, bound_0: A0, bound_1: A1]
): new (...args: A) => R;
<A0, A1, A2, A extends readonly unknown[], R>(
func: new (bound_0: A0, bound_1: A1, bound_2: A2, ...args: A) => R,
args: readonly [thisArg: unknown, bound_0: A0, bound_1: A1, bound_2: A2]
): new (...args: A) => R;
<A0, A1, A2, A3, A extends readonly unknown[], R>(
func: new (
bound_0: A0,
bound_1: A1,
bound_2: A2,
bound_3: A3,
...args: A
) => R,
args: readonly [
thisArg: unknown,
bound_0: A0,
bound_1: A1,
bound_2: A2,
bound_3: A3
]
): new (...args: A) => R;
<AX extends readonly unknown[], A extends readonly unknown[], R>(
func: new (...args: [...bound: AX, ...args: A]) => R,
args: readonly [thisArg: unknown, ...bound: AX]
): new (...args: A) => R;
};

    function bind

    bind: typeof bind;
    • For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

      Parameter thisArg

      The object to be used as the this object.

      Parameter args

      Arguments to bind to the parameters of the function.

    function call

    call: {
    <T, AX extends readonly unknown[], A extends readonly unknown[], R>(
    func: (this: T, ...args: [...bound: AX, ...args: A]) => R,
    thisArg: T,
    ...bound: AX
    ): (...args: A) => R;
    <AX extends readonly unknown[], A extends readonly unknown[], R>(
    func: new (...args: [...bound: AX, ...args: A]) => R,
    thisArg: unknown,
    ...bound: AX
    ): new (...args: A) => R;
    };

      Package Files (2)

      Dependencies (0)

      No dependencies.

      Dev Dependencies (0)

      No dev dependencies.

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/function-bind.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/function-bind)
      • HTML
        <a href="https://www.jsdocs.io/package/@types/function-bind"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>