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

2976 lines
83 KiB
JSON

{
"type": "Script",
"span": {
"start": 90,
"end": 1728,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 90,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 100,
"end": 108,
"ctxt": 0
},
"value": "MyString",
"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": "String",
"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": 713,
"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": "string"
}
}
}
],
"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": 260,
"end": 271,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 261,
"end": 271,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 263,
"end": 271,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 266,
"end": 271,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 269,
"end": 271,
"ctxt": 0
},
"members": []
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 285,
"end": 297,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 285,
"end": 288,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 288,
"end": 296,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 290,
"end": 296,
"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": 308,
"end": 320,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 308,
"end": 311,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 311,
"end": 319,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 313,
"end": 319,
"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": 334,
"end": 346,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 334,
"end": 337,
"ctxt": 0
},
"value": 1.0
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 337,
"end": 345,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 339,
"end": 345,
"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": 357,
"end": 369,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 357,
"end": 360,
"ctxt": 0
},
"value": 2.0
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 360,
"end": 368,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 362,
"end": 368,
"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": 383,
"end": 397,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 383,
"end": 388,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 388,
"end": 396,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 390,
"end": 396,
"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": 408,
"end": 422,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 413,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 413,
"end": 421,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 415,
"end": 421,
"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": 436,
"end": 448,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 436,
"end": 437,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 437,
"end": 447,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 439,
"end": 447,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 439,
"end": 447,
"ctxt": 0
},
"value": "MyString",
"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": 463,
"end": 503,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 463,
"end": 503,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 471,
"end": 503,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 487,
"end": 497,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 494,
"end": 496,
"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": 508,
"end": 520,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 512,
"end": 513,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 508,
"end": 520,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 517,
"end": 520,
"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": 532,
"end": 573,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 532,
"end": 535,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 532,
"end": 573,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 538,
"end": 573,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 557,
"end": 567,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 564,
"end": 566,
"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": 579,
"end": 597,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 586,
"end": 588,
"ctxt": 0
},
"value": "sa",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 588,
"end": 596,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 590,
"end": 596,
"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": 608,
"end": 626,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 615,
"end": 617,
"ctxt": 0
},
"value": "sb",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 617,
"end": 625,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 619,
"end": 625,
"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": 638,
"end": 654,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 645,
"end": 648,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 638,
"end": 654,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 651,
"end": 654,
"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": 665,
"end": 711,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 676,
"end": 677,
"ctxt": 0
},
"value": "X",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 665,
"end": 711,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 680,
"end": 711,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 696,
"end": 705,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 703,
"end": 704,
"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": 715,
"end": 1075,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 727,
"end": 1075,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 734,
"end": 743,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 735,
"end": 743,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 737,
"end": 743,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 744,
"end": 752,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 746,
"end": 752,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 733,
"end": 753,
"ctxt": 0
}
},
{
"type": "TsPropertySignature",
"span": {
"start": 759,
"end": 769,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 759,
"end": 760,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 760,
"end": 768,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 762,
"end": 768,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 780,
"end": 790,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 780,
"end": 781,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 781,
"end": 789,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 783,
"end": 789,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 804,
"end": 815,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 804,
"end": 805,
"ctxt": 0
},
"value": "c",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 805,
"end": 815,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 807,
"end": 815,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 810,
"end": 815,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 813,
"end": 815,
"ctxt": 0
},
"members": []
}
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 829,
"end": 841,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 829,
"end": 832,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 832,
"end": 840,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 834,
"end": 840,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 852,
"end": 864,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 852,
"end": 855,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 855,
"end": 863,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 857,
"end": 863,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 878,
"end": 890,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 878,
"end": 881,
"ctxt": 0
},
"value": 1.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 881,
"end": 889,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 883,
"end": 889,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 901,
"end": 913,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 901,
"end": 904,
"ctxt": 0
},
"value": 2.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 904,
"end": 912,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 906,
"end": 912,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 927,
"end": 938,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 929,
"end": 937,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 931,
"end": 937,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 949,
"end": 960,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 950,
"end": 951,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 952,
"end": 960,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 954,
"end": 960,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 971,
"end": 985,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 971,
"end": 974,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"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": 999,
"end": 1013,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 999,
"end": 1004,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1004,
"end": 1012,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1006,
"end": 1012,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1024,
"end": 1038,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1024,
"end": 1029,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1029,
"end": 1037,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1031,
"end": 1037,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1052,
"end": 1064,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1052,
"end": 1053,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1053,
"end": 1063,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1055,
"end": 1063,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1055,
"end": 1063,
"ctxt": 0
},
"value": "MyString",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1077,
"end": 1432,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1081,
"end": 1432,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1081,
"end": 1082,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1082,
"end": 1432,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1084,
"end": 1432,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1091,
"end": 1100,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1092,
"end": 1100,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1094,
"end": 1100,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1101,
"end": 1109,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1103,
"end": 1109,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1090,
"end": 1110,
"ctxt": 0
}
},
{
"type": "TsPropertySignature",
"span": {
"start": 1116,
"end": 1126,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1116,
"end": 1117,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1117,
"end": 1125,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1119,
"end": 1125,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1137,
"end": 1147,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1137,
"end": 1138,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1138,
"end": 1146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1140,
"end": 1146,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1161,
"end": 1172,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1161,
"end": 1162,
"ctxt": 0
},
"value": "c",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1162,
"end": 1172,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1164,
"end": 1172,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1167,
"end": 1172,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1170,
"end": 1172,
"ctxt": 0
},
"members": []
}
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1186,
"end": 1198,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1186,
"end": 1189,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1189,
"end": 1197,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1191,
"end": 1197,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1209,
"end": 1221,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1209,
"end": 1212,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1212,
"end": 1220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1214,
"end": 1220,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1235,
"end": 1247,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 1235,
"end": 1238,
"ctxt": 0
},
"value": 1.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1238,
"end": 1246,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1240,
"end": 1246,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1258,
"end": 1270,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "NumericLiteral",
"span": {
"start": 1258,
"end": 1261,
"ctxt": 0
},
"value": 2.0
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1261,
"end": 1269,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1263,
"end": 1269,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 1284,
"end": 1295,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1286,
"end": 1294,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1288,
"end": 1294,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 1306,
"end": 1317,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1307,
"end": 1308,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1309,
"end": 1317,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1311,
"end": 1317,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1328,
"end": 1342,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1328,
"end": 1331,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1333,
"end": 1341,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1335,
"end": 1341,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1356,
"end": 1370,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1356,
"end": 1361,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1361,
"end": 1369,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1363,
"end": 1369,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1381,
"end": 1395,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 1381,
"end": 1386,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1386,
"end": 1394,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1388,
"end": 1394,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1409,
"end": 1421,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1409,
"end": 1410,
"ctxt": 0
},
"value": "f",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1410,
"end": 1420,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1412,
"end": 1420,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1412,
"end": 1420,
"ctxt": 0
},
"value": "MyString",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1443,
"end": 1728,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1447,
"end": 1728,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1447,
"end": 1448,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1448,
"end": 1474,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1450,
"end": 1474,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1453,
"end": 1462,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1454,
"end": 1462,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1456,
"end": 1462,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1463,
"end": 1471,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1465,
"end": 1471,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1452,
"end": 1472,
"ctxt": 0
}
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1477,
"end": 1728,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1483,
"end": 1484,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1486,
"end": 1488,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1494,
"end": 1495,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1497,
"end": 1498,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1505,
"end": 1506,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1508,
"end": 1517,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1514,
"end": 1517,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1524,
"end": 1527,
"ctxt": 0
},
"value": "d",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1529,
"end": 1531,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1538,
"end": 1541,
"ctxt": 0
},
"value": "e",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1543,
"end": 1544,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1551,
"end": 1554,
"ctxt": 0
},
"value": 1.0
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1556,
"end": 1558,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 1564,
"end": 1567,
"ctxt": 0
},
"value": 2.0
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1569,
"end": 1570,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1577,
"end": 1582,
"ctxt": 0
},
"value": "3.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1584,
"end": 1586,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "StringLiteral",
"span": {
"start": 1593,
"end": 1598,
"ctxt": 0
},
"value": "4.0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1600,
"end": 1601,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1608,
"end": 1609,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "TsTypeAssertion",
"span": {
"start": 1611,
"end": 1625,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1621,
"end": 1625,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1612,
"end": 1620,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1612,
"end": 1620,
"ctxt": 0
},
"value": "MyString",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "GetterProperty",
"span": {
"start": 1633,
"end": 1668,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1637,
"end": 1638,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1641,
"end": 1668,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1652,
"end": 1662,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 1659,
"end": 1661,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
},
{
"type": "SetterProperty",
"span": {
"start": 1674,
"end": 1686,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1678,
"end": 1679,
"ctxt": 0
},
"value": "X",
"optional": false
},
"param": {
"type": "Identifier",
"span": {
"start": 1680,
"end": 1681,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1683,
"end": 1686,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1693,
"end": 1696,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 1693,
"end": 1726,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1699,
"end": 1726,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1710,
"end": 1720,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 1717,
"end": 1719,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}