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

Better events API #43

Open
asutula opened this issue Mar 7, 2019 · 0 comments
Open

Better events API #43

asutula opened this issue Mar 7, 2019 · 0 comments

Comments

@asutula
Copy link
Member

asutula commented Mar 7, 2019

Currently, we're just sending base64 strings of protobuf data for any events that include data. It's up the the SDK user to parse this data into the correct JS type (using the generated JS protobuf classes).

A better setup would be at least for the SDK to convert to the JS protobuf classes.

Even better would be to create explicit addListener function for each type, removing the general addListener method that takes an event type arg. So for example:

function addThreadAddedListener(listener: (thread: pb.Thread) => void)
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