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

Make JavaScript SDK typescript compatible #5066

Closed
mustafaboleken opened this issue May 3, 2023 · 4 comments
Closed

Make JavaScript SDK typescript compatible #5066

mustafaboleken opened this issue May 3, 2023 · 4 comments
Assignees
Labels

Comments

@mustafaboleken
Copy link
Contributor

https://betterprogramming.pub/turn-javascript-into-typescript-compatible-packages-cb81820838ed

@MaZZly
Copy link

MaZZly commented Nov 16, 2023

  • webRTCAdaptor.play() shows to have 7 required parameters, while only the first 2 are actually required.
    • enableTracks is set to MediaStreamTrack while docs says it is an array, should probably be MediaStreamTrack[]
    • All parameters after enableTracks are undocumented
  • webRTCAdaptor.joinRoom() shows 3 required params, while only the first one is actually required.
  • callback() and callbackError() are not defined at all..
  • I'm sure there are many others like this...

Also, there are 178 instances of : any in the definitions, which is not recommended by TypeScript
(which, kind of, defeats the purpose of having hints in the first place 🙈)

@MaZZly
Copy link

MaZZly commented Nov 16, 2023

@mekya I would suggest that you open a ticket to write the "conference-room" sample app in Typescript, and as part of doing that one, the dev would also clean up the TypeScript hints.

That way you could easily weed out most of the potential problems with the Typescript hints...

@mustafaboleken
Copy link
Contributor Author

Hi @MaZZly,
It's a good idea. We can add some sample apps and with the help of it, we can also arrange the type definitions and required/optional parameters. I'm taking the initiative to proceed. @mekya

@mustafaboleken
Copy link
Contributor Author

Conversation goes on #4037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants