-
-
Notifications
You must be signed in to change notification settings - Fork 256
Add support for Flow declare export (default) #441
Conversation
Codecov Report
@@ Coverage Diff @@
## master #441 +/- ##
==========================================
- Coverage 98.25% 97.02% -1.24%
==========================================
Files 20 20
Lines 3504 3529 +25
Branches 927 932 +5
==========================================
- Hits 3443 3424 -19
- Misses 22 54 +32
- Partials 39 51 +12
Continue to review full report at Codecov.
|
src/plugins/flow.js
Outdated
@@ -105,28 +105,44 @@ pp.flowParseDeclareFunction = function (node) { | |||
return this.finishNode(node, "DeclareFunction"); | |||
}; | |||
|
|||
pp.flowParseDeclare = function (node) { | |||
if (this.match(tt._class)) { | |||
let flowParseDeclareOrType = function(node, allowModule, allowType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of how I did this (especially since node
is potentially unused), but otherwise I'd be repeating a bunch of stuff.
Test failures don't seem to be a result of this PR |
Note: The generated AST just copies what Flow has. |
Hey @thejameskyle! It looks like one or more of your builds have failed. I've copied the relevant info below to save you some time. |
Duplicate of #224 |
Adds support for the following Flow syntaxes:
cc @samwgoldman