validator reworked

This commit is contained in:
2025-02-03 18:18:20 +03:00
parent 62d9f5a631
commit e555186537
3 changed files with 1036 additions and 7 deletions

View File

@ -1,12 +1,5 @@
import { Result } from "@shared/utils/result.ts"; import { Result } from "@shared/utils/result.ts";
class ValidationError extends BaseError {
code = "ValidationError";
constructor(msg: string) {
super(msg);
}
}
class ClientApi<Req, Res> { class ClientApi<Req, Res> {
constructor(path: string, method: string) {} constructor(path: string, method: string) {}
validate(res: Response): ResultAsync<Res> { validate(res: Response): ResultAsync<Res> {

View File

@ -1,3 +1,4 @@
export * from "@shared/utils/option.ts"; export * from "@shared/utils/option.ts";
export * from "@shared/utils/result.ts"; export * from "@shared/utils/result.ts";
export * from "@shared/utils/resultasync.ts"; export * from "@shared/utils/resultasync.ts";
//export * from "@shared/utils/validator.ts";

1035
shared/utils/validator.ts Normal file

File diff suppressed because it is too large Load Diff