Skip to content

Commit

Permalink
return validated in validateNode
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed May 6, 2022
1 parent 600393f commit 4b252b5
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 419 deletions.
6 changes: 4 additions & 2 deletions packages/babel-types/scripts/generators/builders.js
Expand Up @@ -124,9 +124,11 @@ import type * as t from "../..";
.join("\n")} };`;

if (builderNames.length > 0) {
output += `\n validateNode(node);`;
output += `\n return validateNode(node);`;
} else {
output += `\n return node;`;
}
output += `\n return node;\n}\n`;
output += `\n}\n`;

if (formatedBuilderNameLocal !== formatedBuilderName) {
output += `export { ${formatedBuilderNameLocal} as ${formatedBuilderName} };\n`;
Expand Down

0 comments on commit 4b252b5

Please sign in to comment.