-
-
Notifications
You must be signed in to change notification settings - Fork 134
TypeScript: export types of 'domhandler/lib/node' #252
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@natterstefan the library is already exporting types in index.d.ts. What type are you suggesting that needs to be exported? |
Hi @remarkablemark, I think I see my confusion now. When I first had the issue in Next.js and with TypeScript, I saw this comment. The comment connotes that you have to It would probably help to tell people in the README, that for type checking only you do not need to install It will not help though when people want to check the instance of the element. Then we are back at the problem that one needs to install another library to do that. 🤔 |
Since v1.2.6, Do we want any additional code or |
Hi @remarkablemark,
To be honest I am not sure. My problem was solved by installing the
This is the actual problem that is left, when we put the types aside (v1.2.6 handles that already). Wouldn't it be possible to export the runtime Tree shaking should take care of keeping the bundle size small if not used, doesn't it? |
That's fair, I'm open to exporting |
Hi @remarkablemark, I finally had time to contribute and I've created a PR for you to review here #296. |
Thanks for the contribution @natterstefan! Your changes will be released in 1.4.0 |
Thank you very much and you're welcome, @remarkablemark! |
Hi @remarkablemark,
I think it's best to create an issue for our discussion (starting here) in the merged PR than to discuss further there.
As suggested the solution could be to export the types alongside
html-react-parser
's types instead of having people installing the package only to use the types.What do you think?
The text was updated successfully, but these errors were encountered: