Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Add type annotations to arrow-parens "as-needed" #44

Merged
merged 1 commit into from
Jan 22, 2016
Merged

Add type annotations to arrow-parens "as-needed" #44

merged 1 commit into from
Jan 22, 2016

Commits on Jan 14, 2016

  1. Add type annotations to arrow-parens "as-needed"

    When using optional type annotations, parentheses are required even for
    single-argument arrow functions. Check for a `typeAnnotation` on the
    single param and allow parentheses if it exists.
    
        // good with "as-needed"
        a => 5;
        (a: string) => 5; // Previously this reported an error
    
        // bad with "as-needed"
        (a) => 5;
    ssorallen committed Jan 14, 2016
    Configuration menu
    Copy the full SHA
    d735505 View commit details
    Browse the repository at this point in the history