@matatbread/typia
Version:
Superfast runtime validators with only one line
21 lines (18 loc) • 371 B
text/typescript
export type IValidation<T = unknown> =
| IValidation.ISuccess<T>
| IValidation.IFailure;
export namespace IValidation {
export interface ISuccess<T = unknown> {
success: true;
data: T;
}
export interface IFailure {
success: false;
errors: IError[];
}
export interface IError {
path: string;
expected: string;
value: any;
}
}