0.1.0 #1
@@ -2,6 +2,18 @@ import { Class } from "type-fest"
|
|||||||
import { z } from "zod"
|
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<
|
export type SchemaClass<
|
||||||
Values extends {} = {},
|
Values extends {} = {},
|
||||||
Input 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<
|
export type SchemaClassConstructorParams<
|
||||||
Values extends {} = {}
|
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<
|
export type SchemaObject<
|
||||||
Values extends {} = {},
|
Values extends {} = {},
|
||||||
Input extends {} = {},
|
Input extends {} = {},
|
||||||
|
|||||||
Reference in New Issue
Block a user