I new in TypeScript I try to use app.response.sendWrapped but show error "Property 'sendWrapped' does not exist on type 'Response<any, Record<string, any>, number>'.ts(2339)"
This my code
// At this show "Property 'sendWrapped' does not exist on type 'Response<any, Record<string, any>, number>'".
app.response.sendWrapped = function (statusCode: number, message: string, data?: any) {
return this.status(statusCode)
.send({
status: statusCode,
message,
data,
});
};
Can somone fix this?