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

245 lines
7.1 KiB
JSON

{
"type": "Module",
"span": {
"start": 7,
"end": 177,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 7,
"end": 177,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 20,
"end": 33,
"ctxt": 0
},
"value": "LoggerAdapter",
"optional": false
},
"declare": false,
"span": {
"start": 14,
"end": 177,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 63,
"end": 171,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 63,
"end": 74,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 76,
"end": 98,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 83,
"end": 98,
"ctxt": 0
},
"value": "logger",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 91,
"end": 98,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 91,
"end": 98,
"ctxt": 0
},
"value": "ILogger",
"optional": false
},
"typeParams": null
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 100,
"end": 171,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 115,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 115,
"end": 160,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 115,
"end": 132,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 115,
"end": 119,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 120,
"end": 132,
"ctxt": 0
},
"value": "_information",
"optional": false
}
},
"right": {
"type": "CallExpression",
"span": {
"start": 135,
"end": 160,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 135,
"end": 158,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 135,
"end": 146,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 135,
"end": 139,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 140,
"end": 146,
"ctxt": 0
},
"value": "logger",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 147,
"end": 158,
"ctxt": 0
},
"value": "information",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 45,
"end": 52,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 45,
"end": 52,
"ctxt": 0
},
"value": "ILogger",
"optional": false
},
"typeArguments": null
}
]
}
}
],
"interpreter": null
}