Skip to content

Commit

Permalink
fix exportKind declaration in babel-types (#10126)
Browse files Browse the repository at this point in the history
* fix exportKind types declaration for ExportNamedDeclaration and DeclareExportAllDeclaration in babel-types

* revert `let` in exportKind in babel-parser types
  • Loading branch information
zxbodya authored and nicolo-ribaudo committed Jun 25, 2019
1 parent 8f8a457 commit b8bb93a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/babel-types/src/definitions/es2015.js
Expand Up @@ -5,6 +5,7 @@ import defineType, {
chain,
assertEach,
assertOneOf,
validateOptional,
} from "./utils";
import {
functionCommon,
Expand Down Expand Up @@ -260,6 +261,7 @@ defineType("ExportNamedDeclaration", {
validate: assertNodeType("StringLiteral"),
optional: true,
},
exportKind: validateOptional(assertOneOf("type", "value")),
},
});

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-types/src/definitions/flow.js
Expand Up @@ -150,7 +150,7 @@ defineType("DeclareExportAllDeclaration", {
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
fields: {
source: validateType("StringLiteral"),
exportKind: validateOptional(assertOneOf(["type", "value"])),
exportKind: validateOptional(assertOneOf("type", "value")),
},
});

Expand Down

0 comments on commit b8bb93a

Please sign in to comment.