morphdom
morphdom copied to clipboard
Typesafety utils.js
This PR attempts to add some additional comments in JSDoc to improve typesafety as well as attempt to draw attention to certain areas where previously unexpected bugs could occur.
We added a custom error that will point out when we are attempting to use the utils.js functions in a headless JavaScript experience. This should not happen for the user.
In order to test to ensure that no errors have been introduced I ran the npm test command and I saw no regressions. There was no direct way to test utils.js directly due to the way the test suite is set up.