diff --git a/packages/babel-types/README.md b/packages/babel-types/README.md index b65b4d950e..5d601481fa 100644 --- a/packages/babel-types/README.md +++ b/packages/babel-types/README.md @@ -321,7 +321,7 @@ See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`. Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method` - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `key`: if computed then `Expression` else `Identifier | Literal` (required) - `params`: `Array` (required) - `body`: `BlockStatement` (required) - `computed`: `boolean` (default: `false`) @@ -407,6 +407,34 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` --- +### declareExportAllDeclaration +```javascript +t.declareExportAllDeclaration(source) +``` + +See also `t.isDeclareExportAllDeclaration(node, opts)` and `t.assertDeclareExportAllDeclaration(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `source` (required) + +--- + +### declareExportDeclaration +```javascript +t.declareExportDeclaration(declaration, specifiers, source) +``` + +See also `t.isDeclareExportDeclaration(node, opts)` and `t.assertDeclareExportDeclaration(node, opts)`. + +Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` + + - `declaration` (required) + - `specifiers` (required) + - `source` (required) + +--- + ### declareFunction ```javascript t.declareFunction(id) @@ -832,7 +860,7 @@ See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. Aliases: `Expression`, `LVal` - - `name``string` (required) + - `name`: `string` (required) - `decorators`: `Array` (default: `null`) - `typeAnnotation` (default: `null`) @@ -1165,7 +1193,7 @@ See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, Aliases: `Expression`, `LVal` - `object`: `Expression` (required) - - `property`if computed then `Expression` else `Identifier` (required) + - `property`: if computed then `Expression` else `Identifier` (required) - `computed`: `boolean` (default: `false`) --- @@ -1317,7 +1345,7 @@ See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`. Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember` - `kind`: `"method" | "get" | "set"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `key`: if computed then `Expression` else `Identifier | Literal` (required) - `params` (required) - `body`: `BlockStatement` (required) - `computed`: `boolean` (default: `false`) @@ -1353,7 +1381,7 @@ See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts Aliases: `UserWhitespacable`, `Property`, `ObjectMember` - - `key`if computed then `Expression` else `Identifier | Literal` (required) + - `key`: if computed then `Expression` else `Identifier | Literal` (required) - `value`: `Expression | Pattern | RestElement` (required) - `computed`: `boolean` (default: `false`) - `shorthand`: `boolean` (default: `false`) diff --git a/scripts/generate-babel-types-docs.js b/scripts/generate-babel-types-docs.js index 3f0d70e32c..f1482dc1a8 100644 --- a/scripts/generate-babel-types-docs.js +++ b/scripts/generate-babel-types-docs.js @@ -118,7 +118,7 @@ Object.keys(types.BUILDER_KEYS).sort().forEach(function(key) { const fieldDescription = ["`" + field + "`"]; const validator = types.NODE_FIELDS[key][field].validate; if (customTypes[key] && customTypes[key][field]) { - fieldDescription.push(customTypes[key][field]); + fieldDescription.push(`: ${customTypes[key][field]}`); } else if (validator) { try { fieldDescription.push(": `" + getType(validator) + "`");