1 | export = bind;
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | declare function bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
|
11 |
|
12 |
|
13 | declare function bind<T, AX extends readonly unknown[], A extends readonly unknown[], R>(
|
14 | this: (this: T, ...args: [...bound: AX, ...args: A]) => R,
|
15 | thisArg: T,
|
16 | ...bound: AX
|
17 | ): (...args: A) => R;
|
18 |
|
19 |
|
20 | declare function bind<AX extends readonly unknown[], A extends readonly unknown[], R>(
|
21 | this: new(...args: [...bound: AX, ...args: A]) => R,
|
22 | thisArg: unknown,
|
23 | ...bound: AX
|
24 | ): new(...args: A) => R;
|
25 |
|
26 |
|
27 | declare namespace bind {
|
28 |
|
29 |
|
30 | function call<T, AX extends readonly unknown[], A extends readonly unknown[], R>(
|
31 | func: (this: T, ...args: [...bound: AX, ...args: A]) => R,
|
32 | thisArg: T,
|
33 | ...bound: AX
|
34 | ): (...args: A) => R;
|
35 |
|
36 |
|
37 | function call<AX extends readonly unknown[], A extends readonly unknown[], R>(
|
38 | func: new(...args: [...bound: AX, ...args: A]) => R,
|
39 | thisArg: unknown,
|
40 | ...bound: AX
|
41 | ): new(...args: A) => R;
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | function apply<T, AX extends readonly unknown[], A extends readonly unknown[], R>(
|
47 | func: (this: T, ...args: [...bound: AX, ...args: A]) => R,
|
48 | args: readonly [thisArg: T, ...bound: AX],
|
49 | ): (...args: A) => R;
|
50 |
|
51 |
|
52 |
|
53 | function apply<A extends readonly unknown[], R>(
|
54 | func: new(...args: A) => R,
|
55 | args: readonly [thisArg: unknown],
|
56 | ): new(...args: A) => R;
|
57 | function apply<A0, A extends readonly unknown[], R>(
|
58 | func: new(bound_0: A0, ...args: A) => R,
|
59 | args: readonly [thisArg: unknown, bound_0: A0],
|
60 | ): new(...args: A) => R;
|
61 | function apply<A0, A1, A extends readonly unknown[], R>(
|
62 | func: new(bound_0: A0, bound_1: A1, ...args: A) => R,
|
63 | args: readonly [thisArg: unknown, bound_0: A0, bound_1: A1],
|
64 | ): new(...args: A) => R;
|
65 | function apply<A0, A1, A2, A extends readonly unknown[], R>(
|
66 | func: new(bound_0: A0, bound_1: A1, bound_2: A2, ...args: A) => R,
|
67 | args: readonly [thisArg: unknown, bound_0: A0, bound_1: A1, bound_2: A2],
|
68 | ): new(...args: A) => R;
|
69 | function apply<A0, A1, A2, A3, A extends readonly unknown[], R>(
|
70 | func: new(bound_0: A0, bound_1: A1, bound_2: A2, bound_3: A3, ...args: A) => R,
|
71 | args: readonly [thisArg: unknown, bound_0: A0, bound_1: A1, bound_2: A2, bound_3: A3],
|
72 | ): new(...args: A) => R;
|
73 | function apply<AX extends readonly unknown[], A extends readonly unknown[], R>(
|
74 | func: new(...args: [...bound: AX, ...args: A]) => R,
|
75 | args: readonly [thisArg: unknown, ...bound: AX],
|
76 | ): new(...args: A) => R;
|
77 |
|
78 | }
|