Skip to content
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

type declaration of setBuffer argument requires 'GET' #1586

Closed
cnwangjie opened this issue May 21, 2022 · 2 comments
Closed

type declaration of setBuffer argument requires 'GET' #1586

cnwangjie opened this issue May 21, 2022 · 2 comments

Comments

@cnwangjie
Copy link

The generated type declaration of setBuffer method argument requires providing a 'GET'. It should be optional.

https://github.com/luin/ioredis/blob/91ed2d817ac3ca304d6dbe97823594dc5eee2181/lib/utils/RedisCommander.ts#L6611-L6627

current version: 5.0.5

@luin
Copy link
Collaborator

luin commented May 21, 2022

Hey @cnwangjie 👋

You can call set if you don't need to GET parameter. -Buffer variant is only used when you need to reply to be returned as a Buffer, whereas without GET, the result is always OK so there is no need to use the variant.

luin added a commit that referenced this issue May 21, 2022
@cnwangjie
Copy link
Author

Hi @luin,

Thank you for your prompt reply. It's Helpful that your description of the Buffer suffix in README. I guess many people have misunderstood it and made mistakes that they are used to passing a Buffer object as an argument. 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants