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

386 lines
11 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 35,
"end": 229,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"value": "A1",
"optional": false
},
"declare": false,
"span": {
"start": 35,
"end": 229,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateMethod",
"span": {
"start": 50,
"end": 114,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 57,
"end": 64,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 58,
"end": 64,
"ctxt": 0
},
"value": "method",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 65,
"end": 78,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 65,
"end": 78,
"ctxt": 0
},
"value": "param",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 70,
"end": 78,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 72,
"end": 78,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 50,
"end": 114,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 88,
"end": 114,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 98,
"end": 108,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 105,
"end": 107,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"kind": "string"
}
}
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "Constructor",
"span": {
"start": 119,
"end": 227,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 119,
"end": 130,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 133,
"end": 227,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 143,
"end": 157,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 143,
"end": 157,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 143,
"end": 153,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": "A1",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 146,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 147,
"end": 153,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 154,
"end": 156,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 166,
"end": 179,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 166,
"end": 179,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 166,
"end": 176,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 166,
"end": 168,
"ctxt": 0
},
"value": "A1",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 169,
"end": 176,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 197,
"end": 209,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 197,
"end": 209,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 197,
"end": 207,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 197,
"end": 199,
"ctxt": 0
},
"value": "A1",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 200,
"end": 207,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 201,
"end": 207,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}