【发布时间】:2022-10-06 19:06:30
【问题描述】:
我正在使用\"querymen\" 库将查询字符串解析为mongodb | mongoose 查询,我正在TypeScript 中编写我的代码
import { middleware as query } from \'querymen\';
// then the route .
xRouter.get(\'/\', query(), ...... );
但总是给我错误:
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\';`
我尝试了很多方法来解决这个问题,但它不起作用
标签: node.js typescript mongoose typescript-typings