File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 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';
55import domToReact from './lib/dom-to-react' ;
66import htmlToDOM from 'html-dom-parser' ;
77
8- export { DomElement } ;
9-
10- type ReactElement = React . DetailedReactHTMLElement < { } , HTMLElement > ;
11-
128export interface HTMLReactParserOptions {
139 // TODO: Replace `object` by type for objects like `{ type: 'h1', props: { children: 'Heading' } }`
1410 replace ( domNode : DomElement ) : React . ReactElement | object | undefined | false ;
@@ -24,7 +20,11 @@ export interface HTMLReactParserOptions {
2420declare function HTMLReactParser (
2521 html : string ,
2622 options ?: HTMLReactParserOptions
27- ) : ReactElement | ReactElement [ ] | string ;
23+ ) :
24+ | string
25+ | React . DetailedReactHTMLElement < { } , HTMLElement >
26+ | Array < React . DetailedReactHTMLElement < { } , HTMLElement > > ;
27+
28+ export { DomElement , domToReact , htmlToDOM } ;
2829
29- export { domToReact , htmlToDOM } ;
3030export default HTMLReactParser ;
You can’t perform that action at this time.
0 commit comments