mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
019cf37199
**Related issue:** - https://github.com/microsoft/TypeScript/pull/51865.
1977 lines
47 KiB
JSON
1977 lines
47 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 837,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 12,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 6,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 11,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 144,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 148,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 148,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 158,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 175,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 164,
|
|
"end": 174,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 164,
|
|
"end": 166,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 174,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 168,
|
|
"end": 174,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a3",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 202,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "symbol"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 214,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 214,
|
|
"end": 216,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a4",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 224,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 228,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 228,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 234,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 234,
|
|
"end": 235,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 242,
|
|
"end": 260,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 249,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 252,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 252,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 258,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 261,
|
|
"end": 279,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 271,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 271,
|
|
"end": 273,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a2",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 277,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 280,
|
|
"end": 298,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 297,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 284,
|
|
"end": 287,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra4",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 297,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 292,
|
|
"ctxt": 0
|
|
},
|
|
"value": "",
|
|
"raw": "''"
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 296,
|
|
"end": 297,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 316,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 303,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 303,
|
|
"end": 306,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra5",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 309,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 309,
|
|
"end": 310,
|
|
"ctxt": 0
|
|
},
|
|
"value": 0.0,
|
|
"raw": "0"
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 314,
|
|
"end": 315,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 317,
|
|
"end": 335,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 321,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 321,
|
|
"end": 324,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra6",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 327,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 327,
|
|
"end": 329,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a3",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 333,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 336,
|
|
"end": 354,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 340,
|
|
"end": 353,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 340,
|
|
"end": 343,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ra7",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 346,
|
|
"end": 353,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 346,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a4",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 352,
|
|
"end": 353,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 473,
|
|
"end": 484,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 477,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 477,
|
|
"end": 479,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 479,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 481,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"members": []
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 486,
|
|
"end": 504,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 493,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rb1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 496,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 496,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 501,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b1",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 505,
|
|
"end": 523,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 509,
|
|
"end": 522,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 509,
|
|
"end": 512,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rb2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 515,
|
|
"end": 522,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 515,
|
|
"end": 516,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 520,
|
|
"end": 522,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 534,
|
|
"end": 537,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 541,
|
|
"end": 545,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 541,
|
|
"end": 545,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 542,
|
|
"end": 545,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 544,
|
|
"end": 545,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 544,
|
|
"end": 545,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 525,
|
|
"end": 572,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 547,
|
|
"end": 572,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 553,
|
|
"end": 570,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 557,
|
|
"end": 569,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 557,
|
|
"end": 560,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rb3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 563,
|
|
"end": 569,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 563,
|
|
"end": 564,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 568,
|
|
"end": 569,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 537,
|
|
"end": 540,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 538,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 538,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 583,
|
|
"end": 592,
|
|
"ctxt": 0
|
|
},
|
|
"value": "unionCase",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 599,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 599,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 600,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 602,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 602,
|
|
"end": 603,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 602,
|
|
"end": 603,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 606,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 606,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"value": "U",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 574,
|
|
"end": 634,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 609,
|
|
"end": 634,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 615,
|
|
"end": 632,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 619,
|
|
"end": 631,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 619,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rb4",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 625,
|
|
"end": 631,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 625,
|
|
"end": 626,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 630,
|
|
"end": 631,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 592,
|
|
"end": 598,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 593,
|
|
"end": 594,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 593,
|
|
"end": 594,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
},
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 596,
|
|
"end": 597,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 596,
|
|
"end": 597,
|
|
"ctxt": 0
|
|
},
|
|
"value": "U",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 645,
|
|
"end": 655,
|
|
"ctxt": 0
|
|
},
|
|
"value": "unionCase2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 659,
|
|
"end": 672,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 659,
|
|
"end": 672,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 660,
|
|
"end": 672,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 662,
|
|
"end": 672,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 662,
|
|
"end": 663,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 662,
|
|
"end": 663,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 666,
|
|
"end": 672,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "object"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 636,
|
|
"end": 699,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 674,
|
|
"end": 699,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 680,
|
|
"end": 697,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 684,
|
|
"end": 696,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 684,
|
|
"end": 687,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rb5",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 690,
|
|
"end": 696,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 690,
|
|
"end": 691,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 695,
|
|
"end": 696,
|
|
"ctxt": 0
|
|
},
|
|
"value": "t",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 655,
|
|
"end": 658,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 656,
|
|
"end": 657,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 656,
|
|
"end": 657,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 701,
|
|
"end": 726,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 711,
|
|
"end": 712,
|
|
"ctxt": 0
|
|
},
|
|
"value": "X",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 713,
|
|
"end": 726,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 715,
|
|
"end": 724,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 715,
|
|
"end": 716,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 716,
|
|
"end": 724,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 718,
|
|
"end": 724,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 752,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 737,
|
|
"end": 738,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Y",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 739,
|
|
"end": 752,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 741,
|
|
"end": 750,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 741,
|
|
"end": 742,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 742,
|
|
"end": 750,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 744,
|
|
"end": 750,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 754,
|
|
"end": 768,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 758,
|
|
"end": 767,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 758,
|
|
"end": 760,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 760,
|
|
"end": 767,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 762,
|
|
"end": 767,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 762,
|
|
"end": 763,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 762,
|
|
"end": 763,
|
|
"ctxt": 0
|
|
},
|
|
"value": "X",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 766,
|
|
"end": 767,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 766,
|
|
"end": 767,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Y",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 769,
|
|
"end": 779,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 773,
|
|
"end": 778,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 773,
|
|
"end": 775,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 775,
|
|
"end": 778,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 777,
|
|
"end": 778,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 777,
|
|
"end": 778,
|
|
"ctxt": 0
|
|
},
|
|
"value": "X",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 780,
|
|
"end": 790,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 784,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 784,
|
|
"end": 786,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c3",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 786,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 788,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 788,
|
|
"end": 789,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Y",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 792,
|
|
"end": 810,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 796,
|
|
"end": 809,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 796,
|
|
"end": 799,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rc1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 802,
|
|
"end": 809,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 802,
|
|
"end": 803,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 807,
|
|
"end": 809,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c1",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 811,
|
|
"end": 837,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 815,
|
|
"end": 836,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 815,
|
|
"end": 818,
|
|
"ctxt": 0
|
|
},
|
|
"value": "rc2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 821,
|
|
"end": 836,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 821,
|
|
"end": 822,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "ParenthesisExpression",
|
|
"span": {
|
|
"start": 826,
|
|
"end": 836,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 827,
|
|
"end": 835,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "||",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 827,
|
|
"end": 829,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c2",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 833,
|
|
"end": 835,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c3",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|