We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b2ee61 commit 48170a1Copy full SHA for 48170a1
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "zod-cdk-context",
3
- "version": "0.0.9",
+ "version": "0.0.10",
4
"description": "Validate AWS CDK context with Zod",
5
"keywords": [
6
"zod",
src/index.ts
@@ -1,18 +1,10 @@
import type { Node } from 'constructs'
-import { z } from 'zod'
+import { z, type ZodRawShape } from 'zod'
export { z } from 'zod'
7
-export const getValidatedContext = <
8
- T extends {
9
- [key: string]:
10
- | z.ZodString
11
- | z.ZodNumber
12
- | z.ZodOptional<z.ZodString | z.ZodNumber>
13
- | z.ZodEnum<[string, ...string[]]>
14
- },
15
->(
+export const getValidatedContext = <T extends ZodRawShape>(
16
node: Node,
17
schemaObject: T,
18
): z.infer<z.ZodObject<T>> => {
0 commit comments