@@ -19,17 +19,23 @@ export type ValidateLinkOptions<
1919 TOptions = unknown ,
2020 TDefaultFrom extends string = string ,
2121 TComp = 'a' ,
22- > = Constrain <
23- TOptions ,
24- LinkComponentProps <
25- TComp ,
26- TRouter ,
27- InferFrom < TOptions , TDefaultFrom > ,
28- InferTo < TOptions > ,
29- InferMaskFrom < TOptions > ,
30- InferMaskTo < TOptions >
31- >
22+ > = TOptions extends LinkComponentProps <
23+ TComp ,
24+ TRouter ,
25+ InferFrom < TOptions , TDefaultFrom > ,
26+ InferTo < TOptions > ,
27+ InferMaskFrom < TOptions > ,
28+ InferMaskTo < TOptions >
3229>
30+ ? TOptions
31+ : LinkComponentProps <
32+ TComp ,
33+ TRouter ,
34+ InferFrom < TOptions , TDefaultFrom > ,
35+ InferTo < TOptions > ,
36+ InferMaskFrom < TOptions > ,
37+ InferMaskTo < TOptions >
38+ >
3339
3440export type ValidateLinkOptionsArray <
3541 TRouter extends AnyRouter = RegisteredRouter ,
@@ -48,27 +54,37 @@ export type ValidateLinkOptionsArray<
4854export type ValidateUseSearchOptions <
4955 TOptions ,
5056 TRouter extends AnyRouter = RegisteredRouter ,
51- > = Constrain <
52- TOptions ,
53- UseSearchOptions <
54- TRouter ,
55- InferFrom < TOptions > ,
56- InferStrict < TOptions > ,
57- InferShouldThrow < TOptions > ,
58- InferSelected < TOptions >
59- >
57+ > = TOptions extends UseSearchOptions <
58+ TRouter ,
59+ InferFrom < TOptions > ,
60+ InferStrict < TOptions > ,
61+ InferShouldThrow < TOptions > ,
62+ InferSelected < TOptions >
6063>
64+ ? TOptions
65+ : UseSearchOptions <
66+ TRouter ,
67+ InferFrom < TOptions > ,
68+ InferStrict < TOptions > ,
69+ InferShouldThrow < TOptions > ,
70+ InferSelected < TOptions >
71+ >
6172
6273export type ValidateUseParamsOptions <
6374 TOptions ,
6475 TRouter extends AnyRouter = RegisteredRouter ,
65- > = Constrain <
66- TOptions ,
67- UseParamsOptions <
68- TRouter ,
69- InferFrom < TOptions > ,
70- InferStrict < TOptions > ,
71- InferShouldThrow < TOptions > ,
72- InferSelected < TOptions >
73- >
76+ > = TOptions extends UseParamsOptions <
77+ TRouter ,
78+ InferFrom < TOptions > ,
79+ InferStrict < TOptions > ,
80+ InferShouldThrow < TOptions > ,
81+ InferSelected < TOptions >
7482>
83+ ? TOptions
84+ : UseParamsOptions <
85+ TRouter ,
86+ InferFrom < TOptions > ,
87+ InferStrict < TOptions > ,
88+ InferShouldThrow < TOptions > ,
89+ InferSelected < TOptions >
90+ >
0 commit comments