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

2806 lines
76 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 1467,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 0,
"end": 43,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 10,
"end": 16,
"ctxt": 0
},
"value": "String",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 17,
"end": 43,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 23,
"end": 41,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"value": "doStuff",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 32,
"end": 40,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 45,
"end": 1354,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 64,
"ctxt": 0
},
"value": "NotString",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 65,
"end": 1354,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 71,
"end": 89,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 71,
"end": 78,
"ctxt": 0
},
"value": "doStuff",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 80,
"end": 88,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 94,
"end": 113,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 94,
"end": 102,
"ctxt": 0
},
"value": "toString",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 104,
"end": 112,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 106,
"end": 112,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 118,
"end": 146,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 118,
"end": 124,
"ctxt": 0
},
"value": "charAt",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 125,
"end": 136,
"ctxt": 0
},
"value": "pos",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 128,
"end": 136,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 130,
"end": 136,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 137,
"end": 145,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 139,
"end": 145,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 151,
"end": 185,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 151,
"end": 161,
"ctxt": 0
},
"value": "charCodeAt",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 162,
"end": 175,
"ctxt": 0
},
"value": "index",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 167,
"end": 175,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 169,
"end": 175,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 184,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 190,
"end": 227,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 190,
"end": 196,
"ctxt": 0
},
"value": "concat",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "RestElement",
"span": {
"start": 197,
"end": 217,
"ctxt": 0
},
"rest": {
"start": 197,
"end": 200,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 200,
"end": 207,
"ctxt": 0
},
"value": "strings",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 207,
"end": 217,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 209,
"end": 217,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 209,
"end": 215,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 218,
"end": 226,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 232,
"end": 289,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 232,
"end": 239,
"ctxt": 0
},
"value": "indexOf",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 240,
"end": 260,
"ctxt": 0
},
"value": "searchString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 252,
"end": 260,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 254,
"end": 260,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "Identifier",
"span": {
"start": 262,
"end": 279,
"ctxt": 0
},
"value": "position",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 271,
"end": 279,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 273,
"end": 279,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 280,
"end": 288,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 282,
"end": 288,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 294,
"end": 355,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 294,
"end": 305,
"ctxt": 0
},
"value": "lastIndexOf",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 306,
"end": 326,
"ctxt": 0
},
"value": "searchString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 318,
"end": 326,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 320,
"end": 326,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "Identifier",
"span": {
"start": 328,
"end": 345,
"ctxt": 0
},
"value": "position",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 337,
"end": 345,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 339,
"end": 345,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 346,
"end": 354,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 348,
"end": 354,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 360,
"end": 396,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 360,
"end": 373,
"ctxt": 0
},
"value": "localeCompare",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 374,
"end": 386,
"ctxt": 0
},
"value": "that",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 378,
"end": 386,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 380,
"end": 386,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 387,
"end": 395,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 389,
"end": 395,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 401,
"end": 433,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 401,
"end": 406,
"ctxt": 0
},
"value": "match",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 407,
"end": 421,
"ctxt": 0
},
"value": "regexp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 413,
"end": 421,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 415,
"end": 421,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 422,
"end": 432,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 424,
"end": 432,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 424,
"end": 430,
"ctxt": 0
},
"kind": "string"
}
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 438,
"end": 470,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 438,
"end": 443,
"ctxt": 0
},
"value": "match",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 444,
"end": 458,
"ctxt": 0
},
"value": "regexp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 450,
"end": 458,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 452,
"end": 458,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 452,
"end": 458,
"ctxt": 0
},
"value": "RegExp",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 459,
"end": 469,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 461,
"end": 469,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 461,
"end": 467,
"ctxt": 0
},
"kind": "string"
}
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 475,
"end": 534,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 475,
"end": 482,
"ctxt": 0
},
"value": "replace",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 483,
"end": 502,
"ctxt": 0
},
"value": "searchValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 494,
"end": 502,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 496,
"end": 502,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "Identifier",
"span": {
"start": 504,
"end": 524,
"ctxt": 0
},
"value": "replaceValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 516,
"end": 524,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 518,
"end": 524,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 525,
"end": 533,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 527,
"end": 533,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 539,
"end": 637,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 539,
"end": 546,
"ctxt": 0
},
"value": "replace",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 547,
"end": 566,
"ctxt": 0
},
"value": "searchValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 558,
"end": 566,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 560,
"end": 566,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "Identifier",
"span": {
"start": 568,
"end": 627,
"ctxt": 0
},
"value": "replaceValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 580,
"end": 627,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 582,
"end": 627,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 583,
"end": 600,
"ctxt": 0
},
"value": "substring",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 592,
"end": 600,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 594,
"end": 600,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "RestElement",
"span": {
"start": 602,
"end": 616,
"ctxt": 0
},
"rest": {
"start": 602,
"end": 605,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 605,
"end": 609,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 609,
"end": 616,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 611,
"end": 616,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 611,
"end": 614,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 618,
"end": 627,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 621,
"end": 627,
"ctxt": 0
},
"kind": "string"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 628,
"end": 636,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 630,
"end": 636,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 642,
"end": 701,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 642,
"end": 649,
"ctxt": 0
},
"value": "replace",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 650,
"end": 669,
"ctxt": 0
},
"value": "searchValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 661,
"end": 669,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 663,
"end": 669,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 663,
"end": 669,
"ctxt": 0
},
"value": "RegExp",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 671,
"end": 691,
"ctxt": 0
},
"value": "replaceValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 683,
"end": 691,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 685,
"end": 691,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 692,
"end": 700,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 694,
"end": 700,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 706,
"end": 804,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 706,
"end": 713,
"ctxt": 0
},
"value": "replace",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 714,
"end": 733,
"ctxt": 0
},
"value": "searchValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 725,
"end": 733,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 727,
"end": 733,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 727,
"end": 733,
"ctxt": 0
},
"value": "RegExp",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 735,
"end": 794,
"ctxt": 0
},
"value": "replaceValue",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 747,
"end": 794,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 749,
"end": 794,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 750,
"end": 767,
"ctxt": 0
},
"value": "substring",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 759,
"end": 767,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 761,
"end": 767,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "RestElement",
"span": {
"start": 769,
"end": 783,
"ctxt": 0
},
"rest": {
"start": 769,
"end": 772,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 772,
"end": 776,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 776,
"end": 783,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 778,
"end": 783,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 778,
"end": 781,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 785,
"end": 794,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 788,
"end": 794,
"ctxt": 0
},
"kind": "string"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 795,
"end": 803,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 797,
"end": 803,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 809,
"end": 840,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 809,
"end": 815,
"ctxt": 0
},
"value": "search",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 816,
"end": 830,
"ctxt": 0
},
"value": "regexp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 822,
"end": 830,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 824,
"end": 830,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 831,
"end": 839,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 833,
"end": 839,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 845,
"end": 876,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 845,
"end": 851,
"ctxt": 0
},
"value": "search",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 852,
"end": 866,
"ctxt": 0
},
"value": "regexp",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 858,
"end": 866,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 860,
"end": 866,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 860,
"end": 866,
"ctxt": 0
},
"value": "RegExp",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 867,
"end": 875,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 869,
"end": 875,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 881,
"end": 925,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 881,
"end": 886,
"ctxt": 0
},
"value": "slice",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 887,
"end": 901,
"ctxt": 0
},
"value": "start",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 893,
"end": 901,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 895,
"end": 901,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 903,
"end": 915,
"ctxt": 0
},
"value": "end",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 907,
"end": 915,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 909,
"end": 915,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 916,
"end": 924,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 918,
"end": 924,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 930,
"end": 981,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 930,
"end": 935,
"ctxt": 0
},
"value": "split",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 936,
"end": 953,
"ctxt": 0
},
"value": "separator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 945,
"end": 953,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 947,
"end": 953,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "Identifier",
"span": {
"start": 955,
"end": 969,
"ctxt": 0
},
"value": "limit",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 961,
"end": 969,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 963,
"end": 969,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 970,
"end": 980,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 972,
"end": 980,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 972,
"end": 978,
"ctxt": 0
},
"kind": "string"
}
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 986,
"end": 1037,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 986,
"end": 991,
"ctxt": 0
},
"value": "split",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 992,
"end": 1009,
"ctxt": 0
},
"value": "separator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1001,
"end": 1009,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1003,
"end": 1009,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1003,
"end": 1009,
"ctxt": 0
},
"value": "RegExp",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 1011,
"end": 1025,
"ctxt": 0
},
"value": "limit",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1017,
"end": 1025,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1019,
"end": 1025,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1026,
"end": 1036,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1028,
"end": 1036,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1028,
"end": 1034,
"ctxt": 0
},
"kind": "string"
}
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1042,
"end": 1089,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1042,
"end": 1051,
"ctxt": 0
},
"value": "substring",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 1052,
"end": 1065,
"ctxt": 0
},
"value": "start",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1057,
"end": 1065,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1059,
"end": 1065,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 1067,
"end": 1079,
"ctxt": 0
},
"value": "end",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1071,
"end": 1079,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1073,
"end": 1079,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1080,
"end": 1088,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1082,
"end": 1088,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1094,
"end": 1116,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1094,
"end": 1105,
"ctxt": 0
},
"value": "toLowerCase",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1107,
"end": 1115,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1109,
"end": 1115,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1121,
"end": 1149,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1121,
"end": 1138,
"ctxt": 0
},
"value": "toLocaleLowerCase",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1140,
"end": 1148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1142,
"end": 1148,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1154,
"end": 1176,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1154,
"end": 1165,
"ctxt": 0
},
"value": "toUpperCase",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1167,
"end": 1175,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1169,
"end": 1175,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1181,
"end": 1209,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1181,
"end": 1198,
"ctxt": 0
},
"value": "toLocaleUpperCase",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1200,
"end": 1208,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1202,
"end": 1208,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1214,
"end": 1229,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1214,
"end": 1218,
"ctxt": 0
},
"value": "trim",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1220,
"end": 1228,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1222,
"end": 1228,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1234,
"end": 1249,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1234,
"end": 1240,
"ctxt": 0
},
"value": "length",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1240,
"end": 1248,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1242,
"end": 1248,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1254,
"end": 1300,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1254,
"end": 1260,
"ctxt": 0
},
"value": "substr",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 1261,
"end": 1273,
"ctxt": 0
},
"value": "from",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1265,
"end": 1273,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1267,
"end": 1273,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "Identifier",
"span": {
"start": 1275,
"end": 1290,
"ctxt": 0
},
"value": "length",
"optional": true,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1282,
"end": 1290,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1284,
"end": 1290,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1291,
"end": 1299,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1293,
"end": 1299,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 1305,
"end": 1323,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1305,
"end": 1312,
"ctxt": 0
},
"value": "valueOf",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1314,
"end": 1322,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1316,
"end": 1322,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1329,
"end": 1342,
"ctxt": 0
},
"value": "index",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1334,
"end": 1342,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1336,
"end": 1342,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1343,
"end": 1351,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1345,
"end": 1351,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1328,
"end": 1352,
"ctxt": 0
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1356,
"end": 1367,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1360,
"end": 1366,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1360,
"end": 1361,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 1364,
"end": 1366,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1368,
"end": 1382,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1372,
"end": 1381,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1372,
"end": 1373,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1373,
"end": 1381,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1375,
"end": 1381,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1375,
"end": 1381,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1383,
"end": 1400,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1387,
"end": 1399,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1387,
"end": 1388,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1388,
"end": 1399,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1390,
"end": 1399,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1390,
"end": 1399,
"ctxt": 0
},
"value": "NotString",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1402,
"end": 1408,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1402,
"end": 1407,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1402,
"end": 1403,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1406,
"end": 1407,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1410,
"end": 1416,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1410,
"end": 1415,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1410,
"end": 1411,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1414,
"end": 1415,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1419,
"end": 1425,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1419,
"end": 1424,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1419,
"end": 1420,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1423,
"end": 1424,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1427,
"end": 1433,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1427,
"end": 1432,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1427,
"end": 1428,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1431,
"end": 1432,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1436,
"end": 1442,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1436,
"end": 1441,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1436,
"end": 1437,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1440,
"end": 1441,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1461,
"end": 1467,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1461,
"end": 1466,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1461,
"end": 1462,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1465,
"end": 1466,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}