reactjs - 未找到 @types/react-bootstrap-table2-editor
问题描述
我正在使用 react-bootstrap-table2,但我无法安装 react-bootstrap-table2-editor typescript
Could not find a declaration file for module 'react-bootstrap-table2-editor'. 'node_modules/react-bootstrap-table2-editor/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/react-bootstrap-table2-editor` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-bootstrap-table2-editor';`ts(7016)
你能给我一些建议吗?
解决方案
跑npm install @types/react-bootstrap-table-next
这些不是官方类型,因此它们可能无法正常工作。
另一种选择是在// @ts-ignore
您的导入上方添加。这意味着该包不支持打字稿,但也没有错误
推荐阅读
- python - 无法将图像上传到pygame python(mac)
- mysql - CTE 正在返回一个空集
- javascript - JS 正则表达式在文本中查找 json 字符串
- python - 当我尝试解析具有重复元素的字典结构时,出现错误“CMessage' 对象不适用于 'str' 对象”
- javascript - 使用 Leaflet 显示离线 ArcGIS Esri 地图
- c# - 无法从 Microsoft Azure 下载机器人源代码
- azure-cosmosdb - StatusCode = 429 时的 Cosmos db 费用是多少
- python-3.x - 在 intermapper 中组合探针文件
- javascript - 使用重载 TypeScript 方法的可选参数
- javascript - 通过 Angular 在 json 对象中显示列表的最佳方式