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"