The same question exists for javascript but I don't think the solutions listed there apply for typescript.
Firstly I've an object of type express.Request
and I want to debug its body
member:
function test(req : express.Request, res :express.Response, next:(err:any)=>void) {
req.defineProperty(body, 'someProp', { //Property 'defineProperty' does not exist on type 'Request'.
get: function () {
return req._body;
},
set: function (value) {
debugger; // sets breakpoint
obj._someProp = value;
}
});