functions icon indicating copy to clipboard operation
functions copied to clipboard

fix: ws._api needs to be initialized but there's no method to do it

Open reconbot opened this issue 3 years ago • 0 comments

ws._api starts undefined and the only way to instantiate api is to make an api call. This replaces the export with a getter that calls instantiateAPI() so it's always there when you ask for it and now there doesn't need to be a method to instantiate it.

An alternative would be to make a method that returns the api (and maybe eventually remove ws._api).

I notice the docs are wrong (the types are right) and will fix that however this one lands.

Thank you for helping out! ✨

We really appreciate your commitment to improving Architect

To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following:

  • [x] Forked the repo and created your branch from main
  • [x] Made sure tests pass (run npm it from the repo root)
  • [ ] Expanded test coverage related to your changes:
    • [ ] Added and/or updated unit tests (if appropriate)
    • [ ] Added and/or updated integration tests (if appropriate)
  • [x] Updated relevant documentation:
  • [x] Summarized your changes in changelog.md
  • [ ] Linked to any related issues, PRs, etc. below that may relate to, consume, or necessitate these changes

reconbot avatar Jul 23 '22 22:07 reconbot