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

2698 lines
68 KiB
JSON

{
"type": "Script",
"span": {
"start": 110,
"end": 915,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 110,
"end": 149,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "T",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 122,
"end": 149,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 128,
"end": 147,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 130,
"end": 139,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 131,
"end": 139,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 140,
"end": 146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 142,
"end": 146,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 150,
"end": 159,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 154,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 155,
"end": 158,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 160,
"end": 190,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 164,
"end": 189,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 165,
"end": 189,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 167,
"end": 189,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 169,
"end": 187,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 171,
"end": 180,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 172,
"end": 180,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 181,
"end": 187,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 192,
"end": 198,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 192,
"end": 197,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 199,
"end": 205,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 199,
"end": 204,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "t",
"optional": false
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 207,
"end": 248,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"value": "S",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 219,
"end": 248,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 225,
"end": 246,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 228,
"end": 236,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 230,
"end": 236,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 237,
"end": 245,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 239,
"end": 245,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 249,
"end": 258,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 253,
"end": 257,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 254,
"end": 257,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "S",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 259,
"end": 292,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 263,
"end": 291,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 265,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 265,
"end": 291,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 267,
"end": 291,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 269,
"end": 289,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 271,
"end": 280,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 272,
"end": 280,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 274,
"end": 280,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 281,
"end": 289,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 283,
"end": 289,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 293,
"end": 299,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 293,
"end": 298,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 300,
"end": 307,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 300,
"end": 306,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 300,
"end": 301,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "a2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 308,
"end": 314,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 308,
"end": 313,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 315,
"end": 322,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 315,
"end": 321,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 319,
"end": 321,
"ctxt": 0
},
"value": "a2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 324,
"end": 343,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 324,
"end": 342,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 324,
"end": 325,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 328,
"end": 342,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 333,
"end": 340,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 344,
"end": 369,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 344,
"end": 368,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 344,
"end": 345,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 348,
"end": 368,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 353,
"end": 366,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 357,
"end": 360,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 358,
"end": 360,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 354,
"end": 355,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 354,
"end": 355,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 370,
"end": 407,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 370,
"end": 406,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 374,
"end": 406,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 376,
"end": 377,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 379,
"end": 404,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 392,
"end": 404,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 394,
"end": 402,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 401,
"end": 402,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 408,
"end": 443,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 408,
"end": 443,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 412,
"end": 443,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 414,
"end": 415,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 416,
"end": 425,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 416,
"end": 425,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 417,
"end": 425,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 414,
"end": 441,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 427,
"end": 441,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 429,
"end": 439,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 436,
"end": 438,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 444,
"end": 462,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 444,
"end": 462,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 444,
"end": 445,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 448,
"end": 462,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 453,
"end": 460,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 459,
"end": 460,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 463,
"end": 489,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 463,
"end": 488,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 463,
"end": 464,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 467,
"end": 488,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 472,
"end": 486,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 476,
"end": 480,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 477,
"end": 480,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 485,
"end": 486,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 472,
"end": 475,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 490,
"end": 536,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 490,
"end": 536,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 494,
"end": 536,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 496,
"end": 497,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 509,
"end": 518,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 509,
"end": 518,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 510,
"end": 518,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 512,
"end": 518,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 499,
"end": 534,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 520,
"end": 534,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 522,
"end": 532,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 529,
"end": 531,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 548,
"end": 560,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 548,
"end": 559,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 548,
"end": 549,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 552,
"end": 559,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 558,
"end": 559,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 561,
"end": 600,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 561,
"end": 600,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 575,
"end": 584,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 575,
"end": 584,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 576,
"end": 584,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 578,
"end": 584,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 565,
"end": 600,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 586,
"end": 600,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 588,
"end": 598,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 595,
"end": 597,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 601,
"end": 613,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 601,
"end": 612,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 601,
"end": 602,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 605,
"end": 612,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 611,
"end": 612,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 614,
"end": 653,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 614,
"end": 653,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 614,
"end": 615,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 628,
"end": 637,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 628,
"end": 637,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 629,
"end": 637,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 631,
"end": 637,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 618,
"end": 653,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 639,
"end": 653,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 641,
"end": 651,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 648,
"end": 650,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 655,
"end": 695,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 665,
"end": 667,
"ctxt": 0
},
"value": "S2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 668,
"end": 695,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 674,
"end": 693,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 674,
"end": 675,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 676,
"end": 685,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 677,
"end": 685,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 679,
"end": 685,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 686,
"end": 692,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 688,
"end": 692,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 696,
"end": 707,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 700,
"end": 706,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 700,
"end": 702,
"ctxt": 0
},
"value": "s2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 702,
"end": 706,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 704,
"end": 706,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 704,
"end": 706,
"ctxt": 0
},
"value": "S2",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 708,
"end": 739,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 712,
"end": 738,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 712,
"end": 714,
"ctxt": 0
},
"value": "a3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 714,
"end": 738,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 716,
"end": 738,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 718,
"end": 736,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 720,
"end": 729,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 721,
"end": 729,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 723,
"end": 729,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 730,
"end": 736,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 732,
"end": 736,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 760,
"end": 767,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 760,
"end": 766,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 760,
"end": 761,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 764,
"end": 766,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 768,
"end": 775,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 768,
"end": 774,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 768,
"end": 769,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 772,
"end": 774,
"ctxt": 0
},
"value": "a3",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 776,
"end": 797,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 776,
"end": 796,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 776,
"end": 777,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 780,
"end": 796,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 781,
"end": 790,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 782,
"end": 790,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 784,
"end": 790,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 795,
"end": 796,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 798,
"end": 837,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 798,
"end": 837,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 798,
"end": 799,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 812,
"end": 821,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 812,
"end": 821,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 813,
"end": 821,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 815,
"end": 821,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 802,
"end": 837,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 823,
"end": 837,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 825,
"end": 835,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 832,
"end": 834,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 838,
"end": 845,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 838,
"end": 844,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 838,
"end": 839,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 842,
"end": 844,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 846,
"end": 853,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 846,
"end": 852,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 846,
"end": 847,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 850,
"end": 852,
"ctxt": 0
},
"value": "a3",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 854,
"end": 875,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 854,
"end": 874,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 858,
"end": 874,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 859,
"end": 868,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 860,
"end": 868,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 862,
"end": 868,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 873,
"end": 874,
"ctxt": 0
},
"value": 1.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 876,
"end": 915,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 876,
"end": 915,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 876,
"end": 877,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 890,
"end": 899,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 890,
"end": 899,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 891,
"end": 899,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 893,
"end": 899,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 880,
"end": 915,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 901,
"end": 915,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 903,
"end": 913,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 910,
"end": 912,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
}
],
"interpreter": null
}