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

325 lines
6.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 43,
"end": 219,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 43,
"end": 62,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 50,
"end": 62,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 54,
"end": 61,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 61,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 63,
"end": 82,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 70,
"end": 82,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 74,
"end": 81,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": "y",
"raw": "\"y\""
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 104,
"end": 142,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 113,
"end": 119,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "x",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"value": "y",
"optional": false
},
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 121,
"end": 127,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"value": "y",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": "x",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 135,
"end": 141,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 164,
"end": 192,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": "x",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "y",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 185,
"end": 191,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 193,
"end": 219,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 202,
"end": 208,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "x",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": "y",
"optional": false
},
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 210,
"end": 216,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "y",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "x",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}