From b848e43974001cfc99537f7757c5f3bb930dcb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Tue, 16 Jan 2024 10:41:49 +0100 Subject: [PATCH] Cleanup --- src/jsonifiable/JsonifiableSchemable.ts | 52 ------------------------- src/jsonifiable/index.ts | 1 - 2 files changed, 53 deletions(-) delete mode 100644 src/jsonifiable/JsonifiableSchemable.ts diff --git a/src/jsonifiable/JsonifiableSchemable.ts b/src/jsonifiable/JsonifiableSchemable.ts deleted file mode 100644 index 914b7f5..0000000 --- a/src/jsonifiable/JsonifiableSchemable.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { trait } from "@thilawyn/thilatrait" -import { JsonifiableObject } from "type-fest/source/jsonifiable" -import { z } from "zod" - - -export const JsonifiableSchemable = < - JsonifySchemaT extends z.ZodRawShape, - JsonifySchemaUnknownKeys extends z.UnknownKeysParam, - JsonifySchemaCatchall extends z.ZodTypeAny, - - DejsonifySchemaT extends z.ZodRawShape, - DejsonifySchemaUnknownKeys extends z.UnknownKeysParam, - DejsonifySchemaCatchall extends z.ZodTypeAny, - - Values extends {}, - JsonifiedValues extends JsonifiableObject, ->( - jsonifySchema: z.ZodObject< - JsonifySchemaT, - JsonifySchemaUnknownKeys, - JsonifySchemaCatchall, - JsonifiedValues, - Values - >, - - dejsonifySchema: z.ZodObject< - DejsonifySchemaT, - DejsonifySchemaUnknownKeys, - DejsonifySchemaCatchall, - Values, - JsonifiedValues - >, -) => - trait(Parent => { - abstract class JsonifiableSchemable extends Parent { - abstract readonly schema: z.ZodObject< - z.ZodRawShape, - z.UnknownKeysParam, - z.ZodTypeAny, - Values, - Values - > - - static readonly jsonifySchema = jsonifySchema - readonly jsonifySchema = jsonifySchema - - static readonly dejsonifySchema = dejsonifySchema - readonly dejsonifySchema = dejsonifySchema - } - - return JsonifiableSchemable - }) diff --git a/src/jsonifiable/index.ts b/src/jsonifiable/index.ts index 5d4869f..3f08be2 100644 --- a/src/jsonifiable/index.ts +++ b/src/jsonifiable/index.ts @@ -1,3 +1,2 @@ -export * from "./JsonifiableSchemable" export * from "./JsonifiableSchemableClass" export * from "./makeJsonifiableSchemableClass"