This repository has been archived by the owner on Jan 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.d.ts
238 lines (126 loc) · 6.48 KB
/
index.d.ts
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
declare namespace Redash {
type Key = string | number
type Functor<T> = Array<T>
type Filterable<T> = Array<T> | object
interface API {
add (a: number, b: number): number
all<T> (predicate: (x: T) => boolean, xs: Array<T>): boolean
always<T> (x: T): (...args: Array<any>) => T
any<T> (predicate: (x: T) => boolean, xs: Array<T>): boolean
append<T> (value: T, xs: Array<T>): Array<T>
assoc<T> (key: Key, value: any, target: T): T
assocIn<T> (path: Array<Key>, value: any, target: T): T
chain<A, B> (fn: (a: A) => B | Array<B>, as: Array<A>): Array<B>
flatMap<A, B> (fn: (a: A) => B | Array<B>, as: Array<A>): Array<B>
clamp (lower: number, upper: number, value: number): number
compact<T> (xs: Array<T>): Array<T>
compact (xs: object): object
compose (...args: Array<any>): any
concat<T> (as: Array<T>, bs: Array<T>): Array<T>
concat (as: string, bs: string): string
concat (as: object, bs: object): object
cond (...args: Array<any>): any
contains<T> (x: T, xs: Array<T>): boolean
curry (fn: Function): (...args: Array<any>) => any
curryN<T> (arity: number, fn: (...args: Array<any>) => T): (...args: Array<any>) => T
dec (a: number): number
difference<T> (as: Array<T>, bs: Array<T>): Array<T>
dissoc<T> (key: Key, target: T): T
divide (a: number, b: number): number
drop<T> (n: number, xs: Array<T>): Array<T>
dropUntil<T> (predicate: (x: T) => boolean, xs: Array<T>): Array<T>
dropWhile<T> (predicate: (x: T) => boolean, xs: Array<T>): Array<T>
empty<T> (x: T): T
equals (a: any, b: any): boolean
everyPred<T> (predicates: Array<(x: T) => boolean>, target: T): boolean
F (): boolean
filter<T> (predicate: (x: T) => boolean, xs: Filterable<T>): Filterable<T>
find<T> (predicate: (x: T) => boolean, xs: Array<T>): T | undefined
findIndex<T> (predicate: (x: T) => boolean, xs: Array<T>): number
findLast<T> (predicate: (x: T) => boolean, xs: Array<T>): T | undefined
flatten<T> (xs: Array<any>): Array<any>
flattenDeep (xs: Array<any>): Array<any>
forEach<T> (fn: (x: T) => any, xs: Array<T>): undefined
fromPairs<T> (pairs: Array<[string, T]>): { [key: string]: T }
get<T> (key: string, target: { [key: string]: T }): T | undefined
get<T> (key: number, target: Array<T>): T | undefined
getIn (path: Array<Key>, target: any): any | undefined
groupBy<T> (fn: (x: T) => string, xs: Array<T>): { [key: string]: Array<T> }
has (key: string, target: object): boolean
head<T> (xs: Array<T>): T | undefined
identical (a: any, b: any): boolean
identity<T> (x: T): T
inc (x: number): number
init<T> (xs: Array<T>): Array<T>
insert<T> (index: number, value: T, xs: Array<T>): Array<T>
intersection<T> (as: Array<T>, bs: Array<T>): Array<T>
invert (obj: object): object
isEmpty (x: any): boolean
isEven (x: number): boolean
isNil (x: any): boolean
isOdd (x: number): boolean
isType (type: string | object, value: any): boolean
join (joiner: string, xs: Array<string>): string
juxt (fns: Array<Function>): Array<any>
keys (obj: object): Array<string>
last<T> (xs: Array<T>): T
length (xs: Array<any>): number
map<A, B> (fn: (a: A) => B, as: Functor<A>): Functor<B>
mapi<A, B> (fn: ((a: A, idx: number) => B), as: Functor<A>): Functor<B>
mapKeys (fn: (key: string) => Key, target: object): object
match (regex: RegExp, target: string): Array<string>
matches (spec: { [key: string]: any }, target: any): boolean
max (xs: Array<number>): number
mean (xs: Array<number>): number
merge (base: object, overrides: object): object
min (xs: Array<number>): number
multiply (a: number, b: number): number
omit (keys: Array<Key>, target: object): object
pad (length: number, char: string, string: string): string
padLeft (length: number, char: string, string: string): string
padRight (length: number, char: string, string: string): string
partition<T> (fn: (x: T) => boolean, xs: Array<T>): [T[], T[]]
pick (keys: Array<string>, object: object): object
pipe (fns: Array<Function>): (...args: Array<any>) => any
prepend<T> (x: T, xs: Array<T>): Array<T>
range (start: number, end: number): Array<number>
rangeBy (step: number, start: number, end: number): Array<number>
reduce<T, ACC> (reducer: (acc: ACC, x: T) => ACC, acc: ACC, xs: Array<T>): ACC
reduceRight<T, ACC> (reducer: (acc: ACC, x: T) => ACC, acc: ACC, xs: Array<T>): ACC
reject<T> (predicate: (x: T) => boolean, xs: Filterable<T>): Filterable<T>
replace (match: string | RegExp, replacement: string, target: string): string
reverse<T> (xs: Array<T>): Array<T>
scan<T, ACC> (reducer: (acc: ACC, x: T) => ACC, acc: ACC, xs: Array<T>): Array<ACC>
split (char: string, str: string): Array<string>
subtract (a: number, b: number): number
sum (xs: Array<number>): number
T (): boolean
tail<T> (xs: Array<T>): Array<T>
take<T> (n: number, xs: Array<T>): Array<T>
takeUntil<T> (predicate: (x: T) => boolean, xs: Array<T>): Array<T>
takeWhile<T> (predicate: (x: T) => boolean, xs: Array<T>): Array<T>
tap<T> (fn: (...args: Array<any>) => T): (...args: Array<any>) => T
test (pattern: RegExp, target: string): boolean
times<T> (fn: (n: number) => T, n: number): Array<T>
toLower (str: string): string
toPairs<T> (obj: { [key: string]: T }): Array<[string, T]>
toUpper (str: string): string
trace<T> (message: string): (x: T, ...rest: Array<any>) => T
transform (transformer: { [key: string]: any }, target: any): any
trim (str: string): string
type (x: any): string
unique<T> (xs: Array<T>): Array<T>
unless<T, Y> (predicate: (x: T) => boolean, fn: (x: T) => Y): (x: T) => T | Y
update<T> (key: Key, xform: (value: T) => any, target: Array<T>): Array<T>
update<T> (key: Key, xform: (value: T) => any, target: { [key: string]: T }): { [key: string]: T }
updateIn (...args: Array<any>): any
values<T> (obj: { [key: string]: T }): Array<T>
when<T, Y> (predicate: (x: T) => boolean, fn: (x: T) => Y): (x: T) => T | Y
where<T> (spec: { [key: string]: (predicate: T) => boolean }, target: { [key: string]: T }): boolean
without<T> (x: T, xs: Array<T>): Array<T>
zip<A, B> (as: Array<A>, bs: Array<B>): Array<[A, B]>
zipObj (keys: Array<Key>, bs: Array<any>): { [key: string]: any }
}
}
declare var R: Redash.API
export = R