mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 08:12:40 +10:00
chore: move more admin over to arktype validators
This commit is contained in:
14
server/arktype.ts
Normal file
14
server/arktype.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { configure } from "arktype/config";
|
||||
|
||||
export const throwingArktype = configure({
|
||||
onFail: (errors) => errors.throw(),
|
||||
actual: () => ""
|
||||
});
|
||||
|
||||
// be sure to specify both the runtime and static configs
|
||||
|
||||
declare global {
|
||||
interface ArkEnv {
|
||||
onFail: typeof throwingArktype.onFail;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user