UNPKG

@sontrx/typia

Version:

Superfast runtime validators with only one line

18 lines (17 loc) 413 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[]; data: unknown; } interface IError { path: string; expected: string; value: any; } }