ast-types
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -16,2 +16,6 @@ module.exports = function (fork) { | ||
def("EmptyTypeAnnotation") | ||
.bases("Type") | ||
.build(); | ||
def("MixedTypeAnnotation") | ||
@@ -72,3 +76,3 @@ .bases("Type") | ||
.build(); | ||
def("ThisTypeAnnotation") | ||
@@ -81,3 +85,7 @@ .bases("Type") | ||
.build(); | ||
def("ExistentialTypeParam") | ||
.bases("Type") | ||
.build(); | ||
def("FunctionTypeAnnotation") | ||
@@ -110,3 +118,4 @@ .bases("Type") | ||
[def("ObjectTypeCallProperty")], | ||
defaults.emptyArray); | ||
defaults.emptyArray) | ||
.field("exact", Boolean, defaults["false"]); | ||
@@ -118,3 +127,6 @@ def("ObjectTypeProperty") | ||
.field("value", def("Type")) | ||
.field("optional", Boolean); | ||
.field("optional", Boolean) | ||
.field("variance", | ||
or("plus", "minus", null), | ||
defaults["null"]); | ||
@@ -126,3 +138,6 @@ def("ObjectTypeIndexer") | ||
.field("key", def("Type")) | ||
.field("value", def("Type")); | ||
.field("value", def("Type")) | ||
.field("variance", | ||
or("plus", "minus", null), | ||
defaults["null"]); | ||
@@ -195,3 +210,3 @@ def("ObjectTypeCallProperty") | ||
defaults["null"]); | ||
def("Function") | ||
@@ -209,3 +224,6 @@ .field("returnType", | ||
.field("typeAnnotation", or(def("TypeAnnotation"), null)) | ||
.field("static", Boolean, defaults["false"]); | ||
.field("static", Boolean, defaults["false"]) | ||
.field("variance", | ||
or("plus", "minus", null), | ||
defaults["null"]); | ||
@@ -279,2 +297,7 @@ def("ClassImplements") | ||
def("DeclareModuleExports") | ||
.bases("Statement") | ||
.build("typeAnnotation") | ||
.field("typeAnnotation", def("Type")); | ||
def("DeclareExportDeclaration") | ||
@@ -299,2 +322,2 @@ .bases("Declaration") | ||
), defaults["null"]); | ||
}; | ||
}; |
@@ -234,3 +234,4 @@ var hasOwn = Object.prototype.hasOwnProperty; | ||
} else if (namedTypes.FunctionDeclaration.check(node)) { | ||
} else if (namedTypes.FunctionDeclaration.check(node) && | ||
node.id !== null) { | ||
addPattern(path.get("id"), bindings); | ||
@@ -349,4 +350,4 @@ | ||
}; | ||
return Scope; | ||
}; |
@@ -684,3 +684,3 @@ var Ap = Array.prototype; | ||
return object[fieldName]; | ||
return object && object[fieldName]; | ||
} | ||
@@ -687,0 +687,0 @@ exports.getFieldValue = getFieldValue; |
@@ -15,3 +15,4 @@ module.exports = require('./fork')([ | ||
require("./def/esprima"), | ||
require("./def/babel") | ||
]); | ||
require("./def/babel"), | ||
require("./def/babel6") | ||
]); |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"homepage": "http://github.com/benjamn/ast-types", | ||
@@ -36,5 +36,6 @@ "repository": { | ||
"babel-core": "^5.6.15", | ||
"espree": "^3.1.7", | ||
"esprima": "~1.2.2", | ||
"esprima-fb": "~14001.1.0-dev-harmony-fb", | ||
"mocha": "~2.5.3" | ||
"mocha": "~3.1.1" | ||
}, | ||
@@ -41,0 +42,0 @@ "engines": { |
155218
24
3526
5