19 lines
386 B
TypeScript
19 lines
386 B
TypeScript
import { Result } from "@shared/utils/result.ts";
|
|
|
|
class ValidationError extends BaseError {
|
|
code = "ValidationError";
|
|
constructor(msg: string) {
|
|
super(msg);
|
|
}
|
|
}
|
|
|
|
class ClientApi<Req, Res> {
|
|
constructor(path: string, method: string) {}
|
|
validate(res: Response): ResultAsync<Res> {
|
|
const body = await res.json();
|
|
}
|
|
}
|
|
|
|
class ServerApi<Req, Res> {
|
|
}
|