koa-better-modules / joi-router

Easy, rich and fully validated koa routing.
MIT License
4 stars 4 forks source link

Typescript error - Properties does not exist on type 'Request'. #11

Closed himabindugit closed 11 months ago

himabindugit commented 11 months ago

@koa-better-modules/joi-router - 11.0.0 "koa": "^2.14.2", "@types/koa": "^2.13.12", Node version - 18.14.1

import { Context } from 'koa';

Accessing ctx.request.body, ctx.request.params giving below error error TS2339: Property 'body' does not exist on type 'Request'. Property 'params' does not exist on type 'Request'.

These Typescript errors were gone by switching to the package koa-joi-router, but this package has vulnerabilities.

himabindugit commented 11 months ago

Closing as types needed to be included as typeRoots in tsconfig.json