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

359 lines
8.0 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 73,
"end": 549,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 73,
"end": 124,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 88,
"end": 93,
"ctxt": 0
},
"value": "equ",
"raw": "'equ'"
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 94,
"end": 124,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 100,
"end": 106,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "TsExportAssignment",
"span": {
"start": 111,
"end": 122,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 126,
"end": 170,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"value": "equ2",
"raw": "'equ2'"
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 148,
"end": 170,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 154,
"end": 168,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 158,
"end": 167,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 159,
"end": 167,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 161,
"end": 167,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 334,
"end": 363,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 341,
"end": 345,
"ctxt": 0
},
"value": "imp1",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 348,
"end": 362,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 356,
"end": 361,
"ctxt": 0
},
"value": "equ",
"raw": "'equ'"
}
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 488,
"end": 518,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 495,
"end": 499,
"ctxt": 0
},
"value": "imp3",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 502,
"end": 517,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 510,
"end": 516,
"ctxt": 0
},
"value": "equ2",
"raw": "'equ2'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 519,
"end": 534,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 523,
"end": 533,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 527,
"end": 533,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 527,
"end": 531,
"ctxt": 0
},
"value": "imp3",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 535,
"end": 549,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 539,
"end": 548,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 539,
"end": 540,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 540,
"end": 548,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 542,
"end": 548,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
],
"interpreter": null
}