Skip to content

Commit

Permalink
fix(esm): fix exported types
Browse files Browse the repository at this point in the history
Fixes #1305
  • Loading branch information
remarkablemark committed Feb 12, 2024
1 parent 8a1abba commit 7a94d61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions esm/index.d.mts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export * from '../lib/index';
export { default } from '../lib/index';
import HTMLReactParser from '../lib/index.js';

export * from '../lib/index.js';

// @ts-expect-error Property 'default' exists on type
export default HTMLReactParser.default || HTMLReactParser;
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import type { HTMLReactParserOptions } from './types';
export { Comment, Element, ProcessingInstruction, Text } from 'domhandler';
export type { DOMNode } from 'html-dom-parser';

export { HTMLReactParserOptions, attributesToProps, domToReact, htmlToDOM };
export type { HTMLReactParserOptions };
export { attributesToProps, domToReact, htmlToDOM };

const domParserOptions = { lowerCaseAttributeNames: false } as const;

Expand Down

0 comments on commit 7a94d61

Please sign in to comment.