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

2975 lines
83 KiB
JSON

{
"type": "Script",
"span": {
"start": 90,
"end": 1683,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 90,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 108,
"ctxt": 0
},
"value": "MyNumber",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 124,
"end": 144,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 130,
"end": 142,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 130,
"end": 133,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 133,
"end": 141,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 135,
"end": 141,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 146,
"end": 697,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 161,
"end": 170,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 162,
"end": 170,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 164,
"end": 170,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 171,
"end": 179,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 173,
"end": 179,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 160,
"end": 180,
"ctxt": 0
}
},
{
"type": "Constructor",
"span": {
"start": 186,
"end": 203,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 186,
"end": 197,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 200,
"end": 203,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassProperty",
"span": {
"start": 215,
"end": 225,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 216,
"end": 224,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 218,
"end": 224,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 236,
"end": 246,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 237,
"end": 245,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 239,
"end": 245,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 257,
"end": 268,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 258,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 260,
"end": 268,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 263,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 266,
"end": 268,
"ctxt": 0
},
"members": []
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 279,
"end": 291,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 279,
"end": 282,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 282,
"end": 290,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 302,
"end": 314,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 302,
"end": 305,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 305,
"end": 313,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 307,
"end": 313,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 325,
"end": 337,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 325,
"end": 328,
"ctxt": 0
},
"value": 1.0
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 328,
"end": 336,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 330,
"end": 336,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 348,
"end": 360,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 348,
"end": 351,
"ctxt": 0
},
"value": 2.0
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 374,
"end": 388,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 374,
"end": 379,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 379,
"end": 387,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 381,
"end": 387,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 399,
"end": 413,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 399,
"end": 404,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 404,
"end": 412,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 406,
"end": 412,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 427,
"end": 440,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 427,
"end": 430,
"ctxt": 0
},
"value": 3.0
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 430,
"end": 440,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 432,
"end": 440,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 432,
"end": 440,
"ctxt": 0
},
"value": "MyNumber",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 455,
"end": 495,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 459,
"end": 460,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 455,
"end": 495,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 463,
"end": 495,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 479,
"end": 489,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 486,
"end": 488,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 500,
"end": 512,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 504,
"end": 505,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 506,
"end": 507,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 506,
"end": 507,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 500,
"end": 512,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 509,
"end": 512,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 524,
"end": 557,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 524,
"end": 527,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 524,
"end": 557,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 530,
"end": 557,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 541,
"end": 551,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 548,
"end": 550,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 563,
"end": 581,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 570,
"end": 572,
"ctxt": 0
},
"value": "sa",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 572,
"end": 580,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 574,
"end": 580,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 592,
"end": 610,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 599,
"end": 601,
"ctxt": 0
},
"value": "sb",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 601,
"end": 609,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 603,
"end": 609,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 622,
"end": 638,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 629,
"end": 632,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 622,
"end": 638,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 635,
"end": 638,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 649,
"end": 695,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 660,
"end": 661,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 649,
"end": 695,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 664,
"end": 695,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 680,
"end": 689,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 687,
"end": 688,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 699,
"end": 1047,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 709,
"end": 710,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 711,
"end": 1047,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 718,
"end": 727,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 719,
"end": 727,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 721,
"end": 727,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 728,
"end": 736,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 730,
"end": 736,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 717,
"end": 737,
"ctxt": 0
}
},
{
"type": "TsPropertySignature",
"span": {
"start": 743,
"end": 753,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 743,
"end": 744,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 744,
"end": 752,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 746,
"end": 752,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 764,
"end": 774,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 764,
"end": 765,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 765,
"end": 773,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 767,
"end": 773,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 785,
"end": 796,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 785,
"end": 786,
"ctxt": 0
},
"value": "c",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 786,
"end": 796,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 788,
"end": 796,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 791,
"end": 796,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"members": []
}
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 807,
"end": 819,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 807,
"end": 810,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 810,
"end": 818,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 812,
"end": 818,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 830,
"end": 842,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 830,
"end": 833,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 833,
"end": 841,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 835,
"end": 841,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 853,
"end": 865,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 853,
"end": 856,
"ctxt": 0
},
"value": 1.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 856,
"end": 864,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 858,
"end": 864,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 876,
"end": 888,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 876,
"end": 879,
"ctxt": 0
},
"value": 2.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 879,
"end": 887,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 881,
"end": 887,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 902,
"end": 913,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 904,
"end": 912,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 906,
"end": 912,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 924,
"end": 935,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 925,
"end": 926,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 927,
"end": 935,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 929,
"end": 935,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 946,
"end": 960,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 946,
"end": 949,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 951,
"end": 959,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 953,
"end": 959,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 971,
"end": 985,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 971,
"end": 976,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 976,
"end": 984,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 978,
"end": 984,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 996,
"end": 1010,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 996,
"end": 1001,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1001,
"end": 1009,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1003,
"end": 1009,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1024,
"end": 1036,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1024,
"end": 1025,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1025,
"end": 1035,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1027,
"end": 1035,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1027,
"end": 1035,
"ctxt": 0
},
"value": "MyNumber",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1049,
"end": 1392,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1053,
"end": 1392,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1053,
"end": 1054,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1054,
"end": 1392,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1056,
"end": 1392,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1063,
"end": 1072,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1064,
"end": 1072,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1066,
"end": 1072,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1073,
"end": 1081,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1075,
"end": 1081,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1062,
"end": 1082,
"ctxt": 0
}
},
{
"type": "TsPropertySignature",
"span": {
"start": 1088,
"end": 1098,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1088,
"end": 1089,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1089,
"end": 1097,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1091,
"end": 1097,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1109,
"end": 1119,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1109,
"end": 1110,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1110,
"end": 1118,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1112,
"end": 1118,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1130,
"end": 1141,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1130,
"end": 1131,
"ctxt": 0
},
"value": "c",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1131,
"end": 1141,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1133,
"end": 1141,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1136,
"end": 1141,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1139,
"end": 1141,
"ctxt": 0
},
"members": []
}
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1152,
"end": 1164,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1152,
"end": 1155,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1155,
"end": 1163,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1157,
"end": 1163,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1175,
"end": 1187,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1175,
"end": 1178,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1178,
"end": 1186,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1180,
"end": 1186,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1198,
"end": 1210,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 1198,
"end": 1201,
"ctxt": 0
},
"value": 1.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1201,
"end": 1209,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1203,
"end": 1209,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1221,
"end": 1233,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 1221,
"end": 1224,
"ctxt": 0
},
"value": 2.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1224,
"end": 1232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1226,
"end": 1232,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 1247,
"end": 1258,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1249,
"end": 1257,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1251,
"end": 1257,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 1269,
"end": 1280,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1270,
"end": 1271,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1272,
"end": 1280,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1274,
"end": 1280,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1291,
"end": 1305,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1291,
"end": 1294,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1296,
"end": 1304,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1298,
"end": 1304,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1316,
"end": 1330,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1316,
"end": 1321,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1321,
"end": 1329,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1323,
"end": 1329,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1341,
"end": 1355,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1341,
"end": 1346,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1346,
"end": 1354,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1348,
"end": 1354,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1369,
"end": 1381,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1369,
"end": 1370,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1370,
"end": 1380,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1372,
"end": 1380,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1372,
"end": 1380,
"ctxt": 0
},
"value": "MyNumber",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1403,
"end": 1683,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1407,
"end": 1683,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1407,
"end": 1408,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1408,
"end": 1434,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1410,
"end": 1434,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1413,
"end": 1422,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1414,
"end": 1422,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1416,
"end": 1422,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1423,
"end": 1431,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1425,
"end": 1431,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1412,
"end": 1432,
"ctxt": 0
}
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1437,
"end": 1683,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1443,
"end": 1444,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1446,
"end": 1448,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1454,
"end": 1455,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1457,
"end": 1458,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1465,
"end": 1466,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1468,
"end": 1477,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1474,
"end": 1477,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1484,
"end": 1487,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1489,
"end": 1491,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1498,
"end": 1501,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1503,
"end": 1504,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1511,
"end": 1514,
"ctxt": 0
},
"value": 1.0
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1516,
"end": 1518,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1524,
"end": 1527,
"ctxt": 0
},
"value": 2.0
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1529,
"end": 1530,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1537,
"end": 1542,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1544,
"end": 1546,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1553,
"end": 1558,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1560,
"end": 1561,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1568,
"end": 1569,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "TsTypeAssertion",
"span": {
"start": 1571,
"end": 1580,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1576,
"end": 1580,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1572,
"end": 1575,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1572,
"end": 1575,
"ctxt": 0
},
"value": "Myn",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "GetterProperty",
"span": {
"start": 1588,
"end": 1623,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1592,
"end": 1593,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1596,
"end": 1623,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1607,
"end": 1617,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 1614,
"end": 1616,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
},
{
"type": "SetterProperty",
"span": {
"start": 1629,
"end": 1641,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1633,
"end": 1634,
"ctxt": 0
},
"value": "X",
"optional": false
},
"param": {
"type": "Identifier",
"span": {
"start": 1635,
"end": 1636,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1638,
"end": 1641,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1648,
"end": 1651,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 1648,
"end": 1681,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1654,
"end": 1681,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1665,
"end": 1675,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 1672,
"end": 1674,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}