|
@@ -1,8 +1,13 @@
|
|
-import type {ComponentClass, ComponentType, FunctionComponent} from 'react';
|
|
|
|
|
|
+import type {ComponentClass, ComponentType, FunctionComponent, ReactNode} from 'react';
|
|
import type {InjectedRouter, PlainRoute, WithRouterProps} from 'react-router';
|
|
import type {InjectedRouter, PlainRoute, WithRouterProps} from 'react-router';
|
|
import type {Location} from 'history';
|
|
import type {Location} from 'history';
|
|
|
|
|
|
declare module 'react-router' {
|
|
declare module 'react-router' {
|
|
|
|
+ // React 18 removed children from ComponentType, this adds them back
|
|
|
|
+ interface RouterProps {
|
|
|
|
+ children?: ReactNode;
|
|
|
|
+ }
|
|
|
|
+
|
|
interface InjectedRouter<P = Record<string, string>, Q = any> {
|
|
interface InjectedRouter<P = Record<string, string>, Q = any> {
|
|
location: Location<Q>;
|
|
location: Location<Q>;
|
|
params: P;
|
|
params: P;
|