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

Fix for the userCallback type - error and user positions were reversed. #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

princefishthrower
Copy link

As the title states, I noticed the type signature for userCallback is incorrect - namely, the order of user and error are reversed. This is of course a pain in that TypeScript complains because it thinks the user object is an error object, for example in the callbacks to sendbird.connect or sendbird.updateCurrentUserInfo. This pull request would resolve that typing issue.

@princefishthrower
Copy link
Author

Actually, nearly all of the callback signatures (just found another with groupChannelListQueryCallback, and many others) have this type reversal issue, and is making TypeScript typing errors very annoying in our code. Either the shape of what is returned has to be fixed, or all the typings have to be.

I'm hoping such a widespread typing issue can be resolved quickly - it would greatly improve our development efforts with sendbird.

@alminmemmo
Copy link

Same issue with getTotalUnreadChannelCount, version 3.1.7

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

Successfully merging this pull request may close these issues.

3 participants