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

192 lines
4.3 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 33,
"end": 282,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 33,
"end": 54,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 48,
"end": 53,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": null
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 89,
"end": 143,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 104,
"end": 109,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 110,
"end": 143,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 116,
"end": 141,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 141,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 140,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 132,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 140,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 134,
"end": 140,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 253,
"end": 282,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 260,
"end": 263,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 260,
"end": 263,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 266,
"end": 269,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 266,
"end": 269,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 276,
"end": 281,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}