We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f908e4 commit a0ccbb4Copy full SHA for a0ccbb4
packages/aws-zod-interface-contracts/src/types/jsonZodSchema.ts
@@ -1,4 +1,4 @@
1
-import { z } from 'zod';
+import { z, ZodTypeAny } from 'zod';
2
3
const literalSchema = z.union([
4
z.string(),
@@ -12,5 +12,7 @@ type Json = Literal | { [key: string]: Json } | Json[];
12
export type JsonZodSchema = z.ZodType<Json>;
13
14
const constrainedJsonZodSchema = z.record(z.union([z.string(), z.unknown()]));
15
+
16
type Constrained = z.infer<typeof constrainedJsonZodSchema>;
-export type ConstrainedJsonZodSchema = z.ZodType<Constrained>;
17
+export type ConstrainedJsonZodSchema = z.ZodType<Constrained> &
18
+ z.ZodObject<{ [x: string]: ZodTypeAny }>;
0 commit comments