mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Migrate to zod
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import type { Static, TSchema } from '@sinclair/typebox';
|
||||
import { TypeCompiler } from '@sinclair/typebox/compiler';
|
||||
|
||||
const isSchemaValid = <T extends TSchema>(schema: T, data: unknown): data is Static<T> => {
|
||||
const compiler = TypeCompiler.Compile(schema);
|
||||
return compiler.Check(data);
|
||||
};
|
||||
|
||||
export { isSchemaValid };
|
||||
Reference in New Issue
Block a user