Skip to content

Commit 801512b

Browse files
fix(index): make replace property optional in index.d.ts
And update the return types See #134
1 parent 98baf39 commit 801512b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import htmlToDOM from 'html-dom-parser';
77

88
export interface HTMLReactParserOptions {
99
// TODO: Replace `object` by type for objects like `{ type: 'h1', props: { children: 'Heading' } }`
10-
replace(domNode: DomElement): React.ReactElement | object | undefined | false;
10+
replace?: (
11+
domNode: DomElement
12+
) => React.ReactElement | object | void | undefined | null | false;
1113
library?: object;
1214
}
1315

0 commit comments

Comments
 (0)