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

783 lines
16 KiB
JSON

{
"type": "Module",
"span": {
"start": 99,
"end": 766,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 99,
"end": 118,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 106,
"end": 118,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 112,
"end": 117,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 119,
"end": 144,
"ctxt": 0
},
"declaration": {
"type": "TsTypeAliasDeclaration",
"span": {
"start": 126,
"end": 144,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 135,
"end": 143,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeArguments": null
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 145,
"end": 167,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 158,
"end": 164,
"ctxt": 0
},
"value": "AClass",
"optional": false
},
"declare": false,
"span": {
"start": 152,
"end": 167,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 189,
"end": 224,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "a",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 204,
"end": 210,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 204,
"end": 210,
"ctxt": 0
},
"value": "AClass",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 218,
"end": 223,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 225,
"end": 276,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 239,
"end": 250,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 244,
"end": 250,
"ctxt": 0
},
"value": "aValue",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "a",
"optional": false
},
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 252,
"end": 262,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 257,
"end": 262,
"ctxt": 0
},
"value": "AType",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 277,
"end": 316,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 286,
"end": 302,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 296,
"end": 302,
"ctxt": 0
},
"value": "AType2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 291,
"end": 292,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isTypeOnly": true
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 310,
"end": 315,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 318,
"end": 331,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 327,
"end": 328,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 327,
"end": 328,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 332,
"end": 362,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 341,
"end": 348,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 346,
"end": 348,
"ctxt": 0
},
"value": "A2",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 356,
"end": 361,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 363,
"end": 398,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 377,
"end": 384,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 382,
"end": 384,
"ctxt": 0
},
"value": "A3",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 392,
"end": 397,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 399,
"end": 434,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 408,
"end": 420,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 413,
"end": 414,
"ctxt": 0
},
"value": "A",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 418,
"end": 420,
"ctxt": 0
},
"value": "A4",
"optional": false
},
"isTypeOnly": true
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 428,
"end": 433,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 435,
"end": 469,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 449,
"end": 455,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 449,
"end": 455,
"ctxt": 0
},
"value": "AClass",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 463,
"end": 468,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 491,
"end": 520,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 500,
"end": 506,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 500,
"end": 506,
"ctxt": 0
},
"value": "AClass",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 514,
"end": 519,
"ctxt": 0
},
"value": "./b",
"raw": "\"./b\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 546,
"end": 563,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "ExportDefaultDeclaration",
"span": {
"start": 595,
"end": 620,
"ctxt": 0
},
"decl": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 616,
"end": 617,
"ctxt": 0
},
"value": "C",
"optional": false
},
"span": {
"start": 610,
"end": 620,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 652,
"end": 666,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 662,
"end": 663,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 664,
"end": 666,
"ctxt": 0
},
"body": []
}
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 667,
"end": 684,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 682,
"end": 683,
"ctxt": 0
},
"value": "I",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 719,
"end": 748,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 731,
"end": 732,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 731,
"end": 732,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 738,
"end": 747,
"ctxt": 0
},
"value": "./main5",
"raw": "\"./main5\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 749,
"end": 766,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 764,
"end": 765,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
],
"interpreter": null
}