Skip to content

Multiple type building improvements/fixes #225

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

Merged
merged 5 commits into from
Jun 12, 2021

Conversation

zoton2
Copy link
Collaborator

@zoton2 zoton2 commented Mar 4, 2021

Related Issue (if applicable):

N/A

Description:

This PR changes/fixes a few things in relation to the type build script:

  • Fixes an issue where the build would fail because the ScenesCollection typedef wasn't defined yet.
  • Adds an error event type with (mostly) correct types. This makes add error event to types #217 redundant and is a little more specific as the type returned should be more than a string, as the underlying error is a normal WebSocket error.
  • Fixes the Output typedef not being used correctly.
  • Fixes all of the events/requests that use Array<Object> parameters to actually have correct types; before they seemed to only have the type of their last property as the array type (for example string[]).
  • Adds a small "hack" to allow arbitrary properties for the new ExecuteBatch request; you could probably have really good types depending on what is supplied/received for the request-type but not sure of the best way to do that; presumably with the type mapping?

Before Lange/Alex Van Camp went MIA, he did mention to me that something would need to be "fixed" with the type building for this library, although that message was in a Discord server that was deleted/I no longer have access to, so I'm not sure if these were the fixes, or if something more needs to be done. It appears to build just fine now and don't think there were any changes in obs-websocket itself that should make a difference?

duncte123 added a commit to duncte123/obs-websocket-js that referenced this pull request Jun 10, 2021
@t2t2 t2t2 merged commit ac70bbc into obs-websocket-community-projects:master Jun 12, 2021
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.

2 participants