在ts文件中引用js文件异常:
TS7016: Could not find a declaration file for module '@/utils/auth'. 'D:/xxxxweb/src/utils/auth.js' implicitly has an 'any' type.
解决方法:
修改tsconfig.json中"strict"的值为false,禁用严格模式。
本文介绍了解决在TS文件中引用JS文件时出现的TS7016错误的方法,通过调整tsconfig.json中的strict值为false,禁用严格模式来避免类型声明问题。
在ts文件中引用js文件异常:
TS7016: Could not find a declaration file for module '@/utils/auth'. 'D:/xxxxweb/src/utils/auth.js' implicitly has an 'any' type.
解决方法:
修改tsconfig.json中"strict"的值为false,禁用严格模式。
2787

被折叠的 条评论
为什么被折叠?