mobx-utils
mobx-utils copied to clipboard
docs(create-view-model): Add documentation for IViewModel
Intent
Currently for ViewModel the documentation is only on the createViewModel
function, which describes the functionality and the IViewModel interface nicely, but when working with the IViewModel you usually interact with the interface and not the factory function, so we loose the written documentation on that.
For example: if we need to check the documentation for .submit
we would get no comments in the type hints
tooltip of the IDE. Also when jumping to the definition of the IViewModel.submit
we would see no comments for it.
Changes
- Added documentation for the IViewModel interface based on the documentation for `createViewModel' function, also adding the mobx decorator used in those cases to see from the docs, if that is an observable, bound action or not etc...
- Reordered the properties and methods so they are in the same order as in the documentation.