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

113 lines
2.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 37,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 17,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4,
"end": 16,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 5,
"end": 16,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 7,
"end": 16,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 7,
"end": 16,
"ctxt": 0
},
"value": "Undefined",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 19,
"end": 37,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 23,
"end": 36,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 27,
"end": 36,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
}
],
"interpreter": null
}