fix exportKind declaration in babel-types (#10126)
* fix exportKind types declaration for ExportNamedDeclaration and DeclareExportAllDeclaration in babel-types * revert `let` in exportKind in babel-parser types
This commit is contained in:
parent
8f8a457798
commit
b8bb93a838
@ -5,6 +5,7 @@ import defineType, {
|
||||
chain,
|
||||
assertEach,
|
||||
assertOneOf,
|
||||
validateOptional,
|
||||
} from "./utils";
|
||||
import {
|
||||
functionCommon,
|
||||
@ -260,6 +261,7 @@ defineType("ExportNamedDeclaration", {
|
||||
validate: assertNodeType("StringLiteral"),
|
||||
optional: true,
|
||||
},
|
||||
exportKind: validateOptional(assertOneOf("type", "value")),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -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")),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user