@upstash/redis 0.1.11 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,117 @@
1
+ import upstash from './client';
2
+
3
+ const redis = upstash();
4
+
5
+ module.exports = upstash;
6
+ module.exports.auth = redis.auth;
7
+ module.exports.append = redis.append;
8
+ module.exports.decr = redis.decr;
9
+ module.exports.decrby = redis.decrby;
10
+ module.exports.get = redis.get;
11
+ module.exports.getrange = redis.getrange;
12
+ module.exports.getset = redis.getset;
13
+ module.exports.incr = redis.incr;
14
+ module.exports.incrby = redis.incrby;
15
+ module.exports.incrbyfloat = redis.incrbyfloat;
16
+ module.exports.mget = redis.mget;
17
+ module.exports.mset = redis.mset;
18
+ module.exports.msetnx = redis.msetnx;
19
+ module.exports.psetex = redis.psetex;
20
+ module.exports.set = redis.set;
21
+ module.exports.setex = redis.setex;
22
+ module.exports.setnx = redis.setnx;
23
+ module.exports.setrange = redis.setrange;
24
+ module.exports.strlen = redis.strlen;
25
+ module.exports.bitcount = redis.bitcount;
26
+ module.exports.bitop = redis.bitop;
27
+ module.exports.bitpos = redis.bitpos;
28
+ module.exports.getbit = redis.getbit;
29
+ module.exports.setbit = redis.setbit;
30
+ module.exports.echo = redis.echo;
31
+ module.exports.ping = redis.ping;
32
+ module.exports.hdel = redis.hdel;
33
+ module.exports.hexists = redis.hexists;
34
+ module.exports.hget = redis.hget;
35
+ module.exports.hgetall = redis.hgetall;
36
+ module.exports.hincrby = redis.hincrby;
37
+ module.exports.hincrbyfloat = redis.hincrbyfloat;
38
+ module.exports.hkeys = redis.hkeys;
39
+ module.exports.hlen = redis.hlen;
40
+ module.exports.hmget = redis.hmget;
41
+ module.exports.hmset = redis.hmset;
42
+ module.exports.hscan = redis.hscan;
43
+ module.exports.hset = redis.hset;
44
+ module.exports.hsetnx = redis.hsetnx;
45
+ module.exports.hvals = redis.hvals;
46
+ module.exports.del = redis.del;
47
+ module.exports.exists = redis.exists;
48
+ module.exports.expire = redis.expire;
49
+ module.exports.expireat = redis.expireat;
50
+ module.exports.keys = redis.keys;
51
+ module.exports.persist = redis.persist;
52
+ module.exports.pexpire = redis.pexpire;
53
+ module.exports.pexpireat = redis.pexpireat;
54
+ module.exports.pttl = redis.pttl;
55
+ module.exports.randomkey = redis.randomkey;
56
+ module.exports.rename = redis.rename;
57
+ module.exports.renamenx = redis.renamenx;
58
+ module.exports.scan = redis.scan;
59
+ module.exports.touch = redis.touch;
60
+ module.exports.ttl = redis.ttl;
61
+ module.exports.type = redis.type;
62
+ module.exports.unlink = redis.unlink;
63
+ module.exports.lindex = redis.lindex;
64
+ module.exports.linsert = redis.linsert;
65
+ module.exports.llen = redis.llen;
66
+ module.exports.lpop = redis.lpop;
67
+ module.exports.lpush = redis.lpush;
68
+ module.exports.lpushx = redis.lpushx;
69
+ module.exports.lrange = redis.lrange;
70
+ module.exports.lrem = redis.lrem;
71
+ module.exports.lset = redis.lset;
72
+ module.exports.ltrim = redis.ltrim;
73
+ module.exports.rpop = redis.rpop;
74
+ module.exports.rpoplpush = redis.rpoplpush;
75
+ module.exports.rpush = redis.rpush;
76
+ module.exports.rpushx = redis.rpushx;
77
+ module.exports.dbsize = redis.dbsize;
78
+ module.exports.flushall = redis.flushall;
79
+ module.exports.flushdb = redis.flushdb;
80
+ module.exports.info = redis.info;
81
+ module.exports.time = redis.time;
82
+ module.exports.sadd = redis.sadd;
83
+ module.exports.scard = redis.scard;
84
+ module.exports.sdiff = redis.sdiff;
85
+ module.exports.sdiffstore = redis.sdiffstore;
86
+ module.exports.sinter = redis.sinter;
87
+ module.exports.sinterstore = redis.sinterstore;
88
+ module.exports.sismember = redis.sismember;
89
+ module.exports.smembers = redis.smembers;
90
+ module.exports.smove = redis.smove;
91
+ module.exports.spop = redis.spop;
92
+ module.exports.srandmember = redis.srandmember;
93
+ module.exports.srem = redis.srem;
94
+ module.exports.sunion = redis.sunion;
95
+ module.exports.sunionstore = redis.sunionstore;
96
+ module.exports.zadd = redis.zadd;
97
+ module.exports.zcard = redis.zcard;
98
+ module.exports.zcount = redis.zcount;
99
+ module.exports.zincrby = redis.zincrby;
100
+ module.exports.zinterstore = redis.zinterstore;
101
+ module.exports.zlexcount = redis.zlexcount;
102
+ module.exports.zpopmax = redis.zpopmax;
103
+ module.exports.zpopmin = redis.zpopmin;
104
+ module.exports.zrange = redis.zrange;
105
+ module.exports.zrangebylex = redis.zrangebylex;
106
+ module.exports.zrangebyscore = redis.zrangebyscore;
107
+ module.exports.zrank = redis.zrank;
108
+ module.exports.zrem = redis.zrem;
109
+ module.exports.zremrangebylex = redis.zremrangebylex;
110
+ module.exports.zremrangebyrank = redis.zremrangebyrank;
111
+ module.exports.zremrangebyscore = redis.zremrangebyscore;
112
+ module.exports.zrevrange = redis.zrevrange;
113
+ module.exports.zrevrangebylex = redis.zrevrangebylex;
114
+ module.exports.zrevrangebyscore = redis.zrevrangebyscore;
115
+ module.exports.zrevrank = redis.zrevrank;
116
+ module.exports.zscore = redis.zscore;
117
+ module.exports.zunionstore = redis.zunionstore;
package/src/index.ts ADDED
@@ -0,0 +1,118 @@
1
+ import upstash from './client';
2
+
3
+ export default upstash;
4
+
5
+ export const {
6
+ auth,
7
+ append,
8
+ decr,
9
+ decrby,
10
+ get,
11
+ getrange,
12
+ getset,
13
+ incr,
14
+ incrby,
15
+ incrbyfloat,
16
+ mget,
17
+ mset,
18
+ msetnx,
19
+ psetex,
20
+ set,
21
+ setex,
22
+ setnx,
23
+ setrange,
24
+ strlen,
25
+ bitcount,
26
+ bitop,
27
+ bitpos,
28
+ getbit,
29
+ setbit,
30
+ echo,
31
+ ping,
32
+ hdel,
33
+ hexists,
34
+ hget,
35
+ hgetall,
36
+ hincrby,
37
+ hincrbyfloat,
38
+ hkeys,
39
+ hlen,
40
+ hmget,
41
+ hmset,
42
+ hscan,
43
+ hset,
44
+ hsetnx,
45
+ hvals,
46
+ del,
47
+ exists,
48
+ expire,
49
+ expireat,
50
+ keys,
51
+ persist,
52
+ pexpire,
53
+ pexpireat,
54
+ pttl,
55
+ randomkey,
56
+ rename,
57
+ renamenx,
58
+ scan,
59
+ touch,
60
+ ttl,
61
+ type,
62
+ unlink,
63
+ lindex,
64
+ linsert,
65
+ llen,
66
+ lpop,
67
+ lpush,
68
+ lpushx,
69
+ lrange,
70
+ lrem,
71
+ lset,
72
+ ltrim,
73
+ rpop,
74
+ rpoplpush,
75
+ rpush,
76
+ rpushx,
77
+ dbsize,
78
+ flushall,
79
+ flushdb,
80
+ info,
81
+ time,
82
+ sadd,
83
+ scard,
84
+ sdiff,
85
+ sdiffstore,
86
+ sinter,
87
+ sinterstore,
88
+ sismember,
89
+ smembers,
90
+ smove,
91
+ spop,
92
+ srandmember,
93
+ srem,
94
+ sunion,
95
+ sunionstore,
96
+ zadd,
97
+ zcard,
98
+ zcount,
99
+ zincrby,
100
+ zinterstore,
101
+ zlexcount,
102
+ zpopmax,
103
+ zpopmin,
104
+ zrange,
105
+ zrangebylex,
106
+ zrangebyscore,
107
+ zrank,
108
+ zrem,
109
+ zremrangebylex,
110
+ zremrangebyrank,
111
+ zremrangebyscore,
112
+ zrevrange,
113
+ zrevrangebylex,
114
+ zrevrangebyscore,
115
+ zrevrank,
116
+ zscore,
117
+ zunionstore,
118
+ } = upstash();
package/src/types.ts ADDED
@@ -0,0 +1,410 @@
1
+ export type ClientObjectProps = {
2
+ url?: undefined | string;
3
+ token?: undefined | string;
4
+ requestOptions?: undefined | RequestInit;
5
+ };
6
+
7
+ export type ReturnType = {
8
+ data: string | number | [] | any;
9
+ error: string | null;
10
+ };
11
+
12
+ export type MethodReturn = Promise<ReturnType>;
13
+
14
+ export type Part = string | boolean | number;
15
+
16
+ export type Bit = 0 | 1;
17
+
18
+ export type Infinities = '+inf' | '-inf';
19
+
20
+ export type ZSetNumber = Infinities | number | string;
21
+
22
+ type Auth1 = (options?: ClientObjectProps) => void;
23
+ type Auth2 = (url?: string, token?: string) => void;
24
+ type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
25
+
26
+ type SET1 = (key: string, value: string | number) => MethodReturn;
27
+ type SET2 = (
28
+ key: string,
29
+ value: string | number,
30
+ timeType: 'EX' | 'PX',
31
+ time: number | string
32
+ ) => MethodReturn;
33
+
34
+ type BITCOUNT1 = (key: string) => MethodReturn;
35
+ type BITCOUNT2 = (
36
+ key: string,
37
+ start: number | string,
38
+ end: number | string
39
+ ) => MethodReturn;
40
+
41
+ type BITPOS1 = (key: string, bit: Bit) => MethodReturn;
42
+ type BITPOS2 = (key: string, bit: Bit, start: number) => MethodReturn;
43
+ type BITPOS3 = (
44
+ key: string,
45
+ bit: Bit,
46
+ start: number,
47
+ end: number
48
+ ) => MethodReturn;
49
+
50
+ type PING1 = () => MethodReturn;
51
+ type PING2 = (message: string) => MethodReturn;
52
+
53
+ type SCAN1 = (cursor: number | string) => MethodReturn;
54
+ type SCAN2 = (
55
+ cursor: number | string,
56
+ match: 'MATCH',
57
+ pattern: string
58
+ ) => MethodReturn;
59
+ type SCAN3 = (
60
+ cursor: number | string,
61
+ count: 'COUNT',
62
+ value: number | string
63
+ ) => MethodReturn;
64
+ type SCAN4 = (
65
+ cursor: number | string,
66
+ match: 'MATCH',
67
+ pattern: string,
68
+ count: 'COUNT',
69
+ value: number | string
70
+ ) => MethodReturn;
71
+
72
+ type FLUSHALL1 = () => MethodReturn;
73
+ type FLUSHALL2 = (mode: 'ASYNC') => MethodReturn;
74
+
75
+ type FLUSHDB1 = () => MethodReturn;
76
+ type FLUSHDB2 = (mode: 'ASYNC' | 'SYNC') => MethodReturn;
77
+
78
+ type INFO1 = () => MethodReturn;
79
+ type INFO2 = (section: string) => MethodReturn;
80
+
81
+ type XSCAN1 = (key: string, cursor: number | string) => MethodReturn;
82
+ type XSCAN2 = (
83
+ key: string,
84
+ cursor: number | string,
85
+ match: 'MATCH',
86
+ pattern: string
87
+ ) => MethodReturn;
88
+ type XSCAN3 = (
89
+ key: string,
90
+ cursor: number | string,
91
+ count: 'COUNT',
92
+ value: number | string
93
+ ) => MethodReturn;
94
+ type XSCAN4 = (
95
+ key: string,
96
+ cursor: number | string,
97
+ match: 'MATCH',
98
+ pattern: string,
99
+ count: 'COUNT',
100
+ value: number | string
101
+ ) => MethodReturn;
102
+
103
+ type SPOP1 = (key: string) => MethodReturn;
104
+ type SPOP2 = (key: string, count: number) => MethodReturn;
105
+
106
+ type SRANDMEMBER1 = (key: string) => MethodReturn;
107
+ type SRANDMEMBER2 = (key: string, count: number) => MethodReturn;
108
+
109
+ type ZPOPMAX1 = (key: string) => MethodReturn;
110
+ type ZPOPMAX2 = (key: string, count: number | string) => MethodReturn;
111
+
112
+ type ZRANGE1 = (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
113
+ type ZRANGE2 = (
114
+ key: string,
115
+ min: ZSetNumber,
116
+ max: ZSetNumber,
117
+ withscores: 'WITHSCORES'
118
+ ) => MethodReturn;
119
+
120
+ type ZRANGEBYLEX1 = (
121
+ key: string,
122
+ min: ZSetNumber,
123
+ max: ZSetNumber
124
+ ) => MethodReturn;
125
+ type ZRANGEBYLEX2 = (
126
+ key: string,
127
+ min: ZSetNumber,
128
+ max: ZSetNumber,
129
+ limit: 'LIMIT',
130
+ offset: number | string,
131
+ count: number | string
132
+ ) => MethodReturn;
133
+
134
+ type ZRANGEBYSCORE1 = (
135
+ key: string,
136
+ min: ZSetNumber,
137
+ max: ZSetNumber
138
+ ) => MethodReturn;
139
+ type ZRANGEBYSCORE2 = (
140
+ key: string,
141
+ min: ZSetNumber,
142
+ max: ZSetNumber,
143
+ withScores: 'WITHSCORES'
144
+ ) => MethodReturn;
145
+ type ZRANGEBYSCORE3 = (
146
+ key: string,
147
+ min: ZSetNumber,
148
+ max: ZSetNumber,
149
+ limit: 'LIMIT',
150
+ offset: number | string,
151
+ count: number | string
152
+ ) => MethodReturn;
153
+ type ZRANGEBYSCORE4 = (
154
+ key: string,
155
+ min: ZSetNumber,
156
+ max: ZSetNumber,
157
+ withScores: 'WITHSCORES',
158
+ limit: 'LIMIT',
159
+ offset: number | string,
160
+ count: number | string
161
+ ) => MethodReturn;
162
+
163
+ type ZREVRANGEBYLEX1 = (
164
+ key: string,
165
+ max: ZSetNumber,
166
+ min: ZSetNumber
167
+ ) => MethodReturn;
168
+ type ZREVRANGEBYLEX2 = (
169
+ key: string,
170
+ max: ZSetNumber,
171
+ min: ZSetNumber,
172
+ limit: 'LIMIT',
173
+ offset: number | string,
174
+ count: number | string
175
+ ) => MethodReturn;
176
+
177
+ type ZREVRANGEBYSCORE1 = (
178
+ key: string,
179
+ max: ZSetNumber,
180
+ min: ZSetNumber
181
+ ) => MethodReturn;
182
+ type ZREVRANGEBYSCORE2 = (
183
+ key: string,
184
+ max: ZSetNumber,
185
+ min: ZSetNumber,
186
+ withScores: 'WITHSCORES'
187
+ ) => MethodReturn;
188
+ type ZREVRANGEBYSCORE3 = (
189
+ key: string,
190
+ max: ZSetNumber,
191
+ min: ZSetNumber,
192
+ limit: 'LIMIT',
193
+ offset: number | string,
194
+ count: number | string
195
+ ) => MethodReturn;
196
+ type ZREVRANGEBYSCORE4 = (
197
+ key: string,
198
+ max: ZSetNumber,
199
+ min: ZSetNumber,
200
+ withScores: 'WITHSCORES',
201
+ limit: 'LIMIT',
202
+ offset: number | string,
203
+ count: number | string
204
+ ) => MethodReturn;
205
+
206
+ type ZREVRANGE1 = (
207
+ key: string,
208
+ start: number | string,
209
+ stop: number | string
210
+ ) => MethodReturn;
211
+ type ZREVRANGE2 = (
212
+ key: string,
213
+ start: number | string,
214
+ stop: number | string,
215
+ withscores: 'WITHSCORES'
216
+ ) => MethodReturn;
217
+
218
+ export type Upstash = {
219
+ auth: Auth1 & Auth2 & Auth3;
220
+ //
221
+ append: (key: string, value: string) => MethodReturn;
222
+ decr: (key: string) => MethodReturn;
223
+ decrby: (key: string, decrement: number | string) => MethodReturn;
224
+ get: (key: string) => MethodReturn;
225
+ getrange: (
226
+ key: string,
227
+ start: number | string,
228
+ end: number | string
229
+ ) => MethodReturn;
230
+ getset: (key: string, value: string) => MethodReturn;
231
+ incr: (key: string) => MethodReturn;
232
+ incrby: (key: string, increment: number | string) => MethodReturn;
233
+ incrbyfloat: (key: string, increment: number | string) => MethodReturn;
234
+ mget: (...key: any) => MethodReturn;
235
+ mset: (...keyValue: any) => MethodReturn;
236
+ msetnx: (...keyValue: any) => MethodReturn;
237
+ psetex: (
238
+ key: string,
239
+ miliseconds: number | string,
240
+ value: string
241
+ ) => MethodReturn;
242
+ set: SET1 & SET2;
243
+ setex: (key: string, seconds: number | string, value: string) => MethodReturn;
244
+ setnx: (key: string, value: string) => MethodReturn;
245
+ setrange: (
246
+ key: string,
247
+ offset: number | string,
248
+ value: string
249
+ ) => MethodReturn;
250
+ strlen: (key: string) => MethodReturn;
251
+ //
252
+ bitcount: BITCOUNT1 & BITCOUNT2;
253
+ bitop: (
254
+ operation: 'AND' | 'OR' | 'XOR' | 'NOT',
255
+ destKey: string,
256
+ ...key: any
257
+ ) => MethodReturn;
258
+ bitpos: BITPOS1 & BITPOS2 & BITPOS3;
259
+ getbit: (key: string, offset: number | string) => MethodReturn;
260
+ setbit: (key: string, offset: number | string, value: Bit) => MethodReturn;
261
+ //
262
+ echo: (message: string) => MethodReturn;
263
+ ping: PING1 & PING2;
264
+ //
265
+ hdel: (key: string, ...field: any) => MethodReturn;
266
+ hexists: (key: string, field: string) => MethodReturn;
267
+ hget: (key: string, field: string) => MethodReturn;
268
+ hgetall: (key: string) => MethodReturn;
269
+ hincrby: (
270
+ key: string,
271
+ field: string,
272
+ increment: number | string
273
+ ) => MethodReturn;
274
+ hincrbyfloat: (
275
+ key: string,
276
+ field: string,
277
+ increment: number | string
278
+ ) => MethodReturn;
279
+ hkeys: (key: string) => MethodReturn;
280
+ hlen: (key: string) => MethodReturn;
281
+ hmget: (key: string, ...field: any) => MethodReturn;
282
+ hmset: (key: string, ...fieldValue: any) => MethodReturn;
283
+ hscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
284
+ hset: (key: string, ...fieldValue: any) => MethodReturn;
285
+ hsetnx: (key: string, field: string, value: string) => MethodReturn;
286
+ hvals: (key: string) => MethodReturn;
287
+ //
288
+ del: (...key: any) => MethodReturn;
289
+ exists: (...key: any) => MethodReturn;
290
+ expire: (key: string, seconds: number | string) => MethodReturn;
291
+ expireat: (key: string, timestamp: number | string) => MethodReturn;
292
+ keys: (pattern: string) => MethodReturn;
293
+ persist: (key: string) => MethodReturn;
294
+ pexpire: (key: string, miliseconds: number | string) => MethodReturn;
295
+ pexpireat: (
296
+ key: string,
297
+ milisecondsTimestamp: number | string
298
+ ) => MethodReturn;
299
+ pttl: (key: string) => MethodReturn;
300
+ randomkey: () => MethodReturn;
301
+ rename: (key: string, newKey: string) => MethodReturn;
302
+ renamenx: (key: string, newKey: string) => MethodReturn;
303
+ scan: SCAN1 & SCAN2 & SCAN3 & SCAN4;
304
+ touch: (...key: any) => MethodReturn;
305
+ ttl: (key: string) => MethodReturn;
306
+ type: (key: string) => MethodReturn;
307
+ unlink: (...key: any) => MethodReturn;
308
+ //
309
+ lindex: (key: string, index: number | string) => MethodReturn;
310
+ linsert: (
311
+ key: string,
312
+ option: 'BEFORE' | 'AFTER',
313
+ pivot: string,
314
+ element: string
315
+ ) => MethodReturn;
316
+ llen: (key: string) => MethodReturn;
317
+ lpop: (key: string) => MethodReturn;
318
+ lpush: (key: string, ...element: any) => MethodReturn;
319
+ lpushx: (key: string, ...element: any) => MethodReturn;
320
+ lrange: (
321
+ key: string,
322
+ start: number | string,
323
+ stop: number | string
324
+ ) => MethodReturn;
325
+ lrem: (key: string, count: number | string, element: string) => MethodReturn;
326
+ lset: (key: string, index: number | string, element: string) => MethodReturn;
327
+ ltrim: (
328
+ key: string,
329
+ start: number | string,
330
+ stop: number | string
331
+ ) => MethodReturn;
332
+ rpop: (key: string) => MethodReturn;
333
+ rpoplpush: (source: string, destination: string) => MethodReturn;
334
+ rpush: (key: string, ...element: any) => MethodReturn;
335
+ rpushx: (key: string, ...element: any) => MethodReturn;
336
+ //
337
+ dbsize: () => MethodReturn;
338
+ flushall: FLUSHALL1 & FLUSHALL2;
339
+ flushdb: FLUSHDB1 & FLUSHDB2;
340
+ info: INFO1 & INFO2;
341
+ time: () => MethodReturn;
342
+ //
343
+ sadd: (key: string, ...member: any) => MethodReturn;
344
+ scard: (key: string) => MethodReturn;
345
+ sdiff: (...key: any) => MethodReturn;
346
+ sdiffstore: (destination: string, ...key: any) => MethodReturn;
347
+ sinter: (...key: any) => MethodReturn;
348
+ sinterstore: (destination: string, ...key: any) => MethodReturn;
349
+ sismember: (key: string, member: string) => MethodReturn;
350
+ smembers: (key: string) => MethodReturn;
351
+ smove: (source: string, destination: string, member: string) => MethodReturn;
352
+ spop: SPOP1 & SPOP2;
353
+ srandmember: SRANDMEMBER1 & SRANDMEMBER2;
354
+ srem: (key: string, ...member: any) => MethodReturn;
355
+ sscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
356
+ sunion: (...key: any) => MethodReturn;
357
+ sunionstore: (destination: string, ...key: any) => MethodReturn;
358
+ //
359
+ zadd: (key: string, ...scoreMember: any) => MethodReturn;
360
+ zcard: (key: string) => MethodReturn;
361
+ zcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
362
+ zincrby: (
363
+ key: string,
364
+ increment: number | string,
365
+ member: string
366
+ ) => MethodReturn;
367
+ // TODO: fix args
368
+ zinterstore: (
369
+ destination: string,
370
+ numkeys: number | string,
371
+ ...key: any
372
+ ) => MethodReturn;
373
+ zlexcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
374
+ zpopmax: ZPOPMAX1 & ZPOPMAX2;
375
+ zpopmin: ZPOPMAX1 & ZPOPMAX2;
376
+ zrange: ZRANGE1 & ZRANGE2;
377
+ zrangebylex: ZRANGEBYLEX1 & ZRANGEBYLEX2;
378
+ zrangebyscore: ZRANGEBYSCORE1 &
379
+ ZRANGEBYSCORE2 &
380
+ ZRANGEBYSCORE3 &
381
+ ZRANGEBYSCORE4;
382
+ zrank: (key: string, member: string) => MethodReturn;
383
+ zrem: (key: string, ...member: any) => MethodReturn;
384
+ zremrangebylex: (
385
+ key: string,
386
+ min: ZSetNumber,
387
+ max: ZSetNumber
388
+ ) => MethodReturn;
389
+ zremrangebyrank: (
390
+ key: string,
391
+ start: number | string,
392
+ stop: number | string
393
+ ) => MethodReturn;
394
+ zremrangebyscore: (
395
+ key: string,
396
+ min: ZSetNumber,
397
+ max: ZSetNumber
398
+ ) => MethodReturn;
399
+ zrevrange: ZREVRANGE1 & ZREVRANGE2;
400
+ zrevrangebylex: ZREVRANGEBYLEX1 & ZREVRANGEBYLEX2;
401
+ zrevrangebyscore: ZREVRANGEBYSCORE1 &
402
+ ZREVRANGEBYSCORE2 &
403
+ ZREVRANGEBYSCORE3 &
404
+ ZREVRANGEBYSCORE4;
405
+ zrevrank: (key: string, member: string) => MethodReturn;
406
+ zscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
407
+ zscore: (key: string, member: string) => MethodReturn;
408
+ // TODO: fix args
409
+ zunionstore: (destination: string, ...numkeys: any) => MethodReturn;
410
+ };
package/tsconfig.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
- "include": ["src", "types"],
3
- "exclude": ["node_modules/**/*.ts"],
2
+ "files": ["src/index-cjs.ts"],
3
+ "exclude": ["./**/dist", "node_modules"],
4
4
  "compilerOptions": {
5
5
  "declaration": true,
6
- "declarationMap": true,
6
+ "lib": ["ES2015", "DOM"],
7
7
  "module": "CommonJS",
8
+ "rootDir": "src",
8
9
  "outDir": "dist/main",
9
- "sourceMap": true,
10
- "target": "ES2019",
10
+ "target": "ES2015",
11
11
  "strict": true,
12
- "esModuleInterop": true,
13
12
  "moduleResolution": "Node",
14
13
  "forceConsistentCasingInFileNames": true,
15
14
  "stripInternal": true,
16
- "allowSyntheticDefaultImports": true
15
+ "allowSyntheticDefaultImports": true,
16
+ "esModuleInterop": true,
17
+ "baseUrl": ".",
18
+ "typeRoots": ["./src/types", "node_modules/@types"]
17
19
  }
18
20
  }
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "extends": "./tsconfig",
3
+ "files": ["src/index.ts"],
3
4
  "compilerOptions": {
4
- "module": "ES2015",
5
- "outDir": "dist/module"
5
+ "outDir": "dist/module",
6
+ "module": "ES2015"
6
7
  }
7
8
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,GAAG,GAAG,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,aAAK,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAExC,aAAK,QAAQ,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK,GAAG,CAAC;AAIzC,aAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjB,aAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAElC,aAAK,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;gBAQtC,MAAM,SAAS,MAAM;kBAiDjC,MAAM,SACJ,MAAM;gBAMI,MAAM;kBAKlB,MAAM,aACA,MAAM;eAMD,MAAM;oBAKjB,MAAM,SACJ,MAAM,OACR,MAAM;kBAON,MAAM,SACJ,MAAM;gBAMI,MAAM;kBAKlB,MAAM,SACJ,MAAM,GAAG,MAAM;uBAOjB,MAAM,SACJ,MAAM,GAAG,MAAM;mBAMF,MAAM,EAAE;mBAIR,MAAM,EAAE;qBAIN,MAAM,EAAE;kBAKzB,MAAM,eACE,MAAM,SACZ,MAAM,GAAG,MAAM;eAOjB,MAAM,SACJ,MAAM,GAAG,MA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