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

608 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 98,
"end": 475,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 98,
"end": 117,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 105,
"end": 117,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 118,
"end": 137,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 125,
"end": 137,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 131,
"end": 136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": 2.0
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 158,
"end": 202,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 173,
"end": 178,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 186,
"end": 202,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 188,
"end": 192,
"ctxt": 0
},
"value": "type",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 194,
"end": 200,
"ctxt": 0
},
"value": "json",
"raw": "\"json\""
}
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 203,
"end": 253,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 224,
"end": 229,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 237,
"end": 253,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 239,
"end": 243,
"ctxt": 0
},
"value": "type",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 245,
"end": 251,
"ctxt": 0
},
"value": "json",
"raw": "\"json\""
}
}
]
}
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 254,
"end": 297,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 268,
"end": 273,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 281,
"end": 297,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 283,
"end": 287,
"ctxt": 0
},
"value": "type",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 289,
"end": 295,
"ctxt": 0
},
"value": "json",
"raw": "\"json\""
}
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 298,
"end": 347,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 305,
"end": 312,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 310,
"end": 312,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 318,
"end": 323,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 331,
"end": 347,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"value": "type",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 339,
"end": 345,
"ctxt": 0
},
"value": "json",
"raw": "\"json\""
}
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 368,
"end": 404,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 389,
"end": 394,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 402,
"end": 404,
"ctxt": 0
},
"properties": []
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 405,
"end": 475,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 414,
"end": 420,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 414,
"end": 415,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"value": "c",
"optional": false
},
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 422,
"end": 428,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 427,
"end": 428,
"ctxt": 0
},
"value": "d",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 436,
"end": 441,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": {
"type": "ObjectExpression",
"span": {
"start": 449,
"end": 475,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 454,
"end": 457,
"ctxt": 0
},
"value": "a",
"raw": "\"a\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 459,
"end": 460,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 462,
"end": 465,
"ctxt": 0
},
"value": "b",
"raw": "\"b\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 470,
"end": 473,
"ctxt": 0
},
"value": "c",
"raw": "\"c\""
}
}
]
}
}
],
"interpreter": null
}