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

145 lines
3.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 52,
"end": 102,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 52,
"end": 94,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 66,
"end": 94,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 66,
"end": 68,
"ctxt": 0
},
"value": "t1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 68,
"end": 94,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 70,
"end": 94,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsTypeReference",
"span": {
"start": 79,
"end": 94,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 79,
"end": 86,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 86,
"end": 94,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"kind": "number"
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 95,
"end": 102,
"ctxt": 0
},
"expression": {
"type": "BinaryExpression",
"span": {
"start": 95,
"end": 102,
"ctxt": 0
},
"operator": ">=",
"left": {
"type": "Identifier",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"value": "t1",
"optional": false
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
],
"interpreter": null
}