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

139 lines
2.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 137,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 23,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 22,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 14,
"ctxt": 0
},
"value": "namespace",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 14,
"end": 22,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 16,
"end": 22,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 24,
"end": 38,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 28,
"end": 37,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 29,
"end": 37,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 31,
"end": 37,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 40,
"end": 137,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "n",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 134,
"end": 137,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}