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

230 lines
5.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 60,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 14,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 13,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 6,
"end": 13,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 8,
"end": 13,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"kind": "any"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 46,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 45,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AssignmentExpression",
"span": {
"start": 24,
"end": 45,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 28,
"end": 45,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 29,
"end": 38,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 40,
"end": 44,
"ctxt": 0
}
}
}
]
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 47,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 47,
"end": 59,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 51,
"end": 59,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 52,
"end": 54,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 56,
"end": 58,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
}
}
}
],
"interpreter": null
}