-
-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Labels
Description
Within the AST, exported functions do not contain an exported flag.
Example
this code
export function foo() { }turns into this AST:
{
"type": "Program",
"start": 0,
"end": 24,
"sourceType": {
"language": {
"typeScript": {
"isDefinitionFile": false
}
},
"moduleKind": "module",
"variant": "jsx",
"alwaysStrict": false
},
"directives": [],
"hashbang": null,
"body": [
{
"type": "ExportNamedDeclaration",
"start": 0,
"end": 24,
"declaration": {
"type": "FunctionDeclaration",
"start": 7,
"end": 24,
"id": {
"type": "BindingIdentifier",
"start": 16,
"end": 19,
"name": "foo"
},
"expression": false,
"generator": false,
"async": false,
"params": {
"type": "FormalParameters",
"start": 19,
"end": 21,
"kind": "FormalParameter",
"items": [],
"rest": null
},
"body": {
"type": "FunctionBody",
"start": 22,
"end": 24,
"directives": [],
"statements": []
},
"typeParameters": null,
"returnType": null,
"modifiers": []
},
"specifiers": [],
"source": null,
"export_kind": {
"type": "value"
}
}
]
}Notice how modifiers is empty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
None yet