-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Javascript Types w/JSDoc #3577
base: main
Are you sure you want to change the base?
Conversation
global.js
will be adding more over next week if I have time |
It would be very handy to have these in all JS files, not just Global. |
That's the plan |
Learning so much about JSDoc, and how much I dislike certain approaches to JS things in this codebase |
Unfortunate with how many conditional class definitions there are, references to the types are unresolved when definitions are nested in a conditional. Might be a good way to prevent defining classes multiple times on a page without wrapping the whole thing in a conditional 🤔 |
Ready for review, but not ready for merge. |
Should be spelled as `setQuantityBoundaries`
PR Summary:
Add JSDoc documentation to javascript functions and classes where applicable.
Why are these changes introduced?
JSDoc is the nest best thing to native JS types. Typing our functions means better understanding of the parameters required and what gets returned without needing to crawl the codebase.
What approach did you take?
Classes, and functions with parameters and returns get JSDoc comments.
Other considerations
Decision log
Visual impact on existing themes
No visual impact.
Testing steps/scenarios
Demo links
Checklist