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

210 lines
4.6 KiB
JSON

{
"type": "Module",
"span": {
"start": 20,
"end": 150,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 20,
"end": 66,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 27,
"end": 66,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 37,
"end": 42,
"ctxt": 0
},
"value": "types",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 43,
"end": 66,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 47,
"end": 64,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 54,
"end": 64,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 87,
"end": 117,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 99,
"end": 105,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"value": "./a",
"raw": "'./a'"
},
"typeOnly": true,
"asserts": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 118,
"end": 150,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 138,
"end": 147,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 138,
"end": 147,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 138,
"end": 145,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 140,
"end": 145,
"ctxt": 0
},
"value": "types",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 148,
"end": 150,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}