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

200 lines
4.1 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 20,
"end": 124,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 20,
"end": 30,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 31,
"end": 49,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 71,
"end": 95,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 89,
"end": 94,
"ctxt": 0
},
"value": "./a",
"raw": "'./a'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 96,
"end": 115,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 110,
"end": 114,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 111,
"end": 114,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 116,
"end": 124,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 116,
"end": 123,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}