Koa types #18526
Labels
issue: bug
Issue reporting a bug
severity: medium
If it breaks the basic use of the product but can be worked around
source: typescript
Source is related to TypeScript (typings, tooling, ...)
status: confirmed
Confirmed by a Strapi Team member or multiple community members
Bug report
Required System information
Describe the bug
To get auto complete for context object (type Koa context) in controllers or middlewares I installed @types/Koa. The body object according to Koa Context type is available directly with the context object but the at runtime it is undefined. At runtime the body is found under ctx.request.body["data"] but accoeding to Koa Context there is no body object under request object.
Expected behavior
Is TypeScript with Koa available? Is the context object actualy Koa context?
Screenshots
The text was updated successfully, but these errors were encountered: