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

2707 lines
68 KiB
JSON

{
"type": "Script",
"span": {
"start": 111,
"end": 916,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 111,
"end": 150,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"value": "T",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 123,
"end": 150,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 129,
"end": 148,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 131,
"end": 140,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 140,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 134,
"end": 140,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 143,
"end": 147,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 151,
"end": 160,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 161,
"end": 191,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 165,
"end": 190,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 166,
"end": 190,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 168,
"end": 190,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 170,
"end": 188,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 172,
"end": 181,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 173,
"end": 181,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 175,
"end": 181,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 184,
"end": 188,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 193,
"end": 199,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 193,
"end": 198,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 197,
"end": 198,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 200,
"end": 205,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 204,
"end": 205,
"ctxt": 0
},
"value": "t",
"optional": false
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 208,
"end": 249,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "S",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 220,
"end": 249,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 226,
"end": 247,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 228,
"end": 237,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 229,
"end": 237,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 231,
"end": 237,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 238,
"end": 246,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 240,
"end": 246,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 250,
"end": 259,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 254,
"end": 258,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 254,
"end": 255,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 255,
"end": 258,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"value": "S",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 260,
"end": 293,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 264,
"end": 292,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 264,
"end": 266,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 266,
"end": 292,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 268,
"end": 292,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 270,
"end": 290,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 272,
"end": 281,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 273,
"end": 281,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 275,
"end": 281,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 282,
"end": 290,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 294,
"end": 300,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 294,
"end": 299,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 301,
"end": 308,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 301,
"end": 307,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 305,
"end": 307,
"ctxt": 0
},
"value": "a2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 309,
"end": 315,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 309,
"end": 310,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 316,
"end": 323,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 316,
"end": 322,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 320,
"end": 322,
"ctxt": 0
},
"value": "a2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 325,
"end": 344,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 325,
"end": 343,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 329,
"end": 343,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 331,
"end": 332,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 334,
"end": 341,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 340,
"end": 341,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 345,
"end": 370,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 345,
"end": 369,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 345,
"end": 346,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 349,
"end": 369,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 351,
"end": 352,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 354,
"end": 367,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 358,
"end": 361,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 359,
"end": 361,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 366,
"end": 367,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 354,
"end": 357,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 371,
"end": 408,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 371,
"end": 407,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 371,
"end": 372,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 375,
"end": 407,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 380,
"end": 405,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 393,
"end": 405,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 395,
"end": 403,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 402,
"end": 403,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 409,
"end": 444,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 409,
"end": 444,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 409,
"end": 410,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 413,
"end": 444,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 415,
"end": 416,
"ctxt": 0
},
"value": "f",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 417,
"end": 426,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 417,
"end": 426,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 418,
"end": 426,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 420,
"end": 426,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 415,
"end": 442,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 428,
"end": 442,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 430,
"end": 440,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 437,
"end": 439,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 445,
"end": 463,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 445,
"end": 463,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 445,
"end": 446,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 449,
"end": 463,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 454,
"end": 461,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 464,
"end": 490,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 464,
"end": 489,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 468,
"end": 489,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 473,
"end": 487,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 477,
"end": 481,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 478,
"end": 481,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 480,
"end": 481,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 480,
"end": 481,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 486,
"end": 487,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 473,
"end": 476,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 474,
"end": 475,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 474,
"end": 475,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 491,
"end": 537,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 491,
"end": 537,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 495,
"end": 537,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 510,
"end": 519,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 510,
"end": 519,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 511,
"end": 519,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 513,
"end": 519,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 500,
"end": 535,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 521,
"end": 535,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 523,
"end": 533,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 549,
"end": 561,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 549,
"end": 560,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 553,
"end": 560,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 559,
"end": 560,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 562,
"end": 601,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 562,
"end": 601,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 562,
"end": 563,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 576,
"end": 585,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 576,
"end": 585,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 577,
"end": 585,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 579,
"end": 585,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 566,
"end": 601,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 587,
"end": 601,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 589,
"end": 599,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 596,
"end": 598,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 602,
"end": 614,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 602,
"end": 613,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 602,
"end": 603,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 606,
"end": 613,
"ctxt": 0
},
"params": [],
"body": {
"type": "NumericLiteral",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 615,
"end": 654,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 615,
"end": 654,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 615,
"end": 616,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 629,
"end": 638,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 629,
"end": 638,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 630,
"end": 638,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 632,
"end": 638,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 619,
"end": 654,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 640,
"end": 654,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 642,
"end": 652,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 656,
"end": 696,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 666,
"end": 668,
"ctxt": 0
},
"value": "S2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 669,
"end": 696,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 675,
"end": 694,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 675,
"end": 676,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 677,
"end": 686,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 678,
"end": 686,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 680,
"end": 686,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 687,
"end": 693,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 689,
"end": 693,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 697,
"end": 708,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 701,
"end": 707,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 701,
"end": 703,
"ctxt": 0
},
"value": "s2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 703,
"end": 707,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 705,
"end": 707,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 705,
"end": 707,
"ctxt": 0
},
"value": "S2",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 709,
"end": 740,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 713,
"end": 739,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 713,
"end": 715,
"ctxt": 0
},
"value": "a3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 715,
"end": 739,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 717,
"end": 739,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 719,
"end": 737,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 719,
"end": 720,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 721,
"end": 730,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 722,
"end": 730,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 724,
"end": 730,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 731,
"end": 737,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 733,
"end": 737,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 761,
"end": 768,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 761,
"end": 767,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 761,
"end": 762,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 765,
"end": 767,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 769,
"end": 776,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 769,
"end": 775,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 769,
"end": 770,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 773,
"end": 775,
"ctxt": 0
},
"value": "a3",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 777,
"end": 798,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 777,
"end": 797,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 777,
"end": 778,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 781,
"end": 797,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 782,
"end": 791,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 783,
"end": 791,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 785,
"end": 791,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 796,
"end": 797,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 799,
"end": 838,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 799,
"end": 838,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 799,
"end": 800,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 813,
"end": 822,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 813,
"end": 822,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 814,
"end": 822,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 816,
"end": 822,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 803,
"end": 838,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 824,
"end": 838,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 826,
"end": 836,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 833,
"end": 835,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 839,
"end": 846,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 839,
"end": 845,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 839,
"end": 840,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 843,
"end": 845,
"ctxt": 0
},
"value": "s2",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 847,
"end": 854,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 847,
"end": 853,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 847,
"end": 848,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 851,
"end": 853,
"ctxt": 0
},
"value": "a3",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 855,
"end": 876,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 855,
"end": 875,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 855,
"end": 856,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrowFunctionExpression",
"span": {
"start": 859,
"end": 875,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 860,
"end": 869,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 861,
"end": 869,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 863,
"end": 869,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 874,
"end": 875,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 877,
"end": 916,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 877,
"end": 916,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 877,
"end": 878,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 891,
"end": 900,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 891,
"end": 900,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 892,
"end": 900,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 894,
"end": 900,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 881,
"end": 916,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 902,
"end": 916,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 904,
"end": 914,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 911,
"end": 913,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
}
],
"interpreter": null
}