rouzer 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types.d.ts +8 -8
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -46,27 +46,27 @@ declare class Any {
|
|
|
46
46
|
type PathArgs<T, P extends string> = T extends {
|
|
47
47
|
path: infer TPath;
|
|
48
48
|
} ? {} extends z.infer<TPath> ? {
|
|
49
|
-
path?: z.infer<TPath>;
|
|
49
|
+
[K in keyof T as 'path']?: z.infer<TPath>;
|
|
50
50
|
} : {
|
|
51
|
-
path: z.infer<TPath>;
|
|
51
|
+
[K in keyof T as 'path']: z.infer<TPath>;
|
|
52
52
|
} : Params<P> extends infer TParams ? {} extends TParams ? {
|
|
53
|
-
path?: TParams;
|
|
53
|
+
[K in keyof T as 'path']?: TParams;
|
|
54
54
|
} : {
|
|
55
|
-
path: TParams;
|
|
55
|
+
[K in keyof T as 'path']: TParams;
|
|
56
56
|
} : unknown;
|
|
57
57
|
type QueryArgs<T> = T extends QueryRouteSchema & {
|
|
58
58
|
query: infer TQuery;
|
|
59
59
|
} ? {} extends z.infer<TQuery> ? {
|
|
60
|
-
query?: z.infer<TQuery>;
|
|
60
|
+
[K in keyof T as 'query']?: z.infer<TQuery>;
|
|
61
61
|
} : {
|
|
62
|
-
query: z.infer<TQuery>;
|
|
62
|
+
[K in keyof T as 'query']: z.infer<TQuery>;
|
|
63
63
|
} : unknown;
|
|
64
64
|
type MutationArgs<T> = T extends MutationRouteSchema ? T extends {
|
|
65
65
|
body: infer TBody;
|
|
66
66
|
} ? {} extends z.infer<TBody> ? {
|
|
67
|
-
body?: z.infer<TBody>;
|
|
67
|
+
[K in keyof T as 'body']?: z.infer<TBody>;
|
|
68
68
|
} : {
|
|
69
|
-
body: z.infer<TBody>;
|
|
69
|
+
[K in keyof T as 'body']: z.infer<TBody>;
|
|
70
70
|
} : {
|
|
71
71
|
body?: unknown;
|
|
72
72
|
} : unknown;
|