@lucaapp/service-utils 1.57.4 → 1.57.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { ZodEffects, ZodObject, z } from 'zod';
|
|
2
2
|
export type ArrayToUnion<T> = T[keyof T];
|
|
3
3
|
export type ExtractZodOutput<T> = T extends {
|
|
4
4
|
status: infer Z;
|
|
@@ -7,8 +7,8 @@ export type ExtractZodOutput<T> = T extends {
|
|
|
7
7
|
status: Z;
|
|
8
8
|
body: V;
|
|
9
9
|
} : never;
|
|
10
|
-
export type ZodObjectSchemaOrUndefined =
|
|
11
|
-
export type ZodSchemaOuput<
|
|
10
|
+
export type ZodObjectSchemaOrUndefined = ZodObject<any, any, any> | ZodEffects<ZodObject<any, any, any>> | undefined;
|
|
11
|
+
export type ZodSchemaOuput<TSchema> = TSchema extends ZodEffects<infer TInnerSchema> ? ZodSchemaOuput<TInnerSchema> : TSchema extends ZodObject<any, any, any> ? z.infer<TSchema> : unknown;
|
|
12
12
|
export type ExtractZodOutputFromMiddleware<T> = T extends {
|
|
13
13
|
options: {
|
|
14
14
|
schemas?: {
|
package/dist/lib/money/money.js
CHANGED