-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command ZRandMember #2013
Add command ZRandMember #2013
Conversation
945db32
to
42bc183
Compare
dde58fa
to
ddf2c97
Compare
This comment was marked as resolved.
This comment was marked as resolved.
address comments Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: TJ Zhang <[email protected]>
408a7e0
to
a8b3e71
Compare
Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: TJ Zhang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -185,6 +185,7 @@ export type ReturnType = | |||
| null | |||
| boolean | |||
| bigint | |||
| Buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required to make the change in transaction tests
* console.log(payload2); // Output: null | ||
* ``` | ||
*/ | ||
public async zrandmember(key: string): Promise<string | null> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider:
public async zrandmember(key: string): Promise<string | null> { | |
public async zrandmember(key: string, count?: number): Promise<string | null | string[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not do this. just because we can merge signatures, it's not always the right thing to do.
it would reduce the number of commands we need to maintain, but it means we have to rely on the user reading and understanding the documentation
Signed-off-by: TJ Zhang <[email protected]>
Signed-off-by: TJ Zhang <[email protected]>
No description provided.