-
-
Notifications
You must be signed in to change notification settings - Fork 33
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 and refactoring #26
Conversation
…gement in the core
… it is expected that all state will be reset and probably glitch in the ui
@Julusian where are you at with this ... besides the obvious from the checklist above? I'll give this a merge on your go. |
@Julusian Just poking around and testing with your update and noticed that the available USK's show up as 1-16 on each me instead of ME1 1-4, etc... for actions and same with presets at least with the constellation. I am not getting errors. I know you still have things to work on. Just thought I would let you know. Thanks for all the hard work. { |
@krocheck I am happy that this is working and done now. If you are happy I can merge it and raise a pr to get the module updated in core. |
This is a refactor of the module to be written in typescript. This brings some better type safety within the module and should make it easier to make small changes with certainty of not breaking anything, and ensure nothing is missed.
As an example, one advantage here is that the feedback and actions systems use enums now. If someone tries to use a feedback id that is not in that enum the compiler will complain. This is also true if it is not included in the handlers, as there is a check to ensure all values are handled in the switch cases.
It is a bit of a hack as companion core doesnt have typescript definitions, so it doesnt play nicely, but I shall try and get them to support typescript in modules to make this cleaner and easier.
As part of this, I have gone through and tested every action, feedback and preset against my 2ME running 8.0.1, and everything is working nicely. Additionally, I tested most of it against a constellation running in both HD and 8K modes.
Other improvements:
Left to do: