We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce6f814 commit e7656f6Copy full SHA for e7656f6
1 file changed
packages/code-gen/src/router/js-koa.js
@@ -369,7 +369,11 @@ type _Context = import("koa").ParameterizedContext<{}, {
369
fileWrite(file, `ctx.request.params = params;`);
370
371
if (route.body || route.query) {
372
- fileWrite(file, `await bodyParser(ctx);`);
+ if (file.relativePath.endsWith(".ts")) {
373
+ fileWrite(file, `await bodyParser(ctx as any);`);
374
+ } else {
375
+ fileWrite(file, `await bodyParser(ctx);`);
376
+ }
377
}
378
379
if (route.params) {
0 commit comments