UNPKG

@matatbread/typia

Version:

Superfast runtime validators with only one line

17 lines (16 loc) 390 B
export type IValidation<T = unknown> = IValidation.ISuccess<T> | IValidation.IFailure; export declare namespace IValidation { interface ISuccess<T = unknown> { success: true; data: T; } interface IFailure { success: false; errors: IError[]; } interface IError { path: string; expected: string; value: any; } }