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

350 lines
7.1 KiB
JSON

{
"type": "Module",
"span": {
"start": 48,
"end": 250,
"ctxt": 0
},
"body": [
{
"type": "ExportNamedDeclaration",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "x",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 61,
"end": 79,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 70,
"end": 77,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "x",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 75,
"end": 77,
"ctxt": 0
},
"value": "xx",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 80,
"end": 97,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 99,
"end": 112,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 105,
"end": 112,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 109,
"end": 112,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
},
"definite": false
}
]
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 114,
"end": 131,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "Y",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "Z",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "Y",
"optional": false
},
"declare": false,
"span": {
"start": 132,
"end": 142,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 189,
"end": 201,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "y",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 202,
"end": 220,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 211,
"end": 218,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 211,
"end": 212,
"ctxt": 0
},
"value": "y",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"value": "yy",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 221,
"end": 238,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 239,
"end": 250,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 243,
"end": 250,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 247,
"end": 250,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
},
"definite": false
}
]
}
],
"interpreter": null
}