Skip to content

Commit

Permalink
PR comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
  • Loading branch information
Yury-Fridlyand authored and alex-arzola-imp committed Apr 24, 2024
1 parent 5b2f793 commit 21dd208
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 2 additions & 3 deletions examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"@aws/glide-for-redis": "^0.1.0",
"@types/node": "^20.4.8"
},
"scripts": {
"build": "tsc --build",
"clean": "tsc --build --clean"
"devDependencies": {
"typescript": "^5.1.6"
}
}
12 changes: 7 additions & 5 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ export class BaseClient {
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
* @returns - An `array` containing the `key` from which the element was popped and the value of the popped element,
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
*
* @example
* ```typescript
Expand All @@ -2209,17 +2209,19 @@ export class BaseClient {
* with the given keys being checked in the order that they are given.
* Blocks the connection when there are no elements to pop from any of the given lists.
* See https://redis.io/commands/blpop/ for more details.
* Note: BRPOP is a blocking command,
* Note: BLPOP is a blocking command,
* see [Blocking Commands](https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands) for more details and best practices.
*
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
* @returns - An `array` containing the `key` from which the element was popped and the value of the popped element,
* formatted as [key, value]. If no element could be popped and the timeout expired, returns null.
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
*
* @example
* await client.blpop(["list1", "list2"], 5);
* ["list1", "element"]
* ```typescript
* const result = await client.blpop(["list1", "list2"], 5);
* console.log(result); // Output: ['list1', 'element']
* ```
*/
public blpop(
keys: string[],
Expand Down
4 changes: 2 additions & 2 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
* Command Response - An `array` containing the `key` from which the element was popped and the value of the popped element,
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
*/
public brpop(keys: string[], timeout: number): T {
return this.addAndReturn(createBrpop(keys, timeout));
Expand All @@ -1271,7 +1271,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
* Command Response - An `array` containing the `key` from which the element was popped and the value of the popped element,
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
*/
public blpop(keys: string[], timeout: number): T {
return this.addAndReturn(createBlpop(keys, timeout));
Expand Down

0 comments on commit 21dd208

Please sign in to comment.