File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ import { zodParser } from '../util'
99export const useQuery = <
1010 TSchema extends z . ZodTypeAny ,
1111 TQuery extends z . output < TSchema > ,
12+ TDefaultQuery extends Partial < TQuery > ,
1213> (
1314 schemaQuery : TSchema ,
14- defaultQuery : Partial < TQuery > = { } ,
15+ defaultQuery ?: TDefaultQuery ,
1516 options ?: Partial < AbstractQueryOptions > ,
1617) =>
1718 useQueryVanilla (
@@ -23,9 +24,10 @@ export const useQuery = <
2324export const useQueryAndPagination = <
2425 TSchema extends z . ZodTypeAny ,
2526 TQuery extends z . output < TSchema > ,
27+ TDefaultQuery extends Partial < TQuery > ,
2628> (
2729 schemaQuery : TSchema ,
28- defaultQuery : Partial < TQuery > = { } ,
30+ defaultQuery ?: TDefaultQuery ,
2931 defaultPagination ?: Partial < PaginationQuery > ,
3032 options ?: Partial < AbstractQueryOptions > ,
3133) =>
Original file line number Diff line number Diff line change @@ -10,9 +10,10 @@ import { RouterWithHistoryOptions } from '../../routers/shared'
1010export const useQuery = <
1111 TSchema extends z . ZodTypeAny ,
1212 TQuery extends z . output < TSchema > ,
13+ TDefaultQuery extends Partial < TQuery > ,
1314> (
1415 schemaQuery : TSchema ,
15- defaultQuery : Partial < TQuery > = { } ,
16+ defaultQuery ?: TDefaultQuery ,
1617 options ?: Partial < AbstractQueryOptions & RouterWithHistoryOptions > ,
1718) =>
1819 useQueryVanilla (
@@ -24,9 +25,10 @@ export const useQuery = <
2425export const useQueryAndPagination = <
2526 TSchema extends z . ZodTypeAny ,
2627 TQuery extends z . output < TSchema > ,
28+ TDefaultQuery extends Partial < TQuery > ,
2729> (
2830 schemaQuery : TSchema ,
29- defaultQuery : Partial < TQuery > = { } ,
31+ defaultQuery ?: TDefaultQuery ,
3032 defaultPagination ?: Partial < PaginationQuery > ,
3133 options ?: Partial < AbstractQueryOptions & RouterWithHistoryOptions > ,
3234) =>
You can’t perform that action at this time.
0 commit comments