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

166 lines
3.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 68,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 36,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 27,
"end": 35,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 28,
"end": 35,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 30,
"end": 35,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 31,
"end": 34,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 31,
"end": 34,
"ctxt": 0
},
"kind": "any"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 38,
"end": 68,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 42,
"end": 67,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AssignmentExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 46,
"end": 67,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 50,
"end": 67,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 60,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 62,
"end": 66,
"ctxt": 0
}
}
}
]
}
},
"definite": false
}
]
}
],
"interpreter": null
}