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

217 lines
4.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 21,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 21,
"end": 38,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 28,
"end": 38,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 60,
"end": 89,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "./a",
"raw": "'./a'"
},
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 111,
"end": 135,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 129,
"end": 134,
"ctxt": 0
},
"value": "./b",
"raw": "'./b'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 136,
"end": 155,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 150,
"end": 154,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 156,
"end": 164,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 156,
"end": 163,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}