Add variance node type and generate property variance annotations (#4697)
* Add variance node type and generate property variance annotations babel/babylon#161 adds parsing support for property variance annotations. This PR adds the necessary node type for the new Variance node and generate support for all the positions where variance can now appear. * Variance is no longer a separate node type This diff also adds tests to class properties and to the flow-strip-types transform. * Add test + fix for edge case with variance and class proeprties
This commit is contained in:
@@ -60,6 +60,7 @@ export function ClassProperty(node: Object) {
|
||||
this.print(node.key, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
this._variance(node);
|
||||
this.print(node.key, node);
|
||||
}
|
||||
this.print(node.typeAnnotation, node);
|
||||
|
||||
Reference in New Issue
Block a user