html-react-parser 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/html-react-parser.js +1 -1
- package/dist/html-react-parser.js.map +1 -1
- package/dist/html-react-parser.min.js +1 -1
- package/dist/html-react-parser.min.js.map +1 -1
- package/lib/dom-to-react.js +1 -1
- package/lib/dom-to-react.js.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/dom-to-react.ts +1 -1
- package/src/types.ts +3 -1
package/README.md
CHANGED
|
@@ -437,6 +437,20 @@ Migrated to TypeScript. CommonJS imports require the `.default` key:
|
|
|
437
437
|
const parse = require('html-react-parser').default;
|
|
438
438
|
```
|
|
439
439
|
|
|
440
|
+
If you're getting the error:
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
Argument of type 'ChildNode[]' is not assignable to parameter of type 'DOMNode[]'.
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Then use type assertion:
|
|
447
|
+
|
|
448
|
+
```ts
|
|
449
|
+
domToReact(domNode.children as DOMNode[], options);
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
See [#1126](https://github.com/remarkablemark/html-react-parser/issues/1126#issuecomment-1784188447).
|
|
453
|
+
|
|
440
454
|
### v4
|
|
441
455
|
|
|
442
456
|
[htmlparser2](https://github.com/fb55/htmlparser2) has been upgraded to [v9](https://github.com/fb55/htmlparser2/releases/tag/v9.0.0).
|