Add support for null literal type
This commit is contained in:
@@ -514,6 +514,11 @@ pp.flowParsePrimaryType = function () {
|
||||
this.next();
|
||||
return this.finishNode(node, "NumericLiteralTypeAnnotation");
|
||||
|
||||
case tt._null:
|
||||
node.value = this.match(tt._null);
|
||||
this.next();
|
||||
return this.finishNode(node, "NullLiteralTypeAnnotation");
|
||||
|
||||
default:
|
||||
if (this.state.type.keyword === "typeof") {
|
||||
return this.flowParseTypeofType();
|
||||
|
||||
Reference in New Issue
Block a user