api-stds
Version:
Standardized API response and error handling toolkit with async handler, requestId, logging, and configurable formats.
4 lines (3 loc) • 304 B
TypeScript
import type { Response } from "express";
export declare function successResponse(res: Response, data: any, meta?: any): Response<any, Record<string, any>>;
export declare function errorResponse(res: Response, code: string, message: string, details?: any, meta?: any): Response<any, Record<string, any>>;