Conversation
Codecov Report
@@ Coverage Diff @@
## master #495 +/- ##
==========================================
+ Coverage 98.2% 98.26% +0.05%
==========================================
Files 21 21
Lines 3517 3516 -1
Branches 974 973 -1
==========================================
+ Hits 3454 3455 +1
+ Misses 24 22 -2
Partials 39 39
Continue to review full report at Codecov.
|
src/plugins/flow.js
Outdated
@@ -1018,8 +1035,8 @@ export default (superClass) => class extends superClass { | |||
} | |||
} | |||
|
|||
// declares, interfaces and type aliases | |||
parseExpressionStatement(node, expr) { | |||
// declares, interfaces and tNype aliases |
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.
Nit: typo
node.default = false; | ||
delete node.exportKind; | ||
} | ||
|
||
// $FlowIgnore | ||
node.type = "Declare" + node.type; |
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.
Well stuff like this isn't fun
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.
Type systems don't handle objects changing type very well. There are similar problems in the estree plugin.
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.
Yeah it's just not a good way to handle the types, dynamically adding the strings
Enables type-checking in the file and adds type annotations.
This isn't a very strict check since the spec for the node types isn't done.