export class BaseResponse { constructor(statusCode: number) { this.statusCode = statusCode; } statusCode: number; } export class SuccessResponse extends BaseResponse { constructor() { super(200); } declare statusCode: 200; } export class ErrorResponse extends BaseResponse { declare statusCode: 400 | 401 | 403; message?: string; }