swc/crates/swc_ecma_parser/tests/tsc/validVoidValues.json
2022-02-04 20:17:42 +09:00

135 lines
2.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 37,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 12,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 5,
"end": 11,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"kind": "void"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 13,
"end": 27,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 13,
"end": 26,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 17,
"end": 26,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 28,
"end": 37,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 28,
"end": 36,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NullLiteral",
"span": {
"start": 32,
"end": 36,
"ctxt": 0
}
}
}
}
],
"interpreter": null
}