![Modern JavaScript Web Development Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/54/36699054/b_36699054.jpg)
上QQ阅读APP看书,第一时间看更新
Using Flow within VSC
As we have been doing previously, we'll want to see Flow problems right in VSC. There's a simple solution: just go to Extensions, search for Flow Language Support, and install the package; that's it!
You'll also have to change two settings for VSC:
- Add "flow.useNPMPackagedFlow": true and this will remove the need to do npm run flow at the beginning; the extension will do that on its own
- Add "javascript.validate.enable": false to avoid clashes between Flow's syntax and JS
After that, you will be able to see Flow errors onscreen; see following screenshot for an example:
![](https://epubservercos.yuewen.com/0EB5F0/19470383708834806/epubprivate/OEBPS/Images/d8759edb-75e5-437d-b204-2eb8b2641d2b.png?sign=1738806424-P5TJAF2Tc7JFUT6yhg3N7gYNyumoJUPC-0-d2d18183de5b1b0fcb31563deadbbd89)
The VSC Flow extension lets you catch data type errors in real time; however, error messages are not always very clear