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,
|
chain,
|
||||||
assertEach,
|
assertEach,
|
||||||
assertOneOf,
|
assertOneOf,
|
||||||
|
validateOptional,
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
import {
|
import {
|
||||||
functionCommon,
|
functionCommon,
|
||||||
@ -260,6 +261,7 @@ defineType("ExportNamedDeclaration", {
|
|||||||
validate: assertNodeType("StringLiteral"),
|
validate: assertNodeType("StringLiteral"),
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
exportKind: validateOptional(assertOneOf("type", "value")),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -150,7 +150,7 @@ defineType("DeclareExportAllDeclaration", {
|
|||||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||||
fields: {
|
fields: {
|
||||||
source: validateType("StringLiteral"),
|
source: validateType("StringLiteral"),
|
||||||
exportKind: validateOptional(assertOneOf(["type", "value"])),
|
exportKind: validateOptional(assertOneOf("type", "value")),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user