PhpStorm 中的 TypeScript - 没有自动完成
TypeScript in PhpStorm - no autocomplete
我刚开始使用 TypeScript 和 React,我的测试应用程序可以运行,但我无法为任何 window
或 document
函数自动完成,知道为什么吗?
document.getElementById
- Unresolved variable or type document
等等
我在 webpack 中通过 Babel 编译,没有 .tsconfig.json
文件。
我也安装了 @types/react-dom
但 ReactDOM.render
仍然在编辑器中抱怨:Unresolved function or method render()
这不正常吧?谢谢。
所以好像是个bug,几天后就消失了,虽然我不知道有更新,很奇怪但是解决了,谢谢。
我刚开始使用 TypeScript 和 React,我的测试应用程序可以运行,但我无法为任何 window
或 document
函数自动完成,知道为什么吗?
document.getElementById
- Unresolved variable or type document
等等
我在 webpack 中通过 Babel 编译,没有 .tsconfig.json
文件。
我也安装了 @types/react-dom
但 ReactDOM.render
仍然在编辑器中抱怨:Unresolved function or method render()
这不正常吧?谢谢。
所以好像是个bug,几天后就消失了,虽然我不知道有更新,很奇怪但是解决了,谢谢。