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

369 lines
9.0 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 24,
"end": 239,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 24,
"end": 91,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 39,
"end": 46,
"ctxt": 0
},
"value": "*.foo",
"raw": "\"*.foo\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 47,
"end": 91,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 51,
"end": 89,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 58,
"end": 89,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 72,
"ctxt": 0
},
"value": "OhNo",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 73,
"end": 89,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 75,
"end": 87,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 75,
"end": 79,
"ctxt": 0
},
"value": "star",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 115,
"end": 179,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 130,
"end": 137,
"ctxt": 0
},
"value": "a.foo",
"raw": "\"a.foo\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 138,
"end": 179,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 142,
"end": 177,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 149,
"end": 177,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 159,
"end": 163,
"ctxt": 0
},
"value": "OhNo",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 164,
"end": 177,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 166,
"end": 175,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 167,
"end": 175,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 169,
"end": 175,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 180,
"end": 208,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"value": "OhNo",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 201,
"end": 208,
"ctxt": 0
},
"value": "b.foo",
"raw": "\"b.foo\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 209,
"end": 232,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 221,
"end": 231,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 221,
"end": 225,
"ctxt": 0
},
"value": "ohno",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 225,
"end": 231,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 227,
"end": 231,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 227,
"end": 231,
"ctxt": 0
},
"value": "OhNo",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 233,
"end": 237,
"ctxt": 0
},
"value": "ohno",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
],
"interpreter": null
}