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

2011 lines
53 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 41,
"end": 906,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 56,
"end": 72,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 56,
"end": 72,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 57,
"end": 72,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 59,
"end": 72,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 63,
"end": 72,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 41,
"end": 108,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 74,
"end": 108,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 80,
"end": 96,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 87,
"end": 95,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 89,
"end": 92,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 52,
"end": 55,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 119,
"end": 121,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 125,
"end": 145,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 125,
"end": 145,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 126,
"end": 145,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 128,
"end": 145,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsIntersectionType",
"span": {
"start": 132,
"end": 145,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 136,
"end": 145,
"ctxt": 0
},
"kind": "undefined"
}
]
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 110,
"end": 171,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 147,
"end": 171,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 153,
"end": 169,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 160,
"end": 168,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 162,
"end": 165,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"value": "f3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 207,
"end": 210,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 173,
"end": 246,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 212,
"end": 246,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 218,
"end": 234,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 225,
"end": 233,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 227,
"end": 230,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 230,
"end": 231,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 184,
"end": 205,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 185,
"end": 204,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 195,
"end": 204,
"ctxt": 0
},
"kind": "undefined"
},
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 257,
"end": 259,
"ctxt": 0
},
"value": "f4",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 281,
"end": 294,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 281,
"end": 294,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 282,
"end": 294,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 284,
"end": 294,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"kind": "object"
},
{
"type": "TsTypeReference",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 248,
"end": 320,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 296,
"end": 320,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 302,
"end": 318,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 309,
"end": 317,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 311,
"end": 314,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 259,
"end": 280,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 260,
"end": 279,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 270,
"end": 279,
"ctxt": 0
},
"kind": "undefined"
},
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 331,
"end": 333,
"ctxt": 0
},
"value": "f5",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 358,
"end": 366,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 358,
"end": 366,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 359,
"end": 366,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 361,
"end": 366,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"value": "S",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 322,
"end": 392,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 368,
"end": 392,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 374,
"end": 390,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 381,
"end": 389,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 383,
"end": 386,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 333,
"end": 357,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 334,
"end": 335,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 334,
"end": 335,
"ctxt": 0
},
"value": "S",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 337,
"end": 356,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 337,
"end": 338,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 347,
"end": 356,
"ctxt": 0
},
"kind": "undefined"
},
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 403,
"end": 405,
"ctxt": 0
},
"value": "f6",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 436,
"end": 440,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 436,
"end": 440,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 437,
"end": 440,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 439,
"end": 440,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 439,
"end": 440,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 394,
"end": 466,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 442,
"end": 466,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 448,
"end": 464,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 455,
"end": 463,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 457,
"end": 460,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 405,
"end": 435,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 406,
"end": 434,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 406,
"end": 407,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsUnionType",
"span": {
"start": 416,
"end": 434,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 416,
"end": 422,
"ctxt": 0
},
"kind": "object"
},
{
"type": "TsKeywordType",
"span": {
"start": 425,
"end": 434,
"ctxt": 0
},
"kind": "undefined"
}
]
},
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 499,
"end": 501,
"ctxt": 0
},
"value": "g1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 554,
"end": 558,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 554,
"end": 558,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 555,
"end": 558,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 557,
"end": 558,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 557,
"end": 558,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 490,
"end": 617,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 560,
"end": 617,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 566,
"end": 582,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 572,
"end": 581,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 572,
"end": 577,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 574,
"end": 575,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 574,
"end": 575,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 580,
"end": 581,
"ctxt": 0
},
"value": "a",
"optional": false
},
"definite": false
}
]
},
{
"type": "ReturnStatement",
"span": {
"start": 587,
"end": 615,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 594,
"end": 614,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 604,
"end": 607,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 607,
"end": 608,
"ctxt": 0
},
"value": "z",
"optional": false
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 501,
"end": 553,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 502,
"end": 514,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 512,
"end": 514,
"ctxt": 0
},
"members": []
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 516,
"end": 552,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 516,
"end": 517,
"ctxt": 0
},
"value": "A",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 526,
"end": 552,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 528,
"end": 550,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 528,
"end": 529,
"ctxt": 0
},
"value": "z",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 529,
"end": 550,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 531,
"end": 550,
"ctxt": 0
},
"types": [
{
"type": "TsParenthesizedType",
"span": {
"start": 531,
"end": 546,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 532,
"end": 545,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 536,
"end": 545,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
},
"default": null
}
]
},
"returnType": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 641,
"end": 681,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 651,
"end": 661,
"ctxt": 0
},
"value": "DatafulFoo",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 661,
"end": 664,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 665,
"end": 681,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 671,
"end": 679,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 671,
"end": 675,
"ctxt": 0
},
"value": "data",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 675,
"end": 678,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 677,
"end": 678,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 677,
"end": 678,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 689,
"end": 692,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 683,
"end": 906,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 717,
"end": 737,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 717,
"end": 721,
"ctxt": 0
},
"value": "data",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 721,
"end": 736,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 723,
"end": 736,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 723,
"end": 724,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 723,
"end": 724,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 727,
"end": 736,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 742,
"end": 838,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 742,
"end": 745,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 742,
"end": 838,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 748,
"end": 838,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 758,
"end": 832,
"ctxt": 0
},
"test": {
"type": "CallExpression",
"span": {
"start": 762,
"end": 776,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 762,
"end": 774,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 762,
"end": 766,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 767,
"end": 774,
"ctxt": 0
},
"value": "hasData",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 778,
"end": 832,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 792,
"end": 822,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 792,
"end": 821,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 792,
"end": 819,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 792,
"end": 801,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 792,
"end": 796,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 797,
"end": 801,
"ctxt": 0
},
"value": "data",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 802,
"end": 819,
"ctxt": 0
},
"value": "toLocaleLowerCase",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"alternate": null
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 843,
"end": 904,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 843,
"end": 850,
"ctxt": 0
},
"value": "hasData",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 843,
"end": 904,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 876,
"end": 904,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 886,
"end": 898,
"ctxt": 0
},
"argument": {
"type": "BooleanLiteral",
"span": {
"start": 893,
"end": 897,
"ctxt": 0
},
"value": true
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 852,
"end": 875,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypePredicate",
"span": {
"start": 854,
"end": 875,
"ctxt": 0
},
"asserts": false,
"paramName": {
"type": "TsThisType",
"span": {
"start": 854,
"end": 858,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 862,
"end": 875,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 862,
"end": 875,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 862,
"end": 872,
"ctxt": 0
},
"value": "DatafulFoo",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 872,
"end": 875,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 873,
"end": 874,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 873,
"end": 874,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 692,
"end": 710,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 693,
"end": 709,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 693,
"end": 694,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 703,
"end": 709,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}