refactor(xml-helpers): document & check function signature types (#160)
authorRaphael von der Grün <raphinesse@gmail.com>
Mon, 18 Oct 2021 21:12:32 +0000 (23:12 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Oct 2021 21:12:32 +0000 (23:12 +0200)
commit185b3267bd475e3fad6b31d20e0f08922170ce8c
tree9a66ce40ba17dd696f36198e2ca72589721acf1f
parent642d38121920b42691860aca867ffb52464724fa
refactor(xml-helpers): document & check function signature types  (#160)

* refactor(xml-helpers): use ES6 method syntax

* refactor(xml-helpers): document & check function signature types

see: https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html

* refactor(xml-helpers): satisfy TS type checks

- `et.ElementText` is not always a string but always has `#toString`
- `et.ElementTag` is not always a string, but converting it to one
should be sufficient for our purposes
- `et.Element` is not a constructor, so it should be called w/out new
src/util/xml-helpers.js