Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
  • Loading branch information
2 people authored and Ubuntu committed May 28, 2024
1 parent 1891175 commit 64d2273
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1229,15 +1229,17 @@ export class BaseClient {
* Creates a new destination set if needed. The operation is atomic.
* See https://valkey.io/commands/smove for more details.
*
* Note: When in cluster mode, `source` and `destination` must map to the same hash slot.
*
* @param source - The key of the set to remove the element from.
* @param destination - The key of the set to add the element to.
* @param member - The set element to move.
* @returns True on success, or False if the `source` set does not exist or the element is not a member of the source set.
*
* @example
* ```typescript
* const result == await client.smove("set1", "set2", "member1");
* console.log(result); // Output: True # "member1" was moved from "set1" to "set2".
* const result = await client.smove("set1", "set2", "member1");
* console.log(result); // Output: True - "member1" was moved from "set1" to "set2".
* ```
*/
public smove(
Expand Down
2 changes: 2 additions & 0 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* Creates a new destination set if needed. The operation is atomic.
* See https://valkey.io/commands/smove for more details.
*
* Note: When in cluster mode, `source` and `destination` must map to the same hash slot.
*
* @param source - The key of the set to remove the element from.
* @param destination - The key of the set to add the element to.
* @param member - The set element to move.
Expand Down

0 comments on commit 64d2273

Please sign in to comment.