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

166 lines
3.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 24,
"end": 69,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 24,
"end": 37,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 28,
"end": 36,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 29,
"end": 36,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 31,
"end": 36,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"kind": "any"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 39,
"end": 69,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 43,
"end": 68,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AssignmentExpression",
"span": {
"start": 47,
"end": 68,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 51,
"end": 68,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 52,
"end": 61,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 63,
"end": 67,
"ctxt": 0
}
}
}
]
}
},
"definite": false
}
]
}
],
"interpreter": null
}