Add support for this type to Babel 6.x

This commit is contained in:
Sam Goldman
2015-12-23 13:54:57 -05:00
parent ae8b7ea352
commit 32c03222bf
7 changed files with 225 additions and 0 deletions

View File

@@ -519,6 +519,11 @@ pp.flowParsePrimaryType = function () {
this.next();
return this.finishNode(node, "NullLiteralTypeAnnotation");
case tt._this:
node.value = this.match(tt._this);
this.next();
return this.finishNode(node, "ThisTypeAnnotation");
default:
if (this.state.type.keyword === "typeof") {
return this.flowParseTypeofType();