From 5704fd817dc27a00975e239c3b02fd0d53a632ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Sat, 30 Dec 2023 23:51:03 +0100 Subject: [PATCH] SchemaClass comments --- src/SchemaClass.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/SchemaClass.ts b/src/SchemaClass.ts index 478adf4..f009d1f 100644 --- a/src/SchemaClass.ts +++ b/src/SchemaClass.ts @@ -2,6 +2,18 @@ import { Class } from "type-fest" import { z } from "zod" +/** + * Represents a schema class with generic parameters for defining validation schemas. + * + * @template Values - The type of values expected by the schema. + * @template Input - The type of input data expected by the schema. + * @template SchemaT - The type of the raw shape of the schema. + * @template SchemaUnknownKeys - The type of unknown keys parameter for the schema. + * @template SchemaCatchall - The type of catchall parameter for the schema. + * @template SchemaWithDefaultValuesT - The type of the raw shape for default values schema. + * @template SchemaWithDefaultValuesUnknownKeys - The type of unknown keys parameter for default values schema. + * @template SchemaWithDefaultValuesCatchall - The type of catchall parameter for default values schema. + */ export type SchemaClass< Values extends {} = {}, Input extends {} = {}, @@ -48,6 +60,11 @@ export type SchemaClass< } ) +/** + * Represents the constructor parameters for a schema class. + * + * @template Values - The type of values expected by the schema. + */ export type SchemaClassConstructorParams< Values extends {} = {} > = ( @@ -56,6 +73,18 @@ export type SchemaClassConstructorParams< > ) +/** + * Represents a schema object with generic parameters for defining validation schemas. + * + * @template Values - The type of values expected by the schema. + * @template Input - The type of input data expected by the schema. + * @template SchemaT - The type of the raw shape of the schema. + * @template SchemaUnknownKeys - The type of unknown keys parameter for the schema. + * @template SchemaCatchall - The type of catchall parameter for the schema. + * @template SchemaWithDefaultValuesT - The type of the raw shape for default values schema. + * @template SchemaWithDefaultValuesUnknownKeys - The type of unknown keys parameter for default values schema. + * @template SchemaWithDefaultValuesCatchall - The type of catchall parameter for default values schema. + */ export type SchemaObject< Values extends {} = {}, Input extends {} = {},