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

564 lines
14 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 50,
"end": 372,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 50,
"end": 96,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 54,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 56,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 59,
"end": 96,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 70,
"end": 74,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 85,
"end": 94,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 98,
"end": 184,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 102,
"end": 184,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"value": "y1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 107,
"end": 184,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 118,
"end": 122,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 133,
"end": 182,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 148,
"end": 152,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 162,
"end": 165,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 167,
"end": 176,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 212,
"end": 241,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 216,
"end": 240,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "u",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 217,
"end": 228,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 219,
"end": 228,
"ctxt": 0
},
"kind": "undefined"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 231,
"end": 240,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 242,
"end": 261,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 246,
"end": 260,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 247,
"end": 253,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 249,
"end": 253,
"ctxt": 0
},
"kind": "null"
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 256,
"end": 260,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 263,
"end": 298,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 267,
"end": 298,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 267,
"end": 269,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 272,
"end": 298,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 278,
"end": 281,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 290,
"end": 293,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 300,
"end": 372,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 304,
"end": 372,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "y2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 309,
"end": 372,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 332,
"end": 370,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 342,
"end": 345,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 358,
"end": 361,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}