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

214 lines
4.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 75,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 9,
"end": 11,
"ctxt": 0
},
"value": 20.0,
"raw": "20"
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 13,
"end": 33,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 17,
"end": 32,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 21,
"end": 32,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 26,
"end": 32,
"ctxt": 0
},
"kind": "string"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 34,
"end": 51,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 38,
"end": 50,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 38,
"end": 40,
"ctxt": 0
},
"value": "as",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 43,
"end": 50,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 52,
"end": 75,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 56,
"end": 74,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"value": "as1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 62,
"end": 74,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "as",
"optional": false
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 68,
"end": 74,
"ctxt": 0
},
"kind": "string"
}
},
"definite": false
}
]
}
],
"interpreter": null
}