swc/crates/swc_ecma_parser/tests/tsc/exportDeclaration_moduleSpecifier.json
2022-03-22 07:54:08 +00:00

217 lines
4.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 20,
"end": 163,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 20,
"end": 37,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 27,
"end": 37,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 59,
"end": 88,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "./a",
"raw": "'./a'"
},
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 110,
"end": 134,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 128,
"end": 133,
"ctxt": 0
},
"value": "./b",
"raw": "'./b'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 135,
"end": 154,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 155,
"end": 163,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 155,
"end": 162,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}