相关疑难解决方法(0)

如何在angular-cli 1.0.1 app中使用chrome-app.d.ts类型?

我安装了@ types/chrome并将其添加到tsconfig.app.json中

"types": [
  "chrome"
]
Run Code Online (Sandbox Code Playgroud)

但是当我chrome.app在组件中使用时,它会显示错误:

'typeof chrome'类型中不存在属性'app'

@ types/chrome文件夹包含chrome-app.d.ts是我需要的文件,我怎么能参考这个

来源https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome

typescript definitelytyped angular-cli angular

3
推荐指数
1
解决办法
1222
查看次数