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

Properly handle async arrow functions with multiline type parameters #443

Merged
merged 1 commit into from
Mar 31, 2019

Conversation

alangpierce
Copy link
Owner

Fixes #396

This is similar to another case: we detect it as a special case, then move the (
to right after the async, so that all newlines will be in parens so it won't be
detected as the end of a statement by the parser.

Fixes #396

This is similar to another case: we detect it as a special case, then move the (
to right after the async, so that all newlines will be in parens so it won't be
detected as the end of a statement by the parser.
@codecov-io
Copy link

Codecov Report

Merging #443 into master will increase coverage by 0.27%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #443      +/-   ##
=========================================
+ Coverage   81.22%   81.5%   +0.27%     
=========================================
  Files          50      50              
  Lines        5157    5412     +255     
  Branches     1204    1208       +4     
=========================================
+ Hits         4189    4411     +222     
- Misses        673     706      +33     
  Partials      295     295
Impacted Files Coverage Δ
src/transformers/FlowTransformer.ts 100% <ø> (ø) ⬆️
src/transformers/TypeScriptTransformer.ts 94.93% <ø> (ø) ⬆️
src/transformers/RootTransformer.ts 92.22% <90%> (-0.26%) ⬇️
src/util/formatTokens.ts 70.58% <0%> (-10.06%) ⬇️
src/parser/util/identifier.ts 90.9% <0%> (-4.1%) ⬇️
src/parser/plugins/jsx/index.ts 91.33% <0%> (-1.48%) ⬇️
src/util/getClassInfo.ts 85.12% <0%> (-1.21%) ⬇️
src/parser/traverser/statement.ts 81.02% <0%> (-1.19%) ⬇️
src/identifyShadowedGlobals.ts 87.8% <0%> (-1.09%) ⬇️
src/parser/plugins/flow.ts 63.55% <0%> (-0.87%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5ea65b...34f2c11. Read the comment docs.

@alangpierce alangpierce merged commit 2c37a93 into master Mar 31, 2019
@alangpierce alangpierce deleted the handle-async-arrow-with-multiline-type-params branch March 31, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants