@nestia/core
Version:
Super-fast validation decorators of NestJS
17 lines (16 loc) • 660 B
TypeScript
import { IValidation } from "typia";
export type IRequestHeadersValidator<T> = IRequestHeadersValidator.IAssert<T> | IRequestHeadersValidator.IIs<T> | IRequestHeadersValidator.IValidate<T>;
export declare namespace IRequestHeadersValidator {
interface IAssert<T> {
type: "assert";
assert: (input: Record<string, string | string[] | undefined>) => T;
}
interface IIs<T> {
type: "is";
is: (input: Record<string, string | string[] | undefined>) => T | null;
}
interface IValidate<T> {
type: "validate";
validate: (input: Record<string, string | string[] | undefined>) => IValidation<T>;
}
}