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

Improve and enrich exported types #159

Open
slaesh opened this issue Apr 29, 2022 · 2 comments
Open

Improve and enrich exported types #159

slaesh opened this issue Apr 29, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@slaesh
Copy link

slaesh commented Apr 29, 2022

Feature request

I have no clue what's the current state of this lib, maybe this would come later on..
But the exported types should be improved and enriched.

For example:

Currently the interface for the RealtimeChannel's on call could be easily improved.

on(type: string, filter?: { [key: string]: string }, callback?: Function) {

Instead of

on(type: string, filter?: { [key: string]: string }, callback?: Function) {}

we should go with this:

on(type: string, callback: Function, filter?: { [key: string]: string })
  1. why register a listener without a callback? so make it mandatory..
  2. since point 1, move the optional filters at the end
  3. it would be great not to use just Function.. What about making it typed instead? =)
@slaesh slaesh added the enhancement New feature or request label Apr 29, 2022
@w3b6x9
Copy link
Member

w3b6x9 commented May 19, 2022

exported types should be improved and enriched

@slaesh absolutely agree with you.

We're planning some big changes to this client lib and will improve the types. Will incorporate some of the feedback you've given here.

@w3b6x9
Copy link
Member

w3b6x9 commented Sep 27, 2022

@slaesh don't want you to think we've forgotten about this. We'll be working on types in the next few weeks. Apologies on the delay!

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

No branches or pull requests

2 participants