Print Flow optional & type annotations in function params with defaults (#4872)
Fixes #4863
This commit is contained in:
@@ -30,6 +30,12 @@ export default function ({ types: t }) {
|
||||
path.addComment("trailing", ":: ?");
|
||||
},
|
||||
|
||||
AssignmentPattern: {
|
||||
exit({ node }) {
|
||||
node.left.optional = false;
|
||||
}
|
||||
},
|
||||
|
||||
// strip optional property from function params - facebook/fbjs#17
|
||||
Function: {
|
||||
exit({ node }) {
|
||||
|
||||
Reference in New Issue
Block a user