Skip to content

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