You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the frontend uses a reactive system to alert different parts of the frontend about editor changes. In order to do this, all responses are described by interfaces and have a corresponding new function.
The advantage of this change is that the callback given to subscribeJsMessage automatically has the correct type for the input parameter and does not need to be cast. Removing this cuts down on boilerplate code where mistakes can be made.
The other advantage of a class-based system is we can remove the new function to create a given type. Instead, we can make use of a library class-transformer in order to automate this process, further cutting down on code duplication.
Finally while implementing the class solution, naming should be refactored to better align with the backend message system
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Currently, the frontend uses a reactive system to alert different parts of the frontend about editor changes. In order to do this, all responses are described by interfaces and have a corresponding new function.
Switching to a class-based system would have various benefits
to
The advantage of this change is that the callback given to subscribeJsMessage automatically has the correct type for the input parameter and does not need to be cast. Removing this cuts down on boilerplate code where mistakes can be made.
The other advantage of a class-based system is we can remove the new function to create a given type. Instead, we can make use of a library class-transformer in order to automate this process, further cutting down on code duplication.
Finally while implementing the class solution, naming should be refactored to better align with the backend message system
The text was updated successfully, but these errors were encountered: