Revert "fix"

This reverts commit a2d11a7d7d.
This commit is contained in:
手瓜一十雪
2025-04-19 10:57:32 +08:00
parent ac5df6946c
commit 9cc1ef5b31
88 changed files with 88 additions and 87 deletions

View File

@@ -1,14 +0,0 @@
import { z } from "zod";
const boolean = () => z.preprocess(
val => typeof val === 'string' && (val.toLowerCase() === 'false' || val === '0') ? false : Boolean(val),
z.boolean()
);
const number = () => z.preprocess(
val => typeof val !== 'number' ? Number(val) : val,
z.number()
);
const string = () => z.preprocess(
val => typeof val !== 'string' ? String(val) : val,
z.string()
);
export const actionType = { boolean, number, string };