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

173 lines
3.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 291,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 21,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 20,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 12,
"ctxt": 0
},
"value": "declare",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 12,
"end": 20,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 14,
"end": 20,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 22,
"end": 41,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 26,
"end": 40,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 26,
"end": 32,
"ctxt": 0
},
"value": "module",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 32,
"end": 40,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 43,
"end": 291,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 50,
"end": 59,
"ctxt": 0
},
"value": "container",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 60,
"end": 291,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 66,
"end": 246,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 191,
"end": 211,
"ctxt": 0
},
"value": "my external module",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 243,
"end": 246,
"ctxt": 0
},
"body": []
}
}
]
}
}
],
"interpreter": null
}