UNPKG

@nestia/core

Version:

Super-fast validation decorators of NestJS

21 lines (19 loc) 546 B
import { IValidation } from "typia"; export type IRequestQueryValidator<T> = | IRequestQueryValidator.IAssert<T> | IRequestQueryValidator.IIs<T> | IRequestQueryValidator.IValidate<T>; export namespace IRequestQueryValidator { export interface IAssert<T> { type: "assert"; assert: (input: URLSearchParams) => T; } export interface IIs<T> { type: "is"; is: (input: URLSearchParams) => T | null; } export interface IValidate<T> { type: "validate"; validate: (input: URLSearchParams) => IValidation<T>; } }