IntelliJ IDEA provides basic support of Flow
static type checker
that brings type annotations to JavaScript.
This support involves recognition and syntax highlighting of Flow structures on all operating systems.
If you are using Unix or OS X, you can also run Flow in the command-line mode.
For information on installing Flow, see Getting Started with Flow
.
To have IntelliJ IDEA recognize Flow structures, provide correct syntax highlighting, and avoid false-positive error highlighting, change the JavaScript language level to Flow:
- Open the Settings / Preferences Dialog by pressing ⌘, or ⌘,⌘, or ⌘,⌘, or ⌘,⌥ F7, ⌥F7 or ⌥F7^ ⌥ S, ⌃⌥S or ⌃⌥S or by choosing for Windows and Linux or for OS X, and click JavaScript under Languages&Frameworks.
- On the JavaScript page that opens, choose Flow from the JavaScript Language Version drop-down list.