You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! First of all, wanted to say that I love this package 💯. It’s so useful having a simple API for finding tags in a string of HTML!
I’m trying to use this in a TypeScript Node project, but there aren’t types. I’d love to add them to this package if you’d be open to it.
But then I also noticed that your module export isn’t working: ReferenceError: module is not defined. There’s a module.exports= line in the ESM code, likely generated from microbundle.
So in that light, would you be open to a PR that converts this project to TypeScript? It’d have the following advantages:
It’d offer automatic TS types for people
It’d fix the ESM export because TS does a better job
It would still generate the same CommonJS bundle for Node
We’d keep everything the same, from file structure to core logic to output generation (it wouldn’t impact perf at all). We’d only be adding a couple TS annotations in the code that are simply removed at compile time, so the source and output are the same as before (other than fixing the module export as mentioned).
Let me know if you’re open to this! Would be happy to do the work; just wanted to discuss first.
The text was updated successfully, but these errors were encountered:
Hello! First of all, wanted to say that I love this package 💯. It’s so useful having a simple API for finding tags in a string of HTML!
I’m trying to use this in a TypeScript Node project, but there aren’t types. I’d love to add them to this package if you’d be open to it.
But then I also noticed that your
module
export isn’t working:ReferenceError: module is not defined
. There’s amodule.exports=
line in the ESM code, likely generated from microbundle.So in that light, would you be open to a PR that converts this project to TypeScript? It’d have the following advantages:
module
export as mentioned).Let me know if you’re open to this! Would be happy to do the work; just wanted to discuss first.
The text was updated successfully, but these errors were encountered: