TypeBoxValidator
Members
Section titled “Members”Properties
Section titled “Properties”| Property | Description |
|---|---|
| Clean | - |
| hasCodec | - |
| hasDefault | - |
| isAsync | - |
| mayReturnPromise | - |
| precomputeSafe | - |
| reconstructedCheck | - |
| schema | - |
| tb | - |
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Check | - |
| Decode | - |
| Encode | - |
| EncodeFrom | - |
| Errors | - |
| From | - |
| FromAsync | - |
| FromSync | - |
| clear | - |
| create | - |
| isAsyncMember | - |
| reference | - |
| response | - |
Defined in: elysia/dist/type/validator/index.d.ts:11
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T extends TSchema | TAny |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TypeBoxValidator<T>( schema, options?, name?, isIntersectable?): TypeBoxValidator<T>;Defined in: elysia/dist/type/validator/index.d.ts:21
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | T |
options? | ValidatorOptions |
name? | string |
isIntersectable? | boolean |
Returns
Section titled “Returns”TypeBoxValidator<T>
Overrides
Section titled “Overrides”Properties
Section titled “Properties”Clean: (value) => unknown;Defined in: elysia/dist/validator/index.d.ts:37
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”hasCodec
Section titled “hasCodec”hasCodec: boolean;Defined in: elysia/dist/type/validator/index.d.ts:17
hasDefault
Section titled “hasDefault”hasDefault: boolean;Defined in: elysia/dist/type/validator/index.d.ts:19
isAsync
Section titled “isAsync”isAsync: boolean;Defined in: elysia/dist/type/validator/index.d.ts:18
Overrides
Section titled “Overrides”mayReturnPromise
Section titled “mayReturnPromise”mayReturnPromise: boolean;Defined in: elysia/dist/validator/index.d.ts:32
Inherited from
Section titled “Inherited from”precomputeSafe
Section titled “precomputeSafe”precomputeSafe: boolean;Defined in: elysia/dist/type/validator/index.d.ts:20
reconstructedCheck?
Section titled “reconstructedCheck?”optional reconstructedCheck?: (value) => boolean;Defined in: elysia/dist/type/validator/index.d.ts:15
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”boolean
schema
Section titled “schema”schema: T;Defined in: elysia/dist/type/validator/index.d.ts:16
optional tb?: Validator;Defined in: elysia/dist/type/validator/index.d.ts:14
Methods
Section titled “Methods”Check()
Section titled “Check()”Check(value): boolean;Defined in: elysia/dist/type/validator/index.d.ts:22
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”Decode()
Section titled “Decode()”Decode(value): StaticType<[]>;Defined in: elysia/dist/type/validator/index.d.ts:24
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
Returns
Section titled “Returns”StaticType<[]>
Encode()
Section titled “Encode()”Encode(value): StaticType<[]>;Defined in: elysia/dist/type/validator/index.d.ts:25
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
Returns
Section titled “Returns”StaticType<[]>
EncodeFrom()
Section titled “EncodeFrom()”EncodeFrom(value, type?): StaticType<[]>;Defined in: elysia/dist/type/validator/index.d.ts:26
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
type? | string |
Returns
Section titled “Returns”StaticType<[]>
Errors()
Section titled “Errors()”Errors(value): TLocalizedValidationError[];Defined in: elysia/dist/type/validator/index.d.ts:23
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | unknown |
Returns
Section titled “Returns”TLocalizedValidationError[]
Overrides
Section titled “Overrides”From()
Section titled “From()”From(value, type?): MaybePromise<StaticType<[], "Encode", {}, {}, T>>;Defined in: elysia/dist/type/validator/index.d.ts:27
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
type? | string |
Returns
Section titled “Returns”MaybePromise<StaticType<[], "Encode", {
}, {
}, T>>
Overrides
Section titled “Overrides”FromAsync()
Section titled “FromAsync()”FromAsync(value, type?): Promise<StaticType<[], "Encode", {}, {}, T>>;Defined in: elysia/dist/type/validator/index.d.ts:29
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
type? | string |
Returns
Section titled “Returns”Promise<StaticType<[], "Encode", {
}, {
}, T>>
FromSync()
Section titled “FromSync()”FromSync(value, type?): StaticType<[]>;Defined in: elysia/dist/type/validator/index.d.ts:30
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | StaticType<[]> |
type? | string |
Returns
Section titled “Returns”StaticType<[]>
clear()
Section titled “clear()”static clear(): void;Defined in: elysia/dist/validator/index.d.ts:42
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”create()
Section titled “create()”Call Signature
Section titled “Call Signature”static create<Schema>(schema, options?): TypeBoxValidator<Schema>;Defined in: elysia/dist/validator/index.d.ts:38
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Schema extends TSchema |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | Schema |
options? | ValidatorOptions |
Returns
Section titled “Returns”TypeBoxValidator<Schema>
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”static create<Schema>(schema, options?): StandardValidator;Defined in: elysia/dist/validator/index.d.ts:39
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Schema extends StandardSchemaV1Like<unknown, unknown> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | Schema |
options? | ValidatorOptions |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”static create(schema, options?): Validator;Defined in: elysia/dist/validator/index.d.ts:40
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | null |
options? | ValidatorOptions |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”isAsyncMember()
Section titled “isAsyncMember()”static isAsyncMember(schema, compiled): boolean;Defined in: elysia/dist/type/validator/index.d.ts:13
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | TSchema |
compiled | any |
Returns
Section titled “Returns”boolean
reference()
Section titled “reference()”static reference(schema, models): AnySchema;Defined in: elysia/dist/validator/index.d.ts:35
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | | string | TSchema | StandardSchemaV1Like<unknown, unknown> |
models | Record<string | number | symbol, AnySchema> |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”response()
Section titled “response()”static response(schema, options?): Map<number, Validator>;Defined in: elysia/dist/validator/index.d.ts:41
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema | | TSchema | StandardSchemaV1Like<unknown, unknown> | Record<number, | TSchema | StandardSchemaV1Like<unknown, unknown>> |
options? | ResponseValidatorOptions |
Returns
Section titled “Returns”Map<number, Validator>