functions
functions copied to clipboard
fix: ws._api needs to be initialized but there's no method to do it
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 itfrom 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] Internal to this repo (e.g.
readme.md, help docs, inline docs & comments, etc.) - [ ] Architect docs (arc.codes)
- [x] Internal to this repo (e.g.
- [x] Summarized your changes in
changelog.md - [ ] Linked to any related issues, PRs, etc. below that may relate to, consume, or necessitate these changes