facebook

Can I use Flow type checking?

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #584363 Reply

    tandtsw
    Participant

    I added flow (flow.org) to my React project. If I try to add flow syntax to a .js file I get “types can only be used in a .ts file.” Is this something that needs to be configured in the preferences for CodeMix or have I missed something in the installation of Flow?

    #584368 Reply

    Wojciech Galanciak
    Participant

    Hi tandtsw,

    It is great that you have decided to try CodeMix for a React development. CodeMix is very extensible so you can adjust it to your needs. To have the best development experience for React with Flow you need to perform the following steps:

    1) Download vsix extension file for Flow Language Support (you can find a link to it here: https://flow.org/en/docs/editors/vscode/).
    2) Open CodeMix Extensions Manager (Help -> CodeMix Extensions…).
    3) Choose Browse for Extensions.
    4) Find React Pack and choose Get Pack to install it.
    5) Now choose Install from VISX file… and choose a file from step 1.
    6) Open Preferences -> CodeMix -> User Settings.
    7) Find javascript.validate.enable and set it to false.

    At the end your CodeMix will be ready to start React + Flow development.

    Please let me know if you have any more questions or find any issues during configuration process.

    Kind regards,
    Wojciech Galanciak
    Applications Development Manager

    #591058 Reply

    klingmachine
    Participant

    Can you elaborate on how to download the vsix file from the link you provided? It currently doesn’t seem obvious to me.

    Thanks,
    David

    #591111 Reply

    timwebb
    Keymaster

    David, great question. Each extension provider can make their extension available in any way they choose. This particular provider doesn’t have a direct download for the extension on their website however there are instructions to install on their GitHub page here: https://github.com/flowtype/flow-for-vscode

    In the future, we’ll be working with them to either make our own extension build or assist them in adding one of their own for ease of installation going forward.

    But fortunately since we can’t build every possible extension ourselves, there are many repositories/marketplaces of extensions compatible with VS Code and Code OSS already available on the Internet each with an option to download VSIX files if you look.

    To find what you want you should search within the Extensions Browser within CodeMix (Help > CodeMix Extensions… > Browse for Extensions). The browser opens to our packs page but you can change the URL to something like ‘download visual studio code flow extension’ to search for what you want. Once you’ve used an option to download a VSIX in that browser it will be installed automatically.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Can I use Flow type checking?

You must be logged in to post in the forum log in