swc/crates/swc_ecma_parser/tests/tsc/tsxExternalModuleEmit2.json
2022-03-22 07:54:08 +00:00

371 lines
8.3 KiB
JSON

{
"type": "Module",
"span": {
"start": 61,
"end": 328,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 61,
"end": 119,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 76,
"end": 81,
"ctxt": 0
},
"value": "mod",
"raw": "'mod'"
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 82,
"end": 119,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 86,
"end": 97,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 90,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 96,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 100,
"end": 117,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 142,
"end": 165,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"value": "Main",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 159,
"end": 164,
"ctxt": 0
},
"value": "mod",
"raw": "'mod'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 166,
"end": 189,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 178,
"end": 181,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 178,
"end": 181,
"ctxt": 0
},
"value": "Foo",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 183,
"end": 188,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 183,
"end": 188,
"ctxt": 0
},
"value": "React",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 234,
"end": 261,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 234,
"end": 260,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 235,
"end": 238,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"span": {
"start": 234,
"end": 254,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 239,
"end": 253,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 239,
"end": 246,
"ctxt": 0
},
"value": "handler",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 247,
"end": 253,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 248,
"end": 252,
"ctxt": 0
},
"value": "Main",
"optional": false
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 254,
"end": 260,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 256,
"end": 259,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 306,
"end": 328,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 306,
"end": 327,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 307,
"end": 310,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"span": {
"start": 306,
"end": 321,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 312,
"end": 315,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 315,
"end": 319,
"ctxt": 0
},
"value": "Main",
"optional": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 321,
"end": 327,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 323,
"end": 326,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
}
}
],
"interpreter": null
}