I am using "querymen"
library to parse the query string to mongodb
| mongoose
query and I am writing my code in TypeScript
import { middleware as query } from 'querymen';
// then the route .
xRouter.get('/', query(), ...... );
but always giving me error :
Could not find a declaration file for module 'querymen'. '/Users/meroo/Desktop/erp-next/erpnext/node_modules/querymen/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/querymen` if it exists or add a new declaration (.d.ts) file containing `declare module 'querymen';`
I tried many ways to solve that issue but its not working
CodePudding user response:
There are no types available for that lib, you're going to need to write it yourself by creating a d.ts
file that contains declare module 'querymen';