@@ -22,31 +22,31 @@ export interface ProvisionalFeRouteItem {
22
22
component ?: string
23
23
}
24
24
25
- export interface Params < T , U > {
25
+ export interface Params < T , U extends { [ K in keyof U ] ?: string | undefined } > {
26
26
ctx ?: ISSRContext < T >
27
27
routerProps ?: RouteComponentProps < U >
28
28
state ?: any
29
29
}
30
- export interface ParamsMidway < T , U > {
30
+ export interface ParamsMidway < T , U extends { [ K in keyof U ] ?: string | undefined } > {
31
31
ctx ?: ISSRMidwayContext < T >
32
32
routerProps ?: RouteComponentProps < U >
33
33
state ?: any
34
34
}
35
- export interface ParamsMidwayKoa < T , U > {
35
+ export interface ParamsMidwayKoa < T , U extends { [ K in keyof U ] ?: string | undefined } > {
36
36
ctx ?: ISSRMidwayKoaContext < T >
37
37
routerProps ?: RouteComponentProps < U >
38
38
state ?: any
39
39
}
40
- export interface ParamsNest < T , U > {
40
+ export interface ParamsNest < T , U extends { [ K in keyof U ] ?: string | undefined } > {
41
41
ctx ?: ISSRNestContext < T >
42
42
routerProps ?: RouteComponentProps < U >
43
43
state ?: any
44
44
}
45
45
46
- export type ReactFetch < T = { } , U = { } > = ( params : Params < T , U > ) => Promise < any >
47
- export type ReactMidwayFetch < T = { } , U = { } > = ( params : ParamsMidway < T , U > ) => Promise < any >
48
- export type ReactMidwayKoaFetch < T = { } , U = { } > = ( params : ParamsMidwayKoa < T , U > ) => Promise < any >
49
- export type ReactNestFetch < T = { } , U = { } > = ( params : ParamsNest < T , U > ) => Promise < any >
46
+ export type ReactFetch < T = { } , U extends { [ K in keyof U ] ?: string | undefined } = { } > = ( params : Params < T , U > ) => Promise < any >
47
+ export type ReactMidwayFetch < T = { } , U extends { [ K in keyof U ] ?: string | undefined } = { } > = ( params : ParamsMidway < T , U > ) => Promise < any >
48
+ export type ReactMidwayKoaFetch < T = { } , U extends { [ K in keyof U ] ?: string | undefined } = { } > = ( params : ParamsMidwayKoa < T , U > ) => Promise < any >
49
+ export type ReactNestFetch < T = { } , U extends { [ K in keyof U ] ?: string | undefined } = { } > = ( params : ParamsNest < T , U > ) => Promise < any >
50
50
51
51
export type ReactESMFetch = ( ) => Promise < {
52
52
default : ReactFetch
0 commit comments