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

564 lines
14 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 51,
"end": 402,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 51,
"end": 100,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 100,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 57,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 60,
"end": 100,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 72,
"end": 76,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 83,
"end": 86,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 88,
"end": 97,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 104,
"end": 196,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 108,
"end": 196,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 108,
"end": 110,
"ctxt": 0
},
"value": "y1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 113,
"end": 196,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 120,
"end": 123,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 125,
"end": 129,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 136,
"end": 139,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 141,
"end": 193,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 157,
"end": 161,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 172,
"end": 175,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 177,
"end": 186,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 228,
"end": 257,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 232,
"end": 256,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "u",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 233,
"end": 244,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 235,
"end": 244,
"ctxt": 0
},
"kind": "undefined"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 247,
"end": 256,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 259,
"end": 278,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 263,
"end": 277,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 266,
"end": 270,
"ctxt": 0
},
"kind": "null"
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 273,
"end": 277,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 282,
"end": 320,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 286,
"end": 320,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 286,
"end": 288,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 291,
"end": 320,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 298,
"end": 301,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 311,
"end": 314,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 324,
"end": 402,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 328,
"end": 402,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 328,
"end": 330,
"ctxt": 0
},
"value": "y2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 333,
"end": 402,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 345,
"end": 346,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 358,
"end": 399,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 369,
"end": 372,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 386,
"end": 389,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 391,
"end": 392,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}