File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ import { DomElement } from 'domhandler';
5
5
import domToReact from './lib/dom-to-react' ;
6
6
import htmlToDOM from 'html-dom-parser' ;
7
7
8
- export { DomElement } ;
9
-
10
- type ReactElement = React . DetailedReactHTMLElement < { } , HTMLElement > ;
11
-
12
8
export interface HTMLReactParserOptions {
13
9
// TODO: Replace `object` by type for objects like `{ type: 'h1', props: { children: 'Heading' } }`
14
10
replace ( domNode : DomElement ) : React . ReactElement | object | undefined | false ;
@@ -24,7 +20,11 @@ export interface HTMLReactParserOptions {
24
20
declare function HTMLReactParser (
25
21
html : string ,
26
22
options ?: HTMLReactParserOptions
27
- ) : ReactElement | ReactElement [ ] | string ;
23
+ ) :
24
+ | string
25
+ | React . DetailedReactHTMLElement < { } , HTMLElement >
26
+ | Array < React . DetailedReactHTMLElement < { } , HTMLElement > > ;
27
+
28
+ export { DomElement , domToReact , htmlToDOM } ;
28
29
29
- export { domToReact , htmlToDOM } ;
30
30
export default HTMLReactParser ;
You can’t perform that action at this time.
0 commit comments