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

70 lines
1.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 21,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 21,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4,
"end": 20,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 8,
"end": 20,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 8,
"end": 10,
"ctxt": 0
},
"value": 23.0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 14,
"end": 20,
"ctxt": 0
},
"kind": "string"
}
},
"definite": false
}
]
}
],
"interpreter": null
}