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

310 lines
7.0 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 23,
"end": 264,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 23,
"end": 75,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"value": "*.foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 46,
"end": 75,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 50,
"end": 73,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 54,
"end": 72,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 64,
"ctxt": 0
},
"value": "everywhere",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 64,
"end": 72,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 66,
"end": 72,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 101,
"end": 145,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 110,
"end": 120,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 110,
"end": 120,
"ctxt": 0
},
"value": "everywhere",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"value": "onlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"value": "a.foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 146,
"end": 195,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 161,
"end": 168,
"ctxt": 0
},
"value": "a.foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 169,
"end": 195,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 173,
"end": 193,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 177,
"end": 192,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 177,
"end": 184,
"ctxt": 0
},
"value": "onlyInA",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 184,
"end": 192,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 186,
"end": 192,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 220,
"end": 264,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 229,
"end": 239,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 229,
"end": 239,
"ctxt": 0
},
"value": "everywhere",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"value": "onlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 256,
"end": 263,
"ctxt": 0
},
"value": "b.foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}