summaryrefslogtreecommitdiffhomepage
path: root/cloud
diff options
context:
space:
mode:
Diffstat (limited to 'cloud')
-rw-r--r--cloud/core/src/util/fn.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloud/core/src/util/fn.ts b/cloud/core/src/util/fn.ts
index 52df65e2b..9efe4622f 100644
--- a/cloud/core/src/util/fn.ts
+++ b/cloud/core/src/util/fn.ts
@@ -1,11 +1,11 @@
import { z } from "zod"
-export function fn<T extends z.ZodType, Result>(schema: T, cb: (input: z.output<T>) => Result) {
- const result = (input: z.input<T>) => {
+export function fn<T extends z.ZodType, Result>(schema: T, cb: (input: z.infer<T>) => Result) {
+ const result = (input: z.infer<T>) => {
const parsed = schema.parse(input)
return cb(parsed)
}
- result.force = (input: z.input<T>) => cb(input)
+ result.force = (input: z.infer<T>) => cb(input)
result.schema = schema
return result
}