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

Handle properly negative values in TS parser #34800

Closed
wants to merge 1 commit into from

Commits on Sep 29, 2022

  1. Handle properly negative values in TS parser (facebook#34800)

    Summary:
    Pull Request resolved: facebook#34800
    
    The TypeScript parser was not handling negative default values properly. The reason why is because the AST for those values is structurally different and wraps them in a `UnaryExpression` with the `-` operator.
    
    This Diff adds the support for those default values and it also add some tests in both Flow and TS.
    
    ## Changelog
    [General][Fixed] - Properly parse negative values
    
    Differential Revision: D39847784
    
    fbshipit-source-id: 6885cb8eda0659e98aa208a43d027047082a2506
    Riccardo Cipolleschi authored and facebook-github-bot committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    c57456a View commit details
    Browse the repository at this point in the history