diff --git a/packages/zact/client.ts b/packages/zact/client.ts index 0ea2fbe..3baa32c 100644 --- a/packages/zact/client.ts +++ b/packages/zact/client.ts @@ -16,7 +16,7 @@ export function useZact< const [err, setErr] = useState(null); const mutate = useMemo( - () => async (input: z.infer) => { + () => async (input: z.input) => { setIsLoading(true); setErr(null); setData(null); diff --git a/packages/zact/server.ts b/packages/zact/server.ts index c8a1368..28d3763 100644 --- a/packages/zact/server.ts +++ b/packages/zact/server.ts @@ -6,7 +6,7 @@ declare const brand: unique symbol; type Brand = T & { [brand]: TBrand }; type ActionType = ( - input: z.infer + input: z.input ) => Promise; export type ZactAction< @@ -20,7 +20,7 @@ export function zact(validator?: InputType) { action: ActionType ): ZactAction { // The wrapper that actually validates - const validatedAction = async (input: z.infer) => { + const validatedAction = async (input: z.input) => { if (validator) { // This will throw if the input is invalid const result = validator.safeParse(input);