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 #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?
Related Issue (if applicable):
N/A
Description:
This PR changes/fixes a few things in relation to the type build script:
ScenesCollection
typedef wasn't defined yet.error
event type with (mostly) correct types. This makes #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.Output
typedef not being used correctly.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 examplestring[]
).ExecuteBatch
request; you could probably have really good types depending on what is supplied/received for therequest-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?