mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
add authentik
This commit is contained in:
9
src/utils/schemas.ts
Normal file
9
src/utils/schemas.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
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 };
|
||||
6
src/utils/types.d.ts
vendored
Normal file
6
src/utils/types.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type ExpectedAny = any;
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user