Skip to content

Commit

Permalink
fix(index): make replace property optional in index.d.ts
Browse files Browse the repository at this point in the history
And update the return types

See #134
  • Loading branch information
remarkablemark committed Feb 8, 2020
1 parent 98baf39 commit 801512b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import htmlToDOM from 'html-dom-parser';

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

Expand Down

0 comments on commit 801512b

Please sign in to comment.