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

260 lines
5.7 KiB
JSON

{
"type": "Module",
"span": {
"start": 52,
"end": 198,
"ctxt": 0
},
"body": [
{
"type": "ExportNamedDeclaration",
"span": {
"start": 52,
"end": 62,
"ctxt": 0
},
"specifiers": [],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 63,
"end": 87,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 70,
"end": 72,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 75,
"end": 86,
"ctxt": 0
},
"value": "NonExistent",
"optional": false
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 89,
"end": 157,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 99,
"end": 102,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 103,
"end": 157,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 109,
"end": 130,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 116,
"end": 130,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 122,
"end": 125,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 135,
"end": 155,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 142,
"end": 155,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"kind": "any"
}
}
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 159,
"end": 179,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 166,
"end": 168,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"moduleRef": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 171,
"end": 174,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 175,
"end": 178,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 180,
"end": 198,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 187,
"end": 189,
"ctxt": 0
},
"value": "f3",
"optional": false
},
"moduleRef": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 192,
"end": 195,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"value": "T",
"optional": false
}
}
}
],
"interpreter": null
}