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

106 lines
2.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 100,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 28,
"end": 31,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 17,
"end": 100,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 34,
"end": 100,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 85,
"end": 98,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 89,
"end": 97,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 90,
"end": 97,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 92,
"end": 97,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 92,
"end": 97,
"ctxt": 0
},
"value": "yield",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"generator": true,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}