File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11// TypeScript Version: 3.3
22
3- import { DomElement } from 'htmlparser2' ;
3+ import { DomElement , ParserOptions } from 'htmlparser2' ;
44import domToReact from './lib/dom-to-react' ;
55import htmlToDOM from 'html-dom-parser' ;
66
77export interface HTMLReactParserOptions {
8- replace ?: (
9- domNode : DomElement
10- ) => JSX . Element | object | void | undefined | null | false ;
8+ htmlparser2 ?: ParserOptions ;
9+
1110 library ?: {
1211 cloneElement : (
1312 element : JSX . Element ,
@@ -18,6 +17,10 @@ export interface HTMLReactParserOptions {
1817 isValidElement : ( element : any ) => boolean ;
1918 [ key : string ] : any ;
2019 } ;
20+
21+ replace ?: (
22+ domNode : DomElement
23+ ) => JSX . Element | object | void | undefined | null | false ;
2124}
2225
2326/**
@@ -32,6 +35,6 @@ declare function HTMLReactParser(
3235 options ?: HTMLReactParserOptions
3336) : ReturnType < typeof domToReact > ;
3437
35- export { DomElement , domToReact , htmlToDOM } ;
38+ export { DomElement , ParserOptions , domToReact , htmlToDOM } ;
3639
3740export default HTMLReactParser ;
You can’t perform that action at this time.
0 commit comments