UNPKG

@zishone/jasenda

Version:

A middleware to add jsend helper functions to the response object

13 lines (12 loc) 371 B
import 'express'; declare global { namespace Express { interface Response { jsend: { success: (data: any, statusCode?: number) => void; fail: (data: any, statusCode?: number) => void; error: (message: string, statusCode?: number, code?: number, data?: any) => void; }; } } }