1.在ts中,碰到Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.
這種問題測出現時說:元素隱式具有“any”類型,因為“string”類型的表達式不能用於索引類型“Object”。在類型“Object”上找不到“string”類型參數的索引簽名。
要想解決這類問題,需要在tsconfig.json文件中配置:"suppressImplicitAnyIndexErrors": true 就可以解決此類問題。
2.在vue中,使用此命令 vue add @vue/typescript,出現如下錯誤得時候:
在對應得文件夾中刪除vue.ps1就ok了。