Could not find a declaration file for module...implicitly has an 'any' type.

来源:6-12 电子书管理功能优化

weixin_慕粉4436965

2024-03-29

报错 Could not find a declaration file for module ‘@/util/tool’. ‘C:/Develop/SpringBootWiki/billwiki/wiki/wiki/web/src/util/tool.js’ implicitly has an ‘any’ type.

把tool.js里的 object: any 改成 object: string 还是报相同错误
具体报错如下图,网上查了报错指向的是js文件内容,应该是js的问题,但不知道哪里有问题T T

图片描述

精简tool.js改成这样都报错
图片描述

写回答

1回答

甲蛙

2024-03-29

如果你想用ts语法,把tool.js改为tool.ts

1
0

Spring Boot+Vue3前后端分离,实战wiki知识库系统

一课掌握前后端最火框架,更有职场竞争力

2524 学习 · 1671 问题

查看课程