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

483 lines
13 KiB
JSON

{
"type": "Module",
"span": {
"start": 169,
"end": 436,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 169,
"end": 232,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 232,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXFragment",
"span": {
"start": 179,
"end": 232,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
}
},
"children": [
{
"type": "JSXText",
"span": {
"start": 181,
"end": 184,
"ctxt": 0
},
"value": "\n\n ",
"raw": "\n\n "
},
{
"type": "JSXElement",
"span": {
"start": 184,
"end": 191,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "p",
"optional": false
},
"span": {
"start": 184,
"end": 187,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 187,
"end": 191,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
},
{
"type": "JSXText",
"span": {
"start": 191,
"end": 201,
"ctxt": 0
},
"value": "\n\n text\n\n ",
"raw": "\n\n text\n\n "
},
{
"type": "JSXElement",
"span": {
"start": 201,
"end": 228,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 202,
"end": 205,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 201,
"end": 222,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 206,
"end": 221,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 206,
"end": 215,
"ctxt": 0
},
"value": "className",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 216,
"end": 221,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 222,
"end": 228,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 224,
"end": 227,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
{
"type": "JSXText",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "\n\n",
"raw": "\n\n"
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 234,
"end": 244,
"ctxt": 0
},
"specifiers": [],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 342,
"end": 360,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 349,
"end": 359,
"ctxt": 0
},
"value": "./preact",
"raw": "\"./preact\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 361,
"end": 424,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 367,
"end": 424,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXFragment",
"span": {
"start": 371,
"end": 424,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 371,
"end": 373,
"ctxt": 0
}
},
"children": [
{
"type": "JSXText",
"span": {
"start": 373,
"end": 376,
"ctxt": 0
},
"value": "\n\n ",
"raw": "\n\n "
},
{
"type": "JSXElement",
"span": {
"start": 376,
"end": 383,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "p",
"optional": false
},
"span": {
"start": 376,
"end": 379,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 379,
"end": 383,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
},
{
"type": "JSXText",
"span": {
"start": 383,
"end": 393,
"ctxt": 0
},
"value": "\n\n text\n\n ",
"raw": "\n\n text\n\n "
},
{
"type": "JSXElement",
"span": {
"start": 393,
"end": 420,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 394,
"end": 397,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 393,
"end": 414,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 398,
"end": 413,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 398,
"end": 407,
"ctxt": 0
},
"value": "className",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 413,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 414,
"end": 420,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 416,
"end": 419,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
{
"type": "JSXText",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"value": "\n\n",
"raw": "\n\n"
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 421,
"end": 424,
"ctxt": 0
}
}
},
"definite": false
}
]
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 426,
"end": 436,
"ctxt": 0
},
"specifiers": [],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}