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

261 lines
5.3 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 33,
"end": 280,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 33,
"end": 56,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 48,
"end": 56,
"ctxt": 0
},
"value": "jquery",
"raw": "\"jquery\""
},
"body": null
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 82,
"end": 102,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 97,
"end": 101,
"ctxt": 0
},
"value": "fs",
"raw": "\"fs\""
},
"body": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 167,
"end": 199,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 174,
"end": 177,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 174,
"end": 177,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 180,
"end": 183,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 180,
"end": 183,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 198,
"ctxt": 0
},
"value": "jquery",
"raw": "\"jquery\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 200,
"end": 226,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 207,
"end": 215,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 212,
"end": 215,
"ctxt": 0
},
"value": "baz",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 221,
"end": 225,
"ctxt": 0
},
"value": "fs",
"raw": "\"fs\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 227,
"end": 259,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 234,
"end": 238,
"ctxt": 0
},
"value": "boom",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 241,
"end": 258,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 249,
"end": 257,
"ctxt": 0
},
"value": "jquery",
"raw": "\"jquery\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 260,
"end": 280,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 260,
"end": 279,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 260,
"end": 263,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 264,
"end": 267,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 269,
"end": 272,
"ctxt": 0
},
"value": "baz",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 274,
"end": 278,
"ctxt": 0
},
"value": "boom",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}