File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,24 @@ import React from 'react';
88
99import { Action , Location } from './types' ;
1010
11- interface RouteObject {
12- caseSensitive ?: boolean ;
13- children ?: RouteObject [ ] ;
14- element ?: React . ReactNode ;
15- index ?: boolean ;
16- path ?: string ;
11+ interface NonIndexRouteObject {
12+ caseSensitive ?: boolean ;
13+ children ?: RouteObject [ ] ;
14+ element ?: React . ReactNode | null ;
15+ index ?: false ;
16+ path ?: string ;
1717}
1818
19+ interface IndexRouteObject {
20+ caseSensitive ?: boolean ;
21+ children ?: undefined ;
22+ element ?: React . ReactNode | null ;
23+ index ?: true ;
24+ path ?: string ;
25+ }
26+
27+ type RouteObject = IndexRouteObject | NonIndexRouteObject ;
28+
1929type Params < Key extends string = string > = {
2030 readonly [ key in Key ] : string | undefined ;
2131} ;
You can’t perform that action at this time.
0 commit comments