UNPKG

express-easy-curd

Version:

A lightweight helper library for building Express.js routes, controllers, and Redis-enhanced middleware with optional Redis support.

11 lines (10 loc) 477 B
import { RequestHandler, Response } from "express"; import { TPayload } from "../Types"; export declare class ApiError extends Error { statusCode: number; status: string; isOperational: boolean; constructor(statusCode: number, message: string); } export declare const sendResponse: <T>(res: Response, status: number, payload: TPayload<T>) => Response<any, Record<string, any>>; export declare const partialFilterMiddlewares: (keys: string[]) => RequestHandler;