Files
Huáng JùnliàngandGitHub 61bea4ddf5 Fix: always initialize ExportDeclaration attributes (#17164)
* chore: bump eslint and espree

* fix: always initialize ExportDeclaration attributes

* update AST fixtures

* fix: initialize attributes when importAssertions is not enabled

* update AST fixtures

* update test snapshot

* update Makefile.js

* update Babel 8 AST fixtures
2025-03-06 15:29:46 -05:00

67 lines
2.5 KiB
JSON

{
"type": "File",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
"errors": [
"SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (2:6)"
],
"program": {
"type": "Program",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExportNamedDeclaration",
"start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":33}},
"specifiers": [],
"source": null,
"attributes": [],
"declaration": {
"type": "ClassDeclaration",
"start":7,"end":33,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":3,"column":1,"index":33}},
"id": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":14,"index":14},"identifierName":"C"},
"name": "C"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":15,"end":33,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":3,"column":1,"index":33}},
"body": [
{
"type": "ClassProperty",
"start":19,"end":31,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":14,"index":31}},
"static": false,
"key": {
"type": "Identifier",
"start":19,"end":20,"loc":{"start":{"line":2,"column":2,"index":19},"end":{"line":2,"column":3,"index":20},"identifierName":"p"},
"name": "p"
},
"computed": false,
"value": {
"type": "AwaitExpression",
"start":23,"end":30,"loc":{"start":{"line":2,"column":6,"index":23},"end":{"line":2,"column":13,"index":30}},
"argument": {
"type": "NumericLiteral",
"start":29,"end":30,"loc":{"start":{"line":2,"column":12,"index":29},"end":{"line":2,"column":13,"index":30}},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
}
}
]
}
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}