Make assertions optional and update AST spec (#12280)
This commit is contained in:
parent
f5f9f51b5e
commit
ff6c3792bb
@ -1412,6 +1412,7 @@ An export default declaration, e.g., `export default function () {};` or `export
|
||||
interface ExportAllDeclaration <: ModuleDeclaration {
|
||||
type: "ExportAllDeclaration";
|
||||
source: StringLiteral;
|
||||
assertions?: [ ImportAttribute ];
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -1402,6 +1402,7 @@ defineType("ExportAllDeclaration", {
|
||||
validate: assertNodeType("StringLiteral"),
|
||||
},
|
||||
assertions: {
|
||||
optional: true,
|
||||
validate: chain(
|
||||
assertValueType("array"),
|
||||
assertNodeType("ImportAttribute"),
|
||||
@ -1471,6 +1472,7 @@ defineType("ExportNamedDeclaration", {
|
||||
),
|
||||
},
|
||||
assertions: {
|
||||
optional: true,
|
||||
validate: chain(
|
||||
assertValueType("array"),
|
||||
assertNodeType("ImportAttribute"),
|
||||
@ -1572,6 +1574,7 @@ defineType("ImportDeclaration", {
|
||||
aliases: ["Statement", "Declaration", "ModuleDeclaration"],
|
||||
fields: {
|
||||
assertions: {
|
||||
optional: true,
|
||||
validate: chain(
|
||||
assertValueType("array"),
|
||||
assertNodeType("ImportAttribute"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user