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 of options in Producer/Consumer constructor #54

Open
leftshift opened this issue Feb 28, 2023 · 0 comments
Open

Type of options in Producer/Consumer constructor #54

leftshift opened this issue Feb 28, 2023 · 0 comments

Comments

@leftshift
Copy link

The Readme mentions the other options from the nsqjs Reader/Writer being available in the second argument of the Producer constructor.

However, the actual typescript type does not reflect this, which leads to a type error if you try to provide more options. This could probably be solved most easily by exporting a type intersected with the nsqjs ConnectionConfigOptions type.

The only downside would be adding @types/nsqjs as a (dev?) dependency to this library. Alternatively, the option definintion could be duplicated, but that seems less than ideal.

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

1 participant