swc/crates/swc_ecma_parser/tests/tsc/commonJSImportAsPrimaryExpression.json
Donny/강동윤 3958f1792c
refactor(es/ast): Remove unused fields (#7518)
**Related issue:**

 - Closes #7347.
 - Closes #7487.
2023-06-12 08:02:34 +00:00

224 lines
4.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 45,
"end": 199,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 45,
"end": 93,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 52,
"end": 93,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 64,
"end": 72,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 64,
"end": 66,
"ctxt": 0
},
"value": "m1",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 69,
"end": 71,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 74,
"end": 91,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 81,
"end": 83,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 86,
"end": 90,
"ctxt": 0
},
"value": true
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 118,
"end": 150,
"ctxt": 0
},
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 125,
"end": 128,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 131,
"end": 149,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"value": "./foo_0",
"raw": "\"./foo_0\""
}
}
},
{
"type": "IfStatement",
"span": {
"start": 151,
"end": 199,
"ctxt": 0
},
"test": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 163,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 160,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 154,
"end": 157,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 158,
"end": 160,
"ctxt": 0
},
"value": "C1",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 161,
"end": 163,
"ctxt": 0
},
"value": "s1",
"optional": false
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 164,
"end": 199,
"ctxt": 0
},
"stmts": []
},
"alternate": null
}
],
"interpreter": null
}