Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyAlford committed Jul 1, 2024
1 parent d0eede5 commit a539351
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/cjs/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/JsxParser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export default class JsxParser extends React.Component<TProps> {
static displayName: string;
static defaultProps: TProps;
private ParsedChildren;
render: () => JSX.Element;
render: () => React.ReactNode;
}
2 changes: 1 addition & 1 deletion dist/es5/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions source/components/JsxParser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { randomHash } from '../helpers/hash'
import { parseStyle } from '../helpers/parseStyle'
import { resolvePath } from '../helpers/resolvePath'

type ParsedJSX = JSX.Element | boolean | string
type ParsedJSX = React.ReactNode | boolean | string
type ParsedTree = ParsedJSX | ParsedJSX[] | null
export type TProps = {
allowUnknownElements?: boolean,
Expand Down Expand Up @@ -332,7 +332,7 @@ export default class JsxParser extends React.Component<TProps> {
return React.createElement(component || lowerName, props, children)
}

render = (): JSX.Element => {
render = (): React.ReactNode => {
const jsx = (this.props.jsx || '').trim().replace(/<!DOCTYPE([^>]*)>/g, '')
this.ParsedChildren = this.#parseJSX(jsx)
const className = [...new Set(['jsx-parser', ...String(this.props.className).split(' ')])]
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"node_modules/@types"
],
"types": [
"node",
"jest"
"node"
]
},
"include": [
Expand Down

0 comments on commit a539351

Please sign in to comment.