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

2752 lines
68 KiB
JSON

{
"type": "Script",
"span": {
"start": 63,
"end": 873,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 72,
"end": 75,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 76,
"end": 86,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 76,
"end": 86,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 78,
"end": 86,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 63,
"end": 88,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 102,
"end": 112,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 102,
"end": 112,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 104,
"end": 112,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 106,
"end": 112,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 89,
"end": 117,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 119,
"end": 126,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 119,
"end": 125,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 119,
"end": 122,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 127,
"end": 133,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 127,
"end": 132,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 127,
"end": 130,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 144,
"end": 148,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 149,
"end": 158,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 149,
"end": 158,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 150,
"end": 158,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 152,
"end": 158,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 135,
"end": 160,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 170,
"end": 174,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 175,
"end": 184,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 175,
"end": 184,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 184,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 186,
"end": 196,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 186,
"end": 196,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 188,
"end": 196,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 190,
"end": 196,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 161,
"end": 198,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 208,
"end": 212,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 213,
"end": 222,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 213,
"end": 222,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 214,
"end": 222,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 216,
"end": 222,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 224,
"end": 234,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 224,
"end": 234,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 226,
"end": 234,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 228,
"end": 234,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 199,
"end": 239,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 236,
"end": 239,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 241,
"end": 249,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 241,
"end": 245,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 250,
"end": 261,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 250,
"end": 260,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 250,
"end": 254,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 258,
"end": 259,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 263,
"end": 410,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 277,
"end": 293,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 277,
"end": 280,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 281,
"end": 291,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 281,
"end": 291,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 283,
"end": 291,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 285,
"end": 291,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 277,
"end": 293,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 298,
"end": 317,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 298,
"end": 301,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 302,
"end": 312,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 302,
"end": 312,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 304,
"end": 312,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 306,
"end": 312,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 298,
"end": 317,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 314,
"end": 317,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 323,
"end": 339,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 323,
"end": 327,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 328,
"end": 337,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 328,
"end": 337,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 329,
"end": 337,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 331,
"end": 337,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 323,
"end": 339,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 344,
"end": 372,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 344,
"end": 348,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 350,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 352,
"end": 358,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 360,
"end": 370,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 360,
"end": 370,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 362,
"end": 370,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 364,
"end": 370,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 344,
"end": 372,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 377,
"end": 408,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 377,
"end": 381,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 383,
"end": 391,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 385,
"end": 391,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 393,
"end": 403,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 393,
"end": 403,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 395,
"end": 403,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 397,
"end": 403,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 377,
"end": 408,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 405,
"end": 408,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 412,
"end": 421,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 416,
"end": 420,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 416,
"end": 417,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 417,
"end": 420,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 422,
"end": 430,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 422,
"end": 429,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 422,
"end": 427,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 424,
"end": 427,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 431,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 431,
"end": 439,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 431,
"end": 436,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 431,
"end": 432,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 433,
"end": 436,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 437,
"end": 438,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 442,
"end": 452,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 442,
"end": 451,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 442,
"end": 448,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 442,
"end": 443,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 444,
"end": 448,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 449,
"end": 450,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 453,
"end": 466,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 453,
"end": 465,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 453,
"end": 459,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 453,
"end": 454,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 455,
"end": 459,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 463,
"end": 464,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 468,
"end": 607,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 478,
"end": 479,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 480,
"end": 607,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 486,
"end": 499,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 487,
"end": 497,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 489,
"end": 497,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 491,
"end": 497,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 504,
"end": 529,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 505,
"end": 515,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 507,
"end": 515,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 509,
"end": 515,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 517,
"end": 527,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 519,
"end": 527,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 521,
"end": 527,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 534,
"end": 561,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 534,
"end": 537,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 538,
"end": 547,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 539,
"end": 547,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 541,
"end": 547,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 549,
"end": 559,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 551,
"end": 559,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 553,
"end": 559,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 566,
"end": 605,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 566,
"end": 569,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 570,
"end": 579,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 571,
"end": 579,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 573,
"end": 579,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 581,
"end": 591,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 583,
"end": 591,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 585,
"end": 591,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 593,
"end": 603,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 595,
"end": 603,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 597,
"end": 603,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 609,
"end": 618,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 613,
"end": 617,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 613,
"end": 614,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 614,
"end": 617,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 616,
"end": 617,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 616,
"end": 617,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 619,
"end": 623,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 619,
"end": 622,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 624,
"end": 629,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 624,
"end": 628,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 624,
"end": 625,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 630,
"end": 638,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 630,
"end": 637,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 630,
"end": 631,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 632,
"end": 633,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 639,
"end": 648,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 639,
"end": 647,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 639,
"end": 644,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 641,
"end": 644,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 645,
"end": 646,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 649,
"end": 661,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 649,
"end": 660,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 649,
"end": 654,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 651,
"end": 654,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 658,
"end": 659,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 662,
"end": 677,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 662,
"end": 676,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 662,
"end": 667,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 664,
"end": 667,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 668,
"end": 669,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 671,
"end": 672,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 674,
"end": 675,
"ctxt": 0
},
"value": 3.0
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 679,
"end": 813,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 683,
"end": 813,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 683,
"end": 684,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 684,
"end": 813,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 686,
"end": 813,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 692,
"end": 705,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 693,
"end": 703,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 695,
"end": 703,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 697,
"end": 703,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 710,
"end": 735,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 711,
"end": 721,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 713,
"end": 721,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 715,
"end": 721,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 723,
"end": 733,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 725,
"end": 733,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 727,
"end": 733,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 740,
"end": 767,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 740,
"end": 743,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 744,
"end": 753,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 745,
"end": 753,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 747,
"end": 753,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 755,
"end": 765,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 757,
"end": 765,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 759,
"end": 765,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 772,
"end": 811,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 772,
"end": 775,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 776,
"end": 785,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 777,
"end": 785,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 779,
"end": 785,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 787,
"end": 797,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 789,
"end": 797,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 791,
"end": 797,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 799,
"end": 809,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 801,
"end": 809,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 803,
"end": 809,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 815,
"end": 819,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 815,
"end": 818,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 815,
"end": 816,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 820,
"end": 825,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 820,
"end": 824,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 820,
"end": 821,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 822,
"end": 823,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 826,
"end": 834,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 826,
"end": 833,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 826,
"end": 827,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 828,
"end": 829,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 831,
"end": 832,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 835,
"end": 844,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 835,
"end": 843,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 835,
"end": 840,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 835,
"end": 836,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 837,
"end": 840,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 841,
"end": 842,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 845,
"end": 857,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 845,
"end": 856,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 845,
"end": 850,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 845,
"end": 846,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 847,
"end": 850,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 851,
"end": 852,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 858,
"end": 873,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 858,
"end": 872,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 858,
"end": 863,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 858,
"end": 859,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 860,
"end": 863,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 864,
"end": 865,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 867,
"end": 868,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 870,
"end": 871,
"ctxt": 0
},
"value": 3.0
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}