Add support for flow's SymbolTypeAnnotation (#11077)

This commit is contained in:
Brian Ng
2020-03-16 17:00:17 -05:00
committed by GitHub
parent 2bce1e5e20
commit 4f394e30d2
14 changed files with 291 additions and 2 deletions

View File

@@ -1333,6 +1333,9 @@ export default (superClass: Class<Parser>): Class<Parser> =>
case "string":
return this.finishNode(node, "StringTypeAnnotation");
case "symbol":
return this.finishNode(node, "SymbolTypeAnnotation");
default:
this.checkNotUnderscore(id.name);
return this.flowParseGenericType(startPos, startLoc, id);