swc/crates/swc_ecma_parser/tests/tsc/objectLiteralWidened.json
2022-02-04 20:17:42 +09:00

564 lines
14 KiB
JSON

{
"type": "Script",
"span": {
"start": 49,
"end": 371,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 49,
"end": 95,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 53,
"end": 95,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 53,
"end": 55,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 58,
"end": 95,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 64,
"end": 67,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 69,
"end": 73,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 82,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 84,
"end": 93,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 97,
"end": 183,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 101,
"end": 183,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"value": "y1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 106,
"end": 183,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 117,
"end": 121,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 127,
"end": 130,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 132,
"end": 181,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 142,
"end": 145,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "NullLiteral",
"span": {
"start": 147,
"end": 151,
"ctxt": 0
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 161,
"end": 164,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 166,
"end": 175,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 211,
"end": 240,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 215,
"end": 239,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "u",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 216,
"end": 227,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 218,
"end": 227,
"ctxt": 0
},
"kind": "undefined"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 230,
"end": 239,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 241,
"end": 260,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 245,
"end": 259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 245,
"end": 246,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 246,
"end": 252,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 248,
"end": 252,
"ctxt": 0
},
"kind": "null"
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 255,
"end": 259,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 262,
"end": 297,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 266,
"end": 297,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 266,
"end": 268,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 271,
"end": 297,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 277,
"end": 280,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 289,
"end": 292,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 299,
"end": 371,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 303,
"end": 371,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 303,
"end": 305,
"ctxt": 0
},
"value": "y2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 308,
"end": 371,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 314,
"end": 317,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 326,
"end": 329,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 331,
"end": 369,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 341,
"end": 344,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 357,
"end": 360,
"ctxt": 0
},
"value": "boo",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 362,
"end": 363,
"ctxt": 0
},
"value": "u",
"optional": false
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}