mobx-utils icon indicating copy to clipboard operation
mobx-utils copied to clipboard

docs(create-view-model): Add documentation for IViewModel

Open diffy0712 opened this issue 11 months ago • 0 comments

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.

diffy0712 avatar Mar 15 '24 11:03 diffy0712