Skip to content

fix(index): include domhandler Node in DOMNode type#208

Merged
remarkablemark merged 1 commit intomasterfrom
fix/types
Jan 12, 2021
Merged

fix(index): include domhandler Node in DOMNode type#208
remarkablemark merged 1 commit intomasterfrom
fix/types

Conversation

@remarkablemark
Copy link
Copy Markdown
Owner

Fixes #207

What is the motivation for this pull request?

fix(index): include domhandler Node in DOMNode type

What is the current behavior?

import {
  Comment,
  DomHandlerOptions,
  Element,
  ProcessingInstruction,
  Text
} from 'domhandler';

export { Comment, Element, ProcessingInstruction, Text };

export type DOMNode = Comment | Element | ProcessingInstruction | Text;

What is the new behavior?

import {
  Comment,
  DomHandlerOptions,
  Element,
  Node,
  ProcessingInstruction,
  Text
} from 'domhandler';

export { Comment, Element, Node, ProcessingInstruction, Text };

export type DOMNode = Comment | Element | Node | ProcessingInstruction | Text;

Checklist:

  • Tests
  • Types

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/html-react-parser.min.js 7.23 KB (0%) 145 ms (0%) 90 ms (+4.38% 🔺) 234 ms

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling ac4aff3 on fix/types into a4f945b on master.

Copy link
Copy Markdown

@allanmc allanmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm👍🙂

@remarkablemark remarkablemark merged commit bc4f6cb into master Jan 12, 2021
@remarkablemark remarkablemark deleted the fix/types branch January 12, 2021 06:15
@remarkablemark
Copy link
Copy Markdown
Owner Author

Published v1.1.2:

npm:

npm i html-react-parser@1.1.2

Yarn:

yarn add html-react-parser@1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS error: domToReact(node.children) not working in v1.0.0+

3 participants