Set the first parameter of the setHeaders option to Koa Response
- Dominant language
- TypeScript
- Stars
- 433
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
I think most people are used to using " Koa Response" in koa or not "Node Response".
Just like use ctx.response.set('Cache-Control', 'max-age=0') or not ctx.res.setHeader(...).
Because Koa officially states [Bypassing Koa's response handling is not supported](https://github.com/koajs/koa/blob/master/docs/api/context.md#ctxres)
Contributor guide
Research direction
Start by locating the TypeScript definition and implementation of the setHeaders option in the send package, then inspect how its first parameter is currently typed and passed. The change is complete when that parameter is represented as a Koa Response rather than a Node Response, with relevant tests updated or added to verify the public type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100