swc/crates/swc_ecma_parser/tests/tsc/FunctionDeclaration13_es6.json

106 lines
2.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 99,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 30,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 16,
"end": 99,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 33,
"end": 99,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 84,
"end": 97,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 88,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 89,
"end": 96,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"value": "yield",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}