UNPKG

@nestia/core

Version:

Super-fast validation decorators of NestJS

31 lines (29 loc) 832 B
import { IValidation } from "typia"; export type IResponseBodyStringifier<T> = | IResponseBodyStringifier.IStringify<T> | IResponseBodyStringifier.IIs<T> | IResponseBodyStringifier.IAssert<T> | IResponseBodyStringifier.IValidate<T> | IResponseBodyStringifier.IValidateLog<T>; export namespace IResponseBodyStringifier { export interface IStringify<T> { type: "stringify"; stringify: (input: T) => string; } export interface IIs<T> { type: "is"; is: (input: T) => string | null; } export interface IAssert<T> { type: "assert"; assert: (input: T) => string; } export interface IValidate<T> { type: "validate"; validate: (input: T) => IValidation<string>; } export interface IValidateLog<T> { type: "validate.log"; validate: (input: T) => IValidation<string>; } }