Given the lack of an example of this argument in the README, I assumed I could just pass in a string containing XML, but I was wrong! The function exploded with a confusing exception. Once I found out that it needed to be an XML DOM, I looked at this project's dependencies and noticed it used xmldom, so I installed that and used it.
It seems like rather than any, this should really be a union of Document and the funky JSON type it accepts, maybe? Or maybe it should throw an error if a string is passed in, to be a bit more helpful?
Anyways, just some thoughts, thanks again for the library!
Hello! Thanks for this great module. I noticed that the typing of the
osmtogeojson
function is:Given the lack of an example of this argument in the README, I assumed I could just pass in a string containing XML, but I was wrong! The function exploded with a confusing exception. Once I found out that it needed to be an XML DOM, I looked at this project's dependencies and noticed it used
xmldom
, so I installed that and used it.It seems like rather than
any
, this should really be a union ofDocument
and the funky JSON type it accepts, maybe? Or maybe it should throw an error if a string is passed in, to be a bit more helpful?Anyways, just some thoughts, thanks again for the library!