gregbacchus / validata-koa

Type safe data validation and sanitization for Koa
MIT License
1 stars 2 forks source link

fix: when library is used in a project it will result in compilation error due to missing import #13

Closed aadrijnberg closed 2 years ago

aadrijnberg commented 2 years ago

When using the validata-koa library in a project, the project compilation fails with the message

node_modules/validata-koa/dist/middleware.types.d.ts:4:14 - error TS2304: Cannot find name 'Request'.

4     request: Request & {
               ~~~~~~~

Found 1 error in node_modules/validata-koa/dist/middleware.types.d.ts:4

error Command failed with exit code 2.

After importing Request from Koa in this file, compilation succeeded.

Closes #14

gregbacchus commented 2 years ago

Thanks for the fix. I'm not sure how that ever worked!