-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
49 lines (43 loc) · 2.07 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* @flow */
opaque type None = empty
declare function partial<T, A, B, C, D, E>(...args: [T, None, None, None, None, None]): () => $Call<T>
declare function partial<T, A, B, C, D, E>(...args: [T, A, None, None, None, None]): (
& ((...args: [B]) => $Call<T, A, B>)
& ((...args: [B, C]) => $Call<T, A, B, C>)
& ((...args: [B, C, D]) => $Call<T, A, B, C, D>)
& ((...args: [B, C, D, E]) => $Call<T, A, B, C, D, E>)
& ((...args: []) => $Call<T, A>)
& (() => $Call<T, A>)
)
declare function partial<T, A, B, C, D, E>(...args: [T, A, B, None, None, None]): (
& ((...args: [C]) => $Call<T, A, B, C>)
& ((...args: [C, D]) => $Call<T, A, B, C, D>)
& ((...args: [C, D, E]) => $Call<T, A, B, C, D, E>)
& ((...args: []) => $Call<T, A, B>)
& (() => $Call<T, A, B>)
)
declare function partial<T, A, B, C, D, E>(...args: [T, A, B, C, None, None]): (
& ((...args: [D]) => $Call<T, A, B, C, D>)
& ((...args: [D, E]) => $Call<T, A, B, C, D, E>)
& ((...args: []) => $Call<T, A, B, C>)
& (() => $Call<T, A, B, C>)
)
declare function partial<T, A, B, C, D, E>(...args: [T, A, B, C, D, None]): (
& ((...args: [E]) => $Call<T, A, B, C, D, E>)
& ((...args: []) => $Call<T, A, B, C, D>)
& (() => $Call<T, A, B, C, D>)
)
declare function partial<T, A, B, C, D, E>(...args: [T, A, B, C, D, E]): (
& (() => $Call<T, A, B, C, D, E>)
)
declare function partial<T, A, B, C, D, E>(...args: [T, A, B, C, D, E]): $Call<typeof partial, T, A, B, C, D, E>
declare function partial<T, A, B, C, D>(...args: [T, A, B, C, D]): $Call<typeof partial, T, A, B, C, D, None>
declare function partial<T, A, B, C>(...args: [T, A, B, C]): $Call<typeof partial, T, A, B, C, None, None>
declare function partial<T, A, B>(...args: [T, A, B]): $Call<typeof partial, T, A, B, None, None, None>
declare function partial<T, A>(...args: [T, A]): $Call<typeof partial, T, A, None, None, None>
declare function partial<T>(...args: [T]): $Call<typeof partial, T, None, None, None, None>
export type _Partial = typeof partial
export type Partial<T, A = None, B = None, C = None, D = None, E = None> = $Call<
_Partial,
T, A, B, C, D, E,
>