Skip to content

Commit

Permalink
Use Iterable<ReactNode> instead of Array.
Browse files Browse the repository at this point in the history
  • Loading branch information
molefrog committed Nov 5, 2022
1 parent 90e4b16 commit 04451bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/ts3.9.4/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export * from "../use-location";
// React <18 only: fixes incorrect `ReactNode` declaration that had `{}` in the union.
// This issue has been fixed in React 18 type declaration.
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210
type ReactNode = ReactChild | ReactNode[] | ReactPortal | boolean | null | undefined;
type ReactNode = ReactChild | Iterable<ReactNode> | ReactPortal | boolean | null | undefined;

/*
* Components: <Route />
Expand Down
2 changes: 1 addition & 1 deletion types/ts4.1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export * from "../use-location";
// React <18 only: fixes incorrect `ReactNode` declaration that had `{}` in the union.
// This issue has been fixed in React 18 type declaration.
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210
type ReactNode = ReactChild | ReactNode[] | ReactPortal | boolean | null | undefined;
type ReactNode = ReactChild | Iterable<ReactNode> | ReactPortal | boolean | null | undefined;

export type ExtractRouteOptionalParam<PathType extends Path> = PathType extends `${infer Param}?`
? { readonly [k in Param]: string | undefined }
Expand Down

0 comments on commit 04451bf

Please sign in to comment.