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.6 KiB
JSON

{
"type": "File",
"start":0,"end":45,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":15,"index":45}},
"program": {
"type": "Program",
"start":0,"end":45,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":15,"index":45}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "DeclareFunction",
"start":0,"end":29,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":29,"index":29}},
"id": {
"type": "Identifier",
"start":17,"end":28,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":28,"index":28},"identifierName":"foo"},
"name": "foo",
"typeAnnotation": {
"type": "TypeAnnotation",
"start":20,"end":28,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":28,"index":28}},
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"start":20,"end":28,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":28,"index":28}},
"typeParameters": null,
"params": [],
"rest": null,
"this": null,
"returnType": {
"type": "VoidTypeAnnotation",
"start":24,"end":28,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":28,"index":28}}
}
}
}
},
"predicate": null
},
{
"type": "ExportNamedDeclaration",
"start":30,"end":45,"loc":{"start":{"line":2,"column":0,"index":30},"end":{"line":2,"column":15,"index":45}},
"exportKind": "value",
"specifiers": [
{
"type": "ExportSpecifier",
"start":39,"end":42,"loc":{"start":{"line":2,"column":9,"index":39},"end":{"line":2,"column":12,"index":42}},
"local": {
"type": "Identifier",
"start":39,"end":42,"loc":{"start":{"line":2,"column":9,"index":39},"end":{"line":2,"column":12,"index":42},"identifierName":"foo"},
"name": "foo"
},
"exported": {
"type": "Identifier",
"start":39,"end":42,"loc":{"start":{"line":2,"column":9,"index":39},"end":{"line":2,"column":12,"index":42},"identifierName":"foo"},
"name": "foo"
}
}
],
"source": null,
"declaration": null,
"attributes": []
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}