Created
March 19, 2024 14:04
-
-
Save ryanramage/b906ce4af4eae6ecd38c070db7670771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import z from 'zod' | |
export const name = 'myFunction' | |
export const param = z.object({ | |
a: z.string(), | |
b: z.number() | |
}).strict | |
export const returns = z.boolean() | |
export const MyFunctionSchema = z.function().args(param).returns(returns) | |
/** @typedef { z.infer<typeof MyFunctionSchema> } MyFunction */ | |
export const dfn = { name, param, returns } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment