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

2778 lines
69 KiB
JSON

{
"type": "Script",
"span": {
"start": 64,
"end": 874,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 73,
"end": 76,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 77,
"end": 87,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 77,
"end": 87,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 64,
"end": 89,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 99,
"end": 102,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 103,
"end": 113,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 103,
"end": 113,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 105,
"end": 113,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 107,
"end": 113,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 90,
"end": 118,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 115,
"end": 118,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 120,
"end": 127,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 120,
"end": 126,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 120,
"end": 123,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 128,
"end": 134,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 128,
"end": 133,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 145,
"end": 149,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 150,
"end": 159,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 150,
"end": 159,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 151,
"end": 159,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 153,
"end": 159,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 136,
"end": 161,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 171,
"end": 175,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 176,
"end": 185,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 176,
"end": 185,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 177,
"end": 185,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 179,
"end": 185,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 187,
"end": 197,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 187,
"end": 197,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 189,
"end": 197,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 191,
"end": 197,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 162,
"end": 199,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 209,
"end": 213,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 214,
"end": 223,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 214,
"end": 223,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 215,
"end": 223,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 217,
"end": 223,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 225,
"end": 235,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 225,
"end": 235,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 227,
"end": 235,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 229,
"end": 235,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 200,
"end": 240,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 237,
"end": 240,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 242,
"end": 250,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 242,
"end": 249,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 242,
"end": 246,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 251,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 251,
"end": 261,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 251,
"end": 255,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 264,
"end": 411,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 278,
"end": 294,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 278,
"end": 281,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 282,
"end": 292,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 282,
"end": 292,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 284,
"end": 292,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 286,
"end": 292,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 278,
"end": 294,
"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": 299,
"end": 318,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 299,
"end": 302,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 303,
"end": 313,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 303,
"end": 313,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 305,
"end": 313,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 307,
"end": 313,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 299,
"end": 318,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 315,
"end": 318,
"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": 324,
"end": 340,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 324,
"end": 328,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 329,
"end": 338,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 329,
"end": 338,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 330,
"end": 338,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 332,
"end": 338,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 324,
"end": 340,
"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": 345,
"end": 373,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 345,
"end": 349,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 350,
"end": 359,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 350,
"end": 359,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 361,
"end": 371,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 361,
"end": 371,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 363,
"end": 371,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 365,
"end": 371,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 345,
"end": 373,
"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": 378,
"end": 409,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 378,
"end": 382,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 383,
"end": 392,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 383,
"end": 392,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 384,
"end": 392,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 386,
"end": 392,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 394,
"end": 404,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 394,
"end": 404,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 396,
"end": 404,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 398,
"end": 404,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 378,
"end": 409,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 406,
"end": 409,
"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": 413,
"end": 422,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 417,
"end": 421,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 418,
"end": 421,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 423,
"end": 431,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 423,
"end": 430,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 423,
"end": 428,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 423,
"end": 424,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 425,
"end": 428,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 432,
"end": 441,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 432,
"end": 440,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 432,
"end": 437,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 434,
"end": 437,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 438,
"end": 439,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 443,
"end": 453,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 443,
"end": 452,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 443,
"end": 449,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 445,
"end": 449,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 454,
"end": 467,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 454,
"end": 466,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 454,
"end": 460,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 454,
"end": 455,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 456,
"end": 460,
"ctxt": 0
},
"value": "foo2",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 469,
"end": 608,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 479,
"end": 480,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 481,
"end": 608,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 487,
"end": 500,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 488,
"end": 498,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 490,
"end": 498,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 492,
"end": 498,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 505,
"end": 530,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 506,
"end": 516,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 508,
"end": 516,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 510,
"end": 516,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 518,
"end": 528,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 520,
"end": 528,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 522,
"end": 528,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 535,
"end": 562,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 535,
"end": 538,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 539,
"end": 548,
"ctxt": 0
},
"value": "x",
"optional": false,
"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"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 567,
"end": 606,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 567,
"end": 570,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 571,
"end": 580,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 572,
"end": 580,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 574,
"end": 580,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 582,
"end": 592,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 584,
"end": 592,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 586,
"end": 592,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 594,
"end": 604,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 596,
"end": 604,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 598,
"end": 604,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 610,
"end": 619,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 614,
"end": 618,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 614,
"end": 615,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 615,
"end": 618,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 617,
"end": 618,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 617,
"end": 618,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 620,
"end": 624,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 620,
"end": 623,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 620,
"end": 621,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 625,
"end": 630,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 625,
"end": 629,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 625,
"end": 626,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 627,
"end": 628,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 631,
"end": 639,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 631,
"end": 638,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 631,
"end": 632,
"ctxt": 0
},
"value": "i",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 633,
"end": 634,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 636,
"end": 637,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 640,
"end": 649,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 640,
"end": 648,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 640,
"end": 645,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 642,
"end": 645,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 646,
"end": 647,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 650,
"end": 662,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 650,
"end": 661,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 650,
"end": 655,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 652,
"end": 655,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 659,
"end": 660,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 663,
"end": 678,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 663,
"end": 677,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 663,
"end": 668,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"value": "i",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 665,
"end": 668,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 669,
"end": 670,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 672,
"end": 673,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 675,
"end": 676,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 680,
"end": 814,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 684,
"end": 814,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 684,
"end": 685,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 685,
"end": 814,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 687,
"end": 814,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 693,
"end": 706,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 694,
"end": 704,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 696,
"end": 704,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 698,
"end": 704,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 711,
"end": 736,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 712,
"end": 722,
"ctxt": 0
},
"value": "x",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 714,
"end": 722,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 716,
"end": 722,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 724,
"end": 734,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 726,
"end": 734,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 728,
"end": 734,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 741,
"end": 768,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 741,
"end": 744,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 745,
"end": 754,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 746,
"end": 754,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 748,
"end": 754,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 756,
"end": 766,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 758,
"end": 766,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 760,
"end": 766,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 773,
"end": 812,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 773,
"end": 776,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 777,
"end": 786,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 778,
"end": 786,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 780,
"end": 786,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 788,
"end": 798,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 790,
"end": 798,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 792,
"end": 798,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 800,
"end": 810,
"ctxt": 0
},
"value": "z",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 802,
"end": 810,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 804,
"end": 810,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": null,
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 816,
"end": 820,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 816,
"end": 819,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 816,
"end": 817,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 821,
"end": 826,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 821,
"end": 825,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 821,
"end": 822,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 823,
"end": 824,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 827,
"end": 835,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 827,
"end": 834,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 827,
"end": 828,
"ctxt": 0
},
"value": "a",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 829,
"end": 830,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 832,
"end": 833,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 836,
"end": 845,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 836,
"end": 844,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 836,
"end": 841,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 836,
"end": 837,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 838,
"end": 841,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 842,
"end": 843,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 846,
"end": 858,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 846,
"end": 857,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 846,
"end": 851,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 846,
"end": 847,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 848,
"end": 851,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 852,
"end": 853,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 855,
"end": 856,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 859,
"end": 874,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 859,
"end": 873,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 859,
"end": 864,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 859,
"end": 860,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 861,
"end": 864,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 865,
"end": 866,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 868,
"end": 869,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 871,
"end": 872,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}