14 lines
244 B
TypeScript
14 lines
244 B
TypeScript
type SuccessResponse<Body> = {
|
|
success: true;
|
|
body: Body;
|
|
};
|
|
|
|
export type ErrorMessage = string;
|
|
|
|
type ErrorResponse = {
|
|
success: false;
|
|
message: ErrorMessage;
|
|
};
|
|
|
|
export type BaseResponse<Body> = SuccessResponse<Body> | ErrorResponse;
|