Closed ImLunaHey closed 1 year ago
You likely need to use a lib like https://www.npmjs.com/package/auto-bind or bind the methods manually to the class.
I tried this in the browser, to see how standards-compliant Request class handles this, and it appears to also error (see below).
I can see the case for wanting to destructure inline like you're doing there, but I'm hesitant to do it unless I can be sure of the performance implications. I'd need to run an experiment and measure perf, but I don't know when I could get to this. For now closing as standards compliant behavior.
The following doesn't work. I'm forced to use
await request.json()
.