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

188 lines
3.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
2022-02-04 14:17:42 +03:00
"end": 43,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 13,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 4,
"end": 12,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BooleanLiteral",
"span": {
"start": 8,
"end": 12,
"ctxt": 0
},
"value": true
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 14,
"end": 29,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 18,
"end": 28,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 18,
"end": 19,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 19,
"end": 28,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 21,
"end": 28,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 21,
"end": 28,
"ctxt": 0
},
"value": "Boolean",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 30,
"end": 36,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 30,
"end": 35,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 37,
"end": 43,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 37,
"end": 42,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 41,
"end": 42,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
],
"interpreter": null
}