babel-types: Add missing field, fix incorrect definitions (#6083)

* babel-types: Add missing field, fix incorrect definitions

* Regenerate babel-types readme
This commit is contained in:
Andy
2017-08-09 13:56:19 -07:00
committed by Justin Ridgewell
parent b41fe4efb1
commit a74b307752
2 changed files with 9 additions and 6 deletions

View File

@@ -518,6 +518,9 @@ defineType("Program", {
sourceFile: {
validate: assertValueType("string"),
},
sourceType: {
validate: assertOneOf("script", "module"),
},
directives: {
validate: chain(
assertValueType("array"),
@@ -739,12 +742,12 @@ defineType("TryStatement", {
visitor: ["block", "handler", "finalizer"],
aliases: ["Statement"],
fields: {
body: {
block: {
validate: assertNodeType("BlockStatement"),
},
handler: {
optional: true,
validate: assertNodeType("BlockStatement"),
validate: assertNodeType("CatchClause"),
},
finalizer: {
optional: true,