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

2752 lines
68 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 65,
"end": 931,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 78,
"end": 88,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 78,
"end": 88,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 80,
"end": 88,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 65,
"end": 90,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 105,
"end": 115,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 105,
"end": 115,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 107,
"end": 115,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 109,
"end": 115,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 92,
"end": 120,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 124,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 124,
"end": 127,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 133,
"end": 138,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 152,
"end": 156,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 157,
"end": 166,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 157,
"end": 166,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 158,
"end": 166,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 160,
"end": 166,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 143,
"end": 168,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 179,
"end": 183,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 184,
"end": 193,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 184,
"end": 193,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 185,
"end": 193,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 195,
"end": 205,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 195,
"end": 205,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 197,
"end": 205,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 199,
"end": 205,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 170,
"end": 207,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 223,
"end": 232,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 223,
"end": 232,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 224,
"end": 232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 226,
"end": 232,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 234,
"end": 244,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 234,
"end": 244,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 236,
"end": 244,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 238,
"end": 244,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 209,
"end": 249,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 246,
"end": 249,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 253,
"end": 261,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 253,
"end": 260,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 253,
"end": 257,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 258,
"end": 259,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 263,
"end": 274,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 263,
"end": 273,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 263,
"end": 267,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 268,
"end": 269,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 284,
"end": 285,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 278,
"end": 432,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 293,
"end": 309,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 293,
"end": 296,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 297,
"end": 307,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 297,
"end": 307,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 299,
"end": 307,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 301,
"end": 307,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 293,
"end": 309,
"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": 315,
"end": 334,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 319,
"end": 329,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 319,
"end": 329,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 321,
"end": 329,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 323,
"end": 329,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 315,
"end": 334,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 331,
"end": 334,
"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": 342,
"end": 358,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 342,
"end": 346,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 347,
"end": 356,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 347,
"end": 356,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 348,
"end": 356,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 350,
"end": 356,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 342,
"end": 358,
"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": 364,
"end": 392,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 364,
"end": 368,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 369,
"end": 378,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 369,
"end": 378,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 370,
"end": 378,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 372,
"end": 378,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 380,
"end": 390,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 380,
"end": 390,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 382,
"end": 390,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 384,
"end": 390,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 364,
"end": 392,
"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": 398,
"end": 429,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 398,
"end": 402,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 403,
"end": 412,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 403,
"end": 412,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 404,
"end": 412,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 406,
"end": 412,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 414,
"end": 424,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 414,
"end": 424,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 416,
"end": 424,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 418,
"end": 424,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 398,
"end": 429,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 426,
"end": 429,
"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": 436,
"end": 445,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 440,
"end": 444,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 441,
"end": 444,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 447,
"end": 455,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 447,
"end": 454,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 447,
"end": 452,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 447,
"end": 448,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 449,
"end": 452,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 457,
"end": 466,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 457,
"end": 465,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 457,
"end": 462,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 457,
"end": 458,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 459,
"end": 462,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 463,
"end": 464,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 470,
"end": 480,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 470,
"end": 479,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 470,
"end": 476,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 472,
"end": 476,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 477,
"end": 478,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 482,
"end": 495,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 482,
"end": 494,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 482,
"end": 488,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 482,
"end": 483,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 484,
"end": 488,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 489,
"end": 490,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 492,
"end": 493,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 499,
"end": 643,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 509,
"end": 510,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 511,
"end": 643,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 518,
"end": 531,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 519,
"end": 529,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 521,
"end": 529,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 523,
"end": 529,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 537,
"end": 562,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 538,
"end": 548,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 540,
"end": 548,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 542,
"end": 548,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 550,
"end": 560,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 552,
"end": 560,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 554,
"end": 560,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 568,
"end": 595,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 568,
"end": 571,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 572,
"end": 581,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 573,
"end": 581,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 575,
"end": 581,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 583,
"end": 593,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 585,
"end": 593,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 587,
"end": 593,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 601,
"end": 640,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 601,
"end": 604,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 605,
"end": 614,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 606,
"end": 614,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 608,
"end": 614,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 616,
"end": 626,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 618,
"end": 626,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 620,
"end": 626,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 628,
"end": 638,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 630,
"end": 638,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 632,
"end": 638,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 647,
"end": 656,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 651,
"end": 655,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 651,
"end": 652,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 652,
"end": 655,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 658,
"end": 662,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 658,
"end": 661,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 658,
"end": 659,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 664,
"end": 669,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 664,
"end": 668,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 664,
"end": 665,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 666,
"end": 667,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 671,
"end": 679,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 671,
"end": 678,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 671,
"end": 672,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 673,
"end": 674,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 676,
"end": 677,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 681,
"end": 690,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 681,
"end": 689,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 681,
"end": 686,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 681,
"end": 682,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 683,
"end": 686,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 687,
"end": 688,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 692,
"end": 704,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 692,
"end": 703,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 692,
"end": 697,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 692,
"end": 693,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 694,
"end": 697,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 698,
"end": 699,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 701,
"end": 702,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 706,
"end": 721,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 706,
"end": 720,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 706,
"end": 711,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 706,
"end": 707,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 708,
"end": 711,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 712,
"end": 713,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 715,
"end": 716,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": 3.0
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 725,
"end": 864,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 729,
"end": 864,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 729,
"end": 730,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 730,
"end": 864,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 732,
"end": 864,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 739,
"end": 752,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 740,
"end": 750,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 742,
"end": 750,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 744,
"end": 750,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 758,
"end": 783,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 759,
"end": 769,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 761,
"end": 769,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 763,
"end": 769,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 771,
"end": 781,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 773,
"end": 781,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 775,
"end": 781,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 789,
"end": 816,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 789,
"end": 792,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 793,
"end": 802,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 794,
"end": 802,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 796,
"end": 802,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 804,
"end": 814,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 806,
"end": 814,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 808,
"end": 814,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 822,
"end": 861,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 822,
"end": 825,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 826,
"end": 835,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 827,
"end": 835,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 829,
"end": 835,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 837,
"end": 847,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 839,
"end": 847,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 841,
"end": 847,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 849,
"end": 859,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 851,
"end": 859,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 853,
"end": 859,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 868,
"end": 872,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 868,
"end": 871,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 868,
"end": 869,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 874,
"end": 879,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 874,
"end": 878,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 874,
"end": 875,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 876,
"end": 877,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 881,
"end": 889,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 881,
"end": 888,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 881,
"end": 882,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 883,
"end": 884,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 886,
"end": 887,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 891,
"end": 900,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 891,
"end": 899,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 891,
"end": 896,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 891,
"end": 892,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 893,
"end": 896,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 897,
"end": 898,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 902,
"end": 914,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 902,
"end": 913,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 902,
"end": 907,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 902,
"end": 903,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 904,
"end": 907,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 908,
"end": 909,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 911,
"end": 912,
"ctxt": 0
},
"value": 2.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 916,
"end": 931,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 916,
"end": 930,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 916,
"end": 921,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 916,
"end": 917,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 918,
"end": 921,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 922,
"end": 923,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 925,
"end": 926,
"ctxt": 0
},
"value": 2.0
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 928,
"end": 929,
"ctxt": 0
},
"value": 3.0
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}