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

172 lines
3.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 123,
"end": 376,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 123,
"end": 166,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 130,
"end": 166,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 136,
"end": 165,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 136,
"end": 143,
"ctxt": 0
},
"value": "kSymbol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 146,
"end": 165,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 146,
"end": 152,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 153,
"end": 164,
"ctxt": 0
},
"value": "my-symbol",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 330,
"end": 376,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": "b",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 337,
"end": 376,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 355,
"end": 376,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 361,
"end": 374,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 368,
"end": 373,
"ctxt": 0
},
"value": "value",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
],
"interpreter": null
}