-
Notifications
You must be signed in to change notification settings - Fork 13
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
TypeScript typings problem #18
Comments
I envisioned that the project will eventually be linted against https://github.com/featherbear/presonus-studiolive-api/blob/master/package.json#L40-L56 https://github.com/featherbear/presonus-studiolive-api/blob/master/src/lib/types/ZlibPayload.ts This file is auto generated, and can definitely be cleaned up / properly built Anyhow, feel free to refactor things where you see fit. I agree with the parsing routine being renamed to disassociate itself with the zlib payload |
Perhaps the zlib-decoded payload (both ZB and CK) should be re-emitted as the JSON packet? |
I’ll try to fugure out what will be the best way to “reemit”, but this seems to be the best way so all listeners can catch it. |
I am back, but my box is in service, once it will be back I am gonna start to help you. |
Regarding typings, we should also seek to identify the "device options", "project options", and "scene options" - and then build type unions that fit the target. I have plans to build an offline editor (likely just simple settings) that can open the exported project and scene files - https://github.com/featherbear/SL-Edit (stale). It would be cool to then be able to remotely sync the console |
Here are some exported files for reference ( and the previously seen https://github.com/featherbear/presonus-studiolive-api/blob/documentation/dumps/zlib.parsed |
Latest version of the TypeScript don't compile and types has to added / changed manually (especially ZB parsing is problematic).
The project should use more strict typing whenever possible (default any should be forbidden, indexing should be limited to known values and so on).
Also I checked the code and it would be great to use some strict linting settings (there are missing semicolons almost everywhere - I know its not mandatory, but...).
I would also refactor those ultra long promises and split them to separate async functions, its hard to read them.
There are also other things I would change, such as the parser is not related to ZB/ZLib so I would move it and rename it to JBSON and so on.
Would you mind if I try to refactor and cleanup the code and make the typings strict to be able to work with latest TypeScript?
The text was updated successfully, but these errors were encountered: