Merge branch 'master' of github.com:babel/babel
This commit is contained in:
@@ -415,6 +415,9 @@ pp.flow_identToTypeAnnotation = function (start, node, id) {
|
||||
case "boolean":
|
||||
return this.finishNode(node, "BooleanTypeAnnotation")
|
||||
|
||||
case "mixed":
|
||||
return this.finishNode(node, "MixedTypeAnnotation")
|
||||
|
||||
case "number":
|
||||
return this.finishNode(node, "NumberTypeAnnotation")
|
||||
|
||||
|
||||
@@ -103,6 +103,10 @@ export function IntersectionTypeAnnotation(node, print) {
|
||||
print.join(node.types, { separator: " & " });
|
||||
}
|
||||
|
||||
export function MixedTypeAnnotation() {
|
||||
this.push("mixed");
|
||||
}
|
||||
|
||||
export function NullableTypeAnnotation(node, print) {
|
||||
this.push("?");
|
||||
print.plain(node.typeAnnotation);
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
"InterfaceExtends": ["Flow"],
|
||||
"InterfaceDeclaration": ["Flow", "Statement", "Declaration"],
|
||||
"IntersectionTypeAnnotation": ["Flow"],
|
||||
"MixedTypeAnnotation": ["Flow"],
|
||||
"NullableTypeAnnotation": ["Flow"],
|
||||
"NumberTypeAnnotation": ["Flow"],
|
||||
"StringLiteralTypeAnnotation": ["Flow"],
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
"InterfaceExtends": ["id", "typeParameters"],
|
||||
"InterfaceDeclaration": ["id", "typeParameters", "extends", "body"],
|
||||
"IntersectionTypeAnnotation": ["types"],
|
||||
"MixedTypeAnnotation": [],
|
||||
"NullableTypeAnnotation": ["typeAnnotation"],
|
||||
"NumberTypeAnnotation": [],
|
||||
"StringLiteralTypeAnnotation": [],
|
||||
|
||||
Reference in New Issue
Block a user