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

874 lines
21 KiB
JSON

{
"type": "Script",
"span": {
"start": 79,
"end": 464,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 79,
"end": 90,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 83,
"end": 89,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 87,
"end": 89,
"ctxt": 0
},
"elements": []
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 100,
"end": 113,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 104,
"end": 112,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 108,
"end": 112,
"ctxt": 0
},
"elements": [
null,
null
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 136,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 123,
"end": 135,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 124,
"end": 128,
"ctxt": 0
}
}
},
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 130,
"end": 134,
"ctxt": 0
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 137,
"end": 168,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 141,
"end": 167,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 145,
"end": 167,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 146,
"end": 155,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 157,
"end": 166,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 170,
"end": 197,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 174,
"end": 196,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 178,
"end": 196,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 183,
"end": 195,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 184,
"end": 188,
"ctxt": 0
}
}
},
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 190,
"end": 194,
"ctxt": 0
}
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 209,
"end": 226,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 213,
"end": 225,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 217,
"end": 225,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 218,
"end": 220,
"ctxt": 0
},
"elements": []
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 222,
"end": 224,
"ctxt": 0
},
"elements": []
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 227,
"end": 260,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 231,
"end": 259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 235,
"end": 259,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 236,
"end": 258,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 237,
"end": 246,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 248,
"end": 257,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 262,
"end": 277,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 266,
"end": 276,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 270,
"end": 276,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 271,
"end": 275,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 272,
"end": 274,
"ctxt": 0
},
"elements": []
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 291,
"end": 321,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 295,
"end": 321,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 299,
"end": 321,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 300,
"end": 308,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 301,
"end": 307,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NullLiteral",
"span": {
"start": 302,
"end": 306,
"ctxt": 0
}
}
}
]
}
}
]
}
},
{
"spread": null,
"expression": {
"type": "ArrayExpression",
"span": {
"start": 309,
"end": 320,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 310,
"end": 319,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 382,
"end": 411,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 386,
"end": 410,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 387,
"end": 398,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 389,
"end": 398,
"ctxt": 0
},
"kind": "undefined"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 401,
"end": 410,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 413,
"end": 425,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 417,
"end": 424,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 421,
"end": 424,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 426,
"end": 440,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 430,
"end": 439,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 430,
"end": 431,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 434,
"end": 439,
"ctxt": 0
},
"elements": [
null,
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 437,
"end": 438,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 441,
"end": 464,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 445,
"end": 463,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 445,
"end": 446,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 449,
"end": 463,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 450,
"end": 459,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}