Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use generics for typing
nodeListForEach
This allows to forward the type of the `NodeListOf` it iterates on to the parameters of the callback. In turn this should allow to drop quite a few `instanceof` checks when using the function by properly typing the `NodeList` we give it. Interesting links: - [The `@template` JSDoc tag](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#template) - [How to constrain the generic type](https://stackoverflow.com/a/54631901)
- Loading branch information