Add TypeScript definitions for domToReact#100
Add TypeScript definitions for domToReact#100remarkablemark merged 8 commits intoremarkablemark:masterfrom
Conversation
remarkablemark
left a comment
There was a problem hiding this comment.
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. html-dom-parser@0.2.1 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.domToReactandhtmlToDom. (Fixes ExportdomToReactin public API #84)Checklist: