Skip to content

Commit

Permalink
allow iterable with objects as children (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshokanov committed Jul 13, 2022
1 parent 457a454 commit 3cf7230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ts4.1/index.d.ts
Expand Up @@ -102,9 +102,12 @@ declare module 'i18next' {
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true
? Record<string, unknown>
: never;

type ReactI18NextChild = React.ReactNode | ObjectOrNever;

declare module 'react' {
interface HTMLAttributes<T> {
children?: ReactNode | ObjectOrNever;
children?: ReactI18NextChild | Iterable<ReactI18NextChild>;
}
}

Expand Down

0 comments on commit 3cf7230

Please sign in to comment.