Skip to content

Commit 31fb297

Browse files
authored
test update (#10)
* # update - test ->100% - doc - readme - dir set * test update - set-smembers * - test update
1 parent ceae246 commit 31fb297

30 files changed

+1741
-404
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="https://tedis.myour.tech" target="_blank" rel="noopener noreferrer"><img src="./doc/.vuepress/public/icons/android-chrome-192x192.png" alt="tedis logo"></a>
2+
<a href="https://tedis.myour.tech/en" target="_blank" rel="noopener noreferrer"><img src="./doc/.vuepress/public/icons/android-chrome-192x192.png" alt="tedis logo"></a>
33
</p>
44

55
<p align="center">
@@ -21,9 +21,9 @@
2121

2222
## Introduction
2323

24-
### what is tedis
24+
### What is tedis
2525

26-
`Tedis` write with typescript, it's the client of redis for nodejs, support asycn with ts and commonjs
26+
Tedis write with typescript, it's the client of redis for nodejs, support asycn with ts and commonjs
2727

2828
### Installation
2929

@@ -52,7 +52,7 @@ const client = new Redis({
5252
});
5353
```
5454

55-
### example
55+
### Example
5656

5757
```ts
5858
/**

doc/api/set.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ redis> SMEMBERS myset
4343
- 接口:
4444

4545
```ts
46-
sadd(key: string, ...members: Array<string | number>): Promise<number>;
46+
sadd(
47+
key: string,
48+
member: string | number,
49+
...members: Array<string | number>
50+
): Promise<number>;
4751
```
4852

4953
- 示例:
@@ -126,7 +130,7 @@ redis> SDIFF key1 key2
126130
- 接口:
127131

128132
```ts
129-
sdiff(key: string, ...keys: string[]): Promise<Array<string | number>>;
133+
sdiff(key: string, anotherkey: string, ...keys: string[]): Promise<string[]>;
130134
```
131135

132136
- 示例:
@@ -174,7 +178,12 @@ redis> SMEMBERS key
174178
- 接口:
175179

176180
```ts
177-
sdiffstore(destination: string, key: string, ...keys: string[]): Promise<number>;
181+
sdiffstore(
182+
destination: string,
183+
key: string,
184+
anotherkey: string,
185+
...keys: string[]
186+
): Promise<number>;
178187
```
179188

180189
- 示例:
@@ -217,7 +226,7 @@ redis> SINTER key1 key2
217226
- 接口:
218227

219228
```ts
220-
sinter(key: string, ...keys: string[]): Promise<Array<string | number>>;
229+
sinter(key: string, anotherkey: string, ...keys: string[]): Promise<string[]>;
221230
```
222231

223232
- 示例:
@@ -263,7 +272,12 @@ redis> SMEMBERS key
263272
- 接口:
264273

265274
```ts
266-
sinterstore(destination: string, key: string, ...keys: string[]): Promise<number>;
275+
sinterstore(
276+
destination: string,
277+
key: string,
278+
anotherkey: string,
279+
...keys: string[]
280+
): Promise<number>;
267281
```
268282

269283
- 示例:
@@ -300,7 +314,7 @@ redis> SISMEMBER myset "two"
300314
- 接口:
301315

302316
```ts
303-
sismember(key: string, member: string): Promise<number>;
317+
sismember(key: string, member: string | number): Promise<number>;
304318
```
305319

306320
- 示例:
@@ -338,7 +352,7 @@ redis> SMEMBERS myset
338352
- 接口:
339353

340354
```ts
341-
smembers(key: string): Promise<Array<string|number>>;
355+
smembers(key: string): Promise<string[]>;
342356
```
343357

344358
- 示例:
@@ -386,7 +400,11 @@ redis> SMEMBERS myotherset
386400
- 接口:
387401

388402
```ts
389-
smove(source: string, destination: string, member: string): Promise<number>;
403+
smove(
404+
source: string,
405+
destination: string,
406+
member: string | number
407+
): Promise<number>;
390408
```
391409

392410
- 示例:
@@ -438,7 +456,8 @@ redis> SMEMBERS myset
438456
- 接口:
439457

440458
```ts
441-
spop(key: string, count?: number): Promise<string|number|null|Array<string|number>>;
459+
spop(key: string, count: number): Promise<string[]>;
460+
spop(key: string): Promise<string | null>;
442461
```
443462

444463
- 示例:
@@ -486,7 +505,8 @@ redis> SRANDMEMBER myset -5
486505
- 接口:
487506

488507
```ts
489-
srandmember(key: string, count?: number): Promise<string|number|null|Array<string|number>>;
508+
srandmember(key: string, count: number): Promise<string[]>;
509+
srandmember(key: string): Promise<string | null>;
490510
```
491511

492512
- 示例:
@@ -537,7 +557,11 @@ redis> SMEMBERS myset
537557
- 接口:
538558

539559
```ts
540-
srem(key: string, member: string, ...members: string[]): Promise<number>;
560+
srem(
561+
key: string,
562+
member: string | number,
563+
...members: Array<string | number>
564+
): Promise<number>;
541565
```
542566

543567
- 示例:
@@ -586,7 +610,7 @@ redis> SUNION key1 key2
586610
- 接口:
587611

588612
```ts
589-
sunion(key: string, keys: string[]): Promise<Array<string|number>>;
613+
sunion(key: string, anotherkey: string, ...keys: string[]): Promise<string[]>;
590614
```
591615

592616
- 示例:
@@ -636,7 +660,12 @@ redis> SMEMBERS key
636660
- 接口:
637661

638662
```ts
639-
sunionstore(destination: string, key: string, keys: string[]): Promise<number>;
663+
sunionstore(
664+
destination: string,
665+
key: string,
666+
anotherkey: string,
667+
...keys: string[]
668+
): Promise<number>;
640669
```
641670

642671
- 示例:

0 commit comments

Comments
 (0)