swc/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassStatic.json
2022-03-22 07:54:08 +00:00

434 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 116,
"end": 327,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"value": "Handler",
"optional": false
},
"declare": false,
"span": {
"start": 116,
"end": 189,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 133,
"end": 170,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 144,
"end": 151,
"ctxt": 0
},
"value": "OPTIONS",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 133,
"end": 170,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 154,
"end": 170,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 158,
"end": 167,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 165,
"end": 166,
"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
},
{
"type": "ClassMethod",
"span": {
"start": 173,
"end": 187,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 173,
"end": 180,
"ctxt": 0
},
"value": "process",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 173,
"end": 187,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 190,
"end": 224,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 190,
"end": 224,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 207,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 190,
"end": 197,
"ctxt": 0
},
"value": "Handler",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 198,
"end": 207,
"ctxt": 0
},
"value": "statische",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 210,
"end": 224,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 221,
"end": 224,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 225,
"end": 267,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 231,
"end": 267,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 231,
"end": 238,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 241,
"end": 267,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 250,
"end": 253,
"ctxt": 0
},
"value": "A",
"raw": "\"A\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 262,
"end": 265,
"ctxt": 0
},
"value": "B",
"raw": "\"B\""
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 269,
"end": 294,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 269,
"end": 293,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 269,
"end": 283,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 269,
"end": 275,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 276,
"end": 283,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 286,
"end": 293,
"ctxt": 0
},
"value": "Handler",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 295,
"end": 327,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 295,
"end": 327,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 295,
"end": 317,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 295,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 295,
"end": 301,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 310,
"end": 317,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 320,
"end": 327,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}