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

2544 lines
63 KiB
JSON

{
"type": "Script",
"span": {
"start": 74,
"end": 1357,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "X",
"optional": false
},
"declare": false,
"span": {
"start": 74,
"end": 140,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 84,
"end": 99,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 84,
"end": 93,
"ctxt": 0
},
"value": "propertyX",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 93,
"end": 98,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 100,
"end": 119,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 100,
"end": 110,
"ctxt": 0
},
"value": "propertyX1",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 110,
"end": 118,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 112,
"end": 118,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 120,
"end": 138,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 120,
"end": 130,
"ctxt": 0
},
"value": "propertyX2",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 130,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 132,
"end": 138,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 142,
"end": 181,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 162,
"end": 179,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 162,
"end": 171,
"ctxt": 0
},
"value": "propertyA",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 171,
"end": 179,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 173,
"end": 179,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "X",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 183,
"end": 222,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 203,
"end": 220,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 203,
"end": 212,
"ctxt": 0
},
"value": "propertyB",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 212,
"end": 220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 214,
"end": 220,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "X",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 225,
"end": 234,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 229,
"end": 233,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 230,
"end": 233,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 235,
"end": 244,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 239,
"end": 243,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 240,
"end": 243,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 245,
"end": 254,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 249,
"end": 253,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 250,
"end": 253,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 328,
"end": 341,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 328,
"end": 340,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 328,
"end": 332,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "x",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 342,
"end": 369,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 346,
"end": 368,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 346,
"end": 353,
"ctxt": 0
},
"value": "result1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 356,
"end": 368,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 356,
"end": 360,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"value": "x",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 402,
"end": 416,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 402,
"end": 415,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 402,
"end": 406,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 409,
"end": 411,
"ctxt": 0
},
"properties": []
},
"alternate": {
"type": "NumericLiteral",
"span": {
"start": 414,
"end": 415,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 417,
"end": 457,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 417,
"end": 456,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 417,
"end": 421,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 424,
"end": 432,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 426,
"end": 427,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 429,
"end": 430,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 435,
"end": 456,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 437,
"end": 438,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 446,
"end": 454,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 458,
"end": 486,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 462,
"end": 485,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 462,
"end": 469,
"ctxt": 0
},
"value": "result2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 472,
"end": 485,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 472,
"end": 476,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 479,
"end": 481,
"ctxt": 0
},
"properties": []
},
"alternate": {
"type": "NumericLiteral",
"span": {
"start": 484,
"end": 485,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 487,
"end": 541,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 491,
"end": 540,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 491,
"end": 498,
"ctxt": 0
},
"value": "result3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 501,
"end": 540,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 501,
"end": 505,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 508,
"end": 516,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 510,
"end": 511,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 513,
"end": 514,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 519,
"end": 540,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 521,
"end": 522,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 524,
"end": 525,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 527,
"end": 528,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 530,
"end": 538,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 564,
"end": 597,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 568,
"end": 596,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 568,
"end": 578,
"ctxt": 0
},
"value": "resultIsX1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 578,
"end": 581,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 584,
"end": 596,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 584,
"end": 588,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 591,
"end": 592,
"ctxt": 0
},
"value": "x",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 598,
"end": 674,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 602,
"end": 673,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 602,
"end": 609,
"ctxt": 0
},
"value": "result4",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 609,
"end": 624,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 611,
"end": 624,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 612,
"end": 616,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 613,
"end": 616,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 615,
"end": 616,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 615,
"end": 616,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 618,
"end": 624,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 621,
"end": 624,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 627,
"end": 673,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 627,
"end": 631,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ArrowFunctionExpression",
"span": {
"start": 634,
"end": 652,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 641,
"end": 652,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 641,
"end": 642,
"ctxt": 0
},
"value": "m",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 643,
"end": 652,
"ctxt": 0
},
"value": "propertyX",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 655,
"end": 673,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 662,
"end": 673,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"value": "n",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 664,
"end": 673,
"ctxt": 0
},
"value": "propertyA",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 748,
"end": 761,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 748,
"end": 760,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 748,
"end": 752,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 755,
"end": 756,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 759,
"end": 760,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 762,
"end": 789,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 766,
"end": 788,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 766,
"end": 773,
"ctxt": 0
},
"value": "result5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 776,
"end": 788,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 776,
"end": 780,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 783,
"end": 784,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 787,
"end": 788,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 822,
"end": 836,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 822,
"end": 835,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 822,
"end": 826,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "NumericLiteral",
"span": {
"start": 829,
"end": 830,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 833,
"end": 835,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 837,
"end": 877,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 837,
"end": 876,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 837,
"end": 841,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 844,
"end": 865,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 846,
"end": 847,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 849,
"end": 850,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 852,
"end": 853,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 855,
"end": 863,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
]
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 868,
"end": 876,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 870,
"end": 871,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 873,
"end": 874,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 878,
"end": 906,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 882,
"end": 905,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 882,
"end": 889,
"ctxt": 0
},
"value": "result6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 892,
"end": 905,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 892,
"end": 896,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "NumericLiteral",
"span": {
"start": 899,
"end": 900,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 903,
"end": 905,
"ctxt": 0
},
"properties": []
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 907,
"end": 961,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 911,
"end": 960,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 911,
"end": 918,
"ctxt": 0
},
"value": "result7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 921,
"end": 960,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 921,
"end": 925,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ObjectExpression",
"span": {
"start": 928,
"end": 949,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 930,
"end": 931,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 933,
"end": 934,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 936,
"end": 937,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 939,
"end": 947,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
]
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 952,
"end": 960,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 954,
"end": 955,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 957,
"end": 958,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 984,
"end": 1017,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 988,
"end": 1016,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 988,
"end": 998,
"ctxt": 0
},
"value": "resultIsX2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 998,
"end": 1001,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1000,
"end": 1001,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1000,
"end": 1001,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 1004,
"end": 1016,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 1004,
"end": 1008,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 1011,
"end": 1012,
"ctxt": 0
},
"value": "x",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 1015,
"end": 1016,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1018,
"end": 1094,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1022,
"end": 1093,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1022,
"end": 1029,
"ctxt": 0
},
"value": "result8",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1029,
"end": 1044,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1031,
"end": 1044,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1032,
"end": 1036,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1033,
"end": 1036,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1035,
"end": 1036,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1035,
"end": 1036,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1038,
"end": 1044,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1041,
"end": 1044,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 1047,
"end": 1093,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 1047,
"end": 1051,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1054,
"end": 1072,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1055,
"end": 1056,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 1061,
"end": 1072,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1061,
"end": 1062,
"ctxt": 0
},
"value": "m",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1063,
"end": 1072,
"ctxt": 0
},
"value": "propertyA",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1075,
"end": 1093,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1076,
"end": 1077,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 1082,
"end": 1093,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1082,
"end": 1083,
"ctxt": 0
},
"value": "n",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1084,
"end": 1093,
"ctxt": 0
},
"value": "propertyX",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1171,
"end": 1204,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1175,
"end": 1203,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1175,
"end": 1185,
"ctxt": 0
},
"value": "resultIsX3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1185,
"end": 1188,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1187,
"end": 1188,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1187,
"end": 1188,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 1191,
"end": 1203,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 1191,
"end": 1195,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "Identifier",
"span": {
"start": 1198,
"end": 1199,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "Identifier",
"span": {
"start": 1202,
"end": 1203,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1205,
"end": 1284,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1209,
"end": 1283,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1209,
"end": 1217,
"ctxt": 0
},
"value": "result10",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1217,
"end": 1232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1219,
"end": 1232,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1220,
"end": 1224,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1221,
"end": 1224,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1223,
"end": 1224,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1223,
"end": 1224,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1226,
"end": 1232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1229,
"end": 1232,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 1235,
"end": 1283,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 1235,
"end": 1239,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1242,
"end": 1261,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1243,
"end": 1244,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 1249,
"end": 1261,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1249,
"end": 1250,
"ctxt": 0
},
"value": "m",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1251,
"end": 1261,
"ctxt": 0
},
"value": "propertyX1",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"alternate": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1264,
"end": 1283,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1265,
"end": 1266,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 1271,
"end": 1283,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1271,
"end": 1272,
"ctxt": 0
},
"value": "n",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1273,
"end": 1283,
"ctxt": 0
},
"value": "propertyX2",
"optional": false
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1317,
"end": 1357,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1321,
"end": 1356,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1321,
"end": 1329,
"ctxt": 0
},
"value": "result11",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1329,
"end": 1334,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1331,
"end": 1334,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "ConditionalExpression",
"span": {
"start": 1337,
"end": 1356,
"ctxt": 0
},
"test": {
"type": "BooleanLiteral",
"span": {
"start": 1337,
"end": 1341,
"ctxt": 0
},
"value": true
},
"consequent": {
"type": "NumericLiteral",
"span": {
"start": 1344,
"end": 1345,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"alternate": {
"type": "StringLiteral",
"span": {
"start": 1348,
"end": 1356,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
},
"definite": false
}
]
}
],
"interpreter": null
}