-
-
Notifications
You must be signed in to change notification settings - Fork 134
Add TypeScript definitions for domToReact #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency html-dom-parser
can now be updated to 0.2.0
so lint can pass
Hi @remarkablemark. I have been doing some testing with this today. It seems that the The possible solutions:
What are your thoughts on these options? Personally I think option 1 is better, as it doesn't change the current API, and allows for other files to be exposed in TS even if they aren't necessarily part of the public facing API. An example of what option 1 would look like: remarkablemark/html-dom-parser#12. |
@AndrewLeedham Thanks for looking into this and coming up with both approaches. I'm fine with either approach and I agree that the first is cleaner. But I also do think that it may be useful to expose Given that, would you still like me to go ahead with merging remarkablemark/html-dom-parser#12? |
@remarkablemark No problem. Perhaps we should go with a combination of the two then. Have inline Either way I think the |
Sounds good @AndrewLeedham. [email protected] has been published |
Thanks @AndrewLeedham for your effort and for making this possible 0.7.0 has been published |
Add TypeScript definitions for domToReact
What is the motivation for this pull request?
The docs use
html-react-parser/lib/domToReact
, but TypeScript definitions only exist for the core api (html-react-parser
). I would say this is a feature.Features
html-react-parser/lib/domToReact
.domToReact
andhtmlToDom
. (Fixes ExportdomToReact
in public API #84)Checklist: