-
-
Notifications
You must be signed in to change notification settings - Fork 134
feat(index): export domhandler
node types and update README.md
#201
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
size-limit report 📦
|
Published v1.1.0: npm: npm i [email protected] Yarn: yarn add [email protected] |
Thanks! |
@bicstone even though I exported the import { Element } from 'domhandler/lib/node';
import { HTMLReactParserOptions } from 'html-react-parser';
const options: HTMLReactParserOptions = {
replace: (domNode) => {
if (domNode instanceof Element && domNode.attribs) {
// ...
}
},
}; |
Hi @remarkablemark, wouldn't it be possible to fix that as well? Because now, people need to import from a transcend dependency of this package (rather than only importing directly from this package. Which can lead to issues like |
@natterstefan I can see your point about Currently, this approach is only necessary for TypeScript projects. I wonder if there's a better alternative that can achieve the best of both worlds. |
Hi @remarkablemark, what if you only import the types of |
What is the motivation for this pull request?
feat(index): export
domhandler
node types and updateREADME.md
What is the current behavior?
domhandler
node types are not exported. Thus, users have to import directly fromdomhandler
(see #199):What is the new behavior?
domhandler
node types are exported:Checklist: