File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
// TypeScript Version: 3.3
2
2
3
- import { DomElement } from 'htmlparser2' ;
3
+ import { DomElement , ParserOptions } from 'htmlparser2' ;
4
4
import domToReact from './lib/dom-to-react' ;
5
5
import htmlToDOM from 'html-dom-parser' ;
6
6
7
7
export interface HTMLReactParserOptions {
8
- replace ?: (
9
- domNode : DomElement
10
- ) => JSX . Element | object | void | undefined | null | false ;
8
+ htmlparser2 ?: ParserOptions ;
9
+
11
10
library ?: {
12
11
cloneElement : (
13
12
element : JSX . Element ,
@@ -18,6 +17,10 @@ export interface HTMLReactParserOptions {
18
17
isValidElement : ( element : any ) => boolean ;
19
18
[ key : string ] : any ;
20
19
} ;
20
+
21
+ replace ?: (
22
+ domNode : DomElement
23
+ ) => JSX . Element | object | void | undefined | null | false ;
21
24
}
22
25
23
26
/**
@@ -32,6 +35,6 @@ declare function HTMLReactParser(
32
35
options ?: HTMLReactParserOptions
33
36
) : ReturnType < typeof domToReact > ;
34
37
35
- export { DomElement , domToReact , htmlToDOM } ;
38
+ export { DomElement , ParserOptions , domToReact , htmlToDOM } ;
36
39
37
40
export default HTMLReactParser ;
You can’t perform that action at this time.
0 commit comments