Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler] Flow support for playground #30150

Merged
merged 3 commits into from
Jul 1, 2024

Commits on Jun 30, 2024

  1. [compiler] Flow support for playground

    Summary: The playground currently has limited support for Flow files--it tries to parse them if the // @flow sigil is on the fist line, but this is often not the case for files one would like to inspect in practice. more importantly, component syntax isn't supported even then, because it depends on the Hermes parser.
    
    This diff improves the state of flow support in the playground to make it more useful: when we see `@flow` anywhere in the file, we'll assume it's a flow file, parse it with the Hermes parser, and disable typescript-specific features of Monaco editor.
    
    [ghstack-poisoned]
    mvitousek committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    47c30c4 View commit details
    Browse the repository at this point in the history
  2. Update on "[compiler] Flow support for playground"

    Summary: The playground currently has limited support for Flow files--it tries to parse them if the // flow sigil is on the fist line, but this is often not the case for files one would like to inspect in practice. more importantly, component syntax isn't supported even then, because it depends on the Hermes parser.
    
    This diff improves the state of flow support in the playground to make it more useful: when we see `flow` anywhere in the file, we'll assume it's a flow file, parse it with the Hermes parser, and disable typescript-specific features of Monaco editor.
    
    [ghstack-poisoned]
    mvitousek committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    d8885e5 View commit details
    Browse the repository at this point in the history
  3. Update on "[compiler] Flow support for playground"

    Summary: The playground currently has limited support for Flow files--it tries to parse them if the // flow sigil is on the fist line, but this is often not the case for files one would like to inspect in practice. more importantly, component syntax isn't supported even then, because it depends on the Hermes parser.
    
    This diff improves the state of flow support in the playground to make it more useful: when we see `flow` anywhere in the file, we'll assume it's a flow file, parse it with the Hermes parser, and disable typescript-specific features of Monaco editor.
    
    [ghstack-poisoned]
    mvitousek committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    e10a5c5 View commit details
    Browse the repository at this point in the history