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

255 lines
5.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 140,
"end": 307,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 146,
"end": 149,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 140,
"end": 152,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 153,
"end": 174,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 153,
"end": 173,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 153,
"end": 167,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 153,
"end": 159,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 160,
"end": 167,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 170,
"end": 173,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 199,
"end": 237,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 207,
"end": 222,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
},
"value": "Fooa",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 207,
"end": 214,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 229,
"end": 236,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDeclaration",
"span": {
"start": 239,
"end": 267,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 246,
"end": 267,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 252,
"end": 266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 256,
"end": 266,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 260,
"end": 264,
"ctxt": 0
},
"value": "Fooa",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 269,
"end": 307,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 277,
"end": 292,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 277,
"end": 284,
"ctxt": 0
},
"value": "default",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 288,
"end": 292,
"ctxt": 0
},
"value": "Foob",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 299,
"end": 306,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}