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

585 lines
14 KiB
JSON

{
"type": "Module",
"span": {
"start": 43,
"end": 493,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 43,
"end": 165,
"ctxt": 0
},
"declare": true,
"global": true,
"id": {
"type": "Identifier",
"span": {
"start": 51,
"end": 57,
"ctxt": 0
},
"value": "global",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 58,
"end": 165,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 64,
"end": 163,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 78,
"end": 163,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 88,
"end": 157,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 98,
"end": 115,
"ctxt": 0
},
"value": "IntrinsicElements",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 116,
"end": 157,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 131,
"end": 140,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 140,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 134,
"end": 140,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 141,
"end": 146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"kind": "any"
}
},
"readonly": false,
"static": false,
"span": {
"start": 130,
"end": 147,
"ctxt": 0
}
}
]
}
}
]
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 166,
"end": 192,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "h",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 173,
"end": 192,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 185,
"end": 191,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 187,
"end": 191,
"ctxt": 0
},
"kind": "void"
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 193,
"end": 221,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 209,
"end": 212,
"ctxt": 0
},
"value": "jsx",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 200,
"end": 221,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 214,
"end": 220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 216,
"end": 220,
"ctxt": 0
},
"kind": "void"
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 222,
"end": 255,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 238,
"end": 246,
"ctxt": 0
},
"value": "Fragment",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 229,
"end": 255,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 248,
"end": 254,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 250,
"end": 254,
"ctxt": 0
},
"kind": "void"
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 322,
"end": 361,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 330,
"end": 331,
"ctxt": 0
},
"value": "h",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 333,
"end": 341,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 333,
"end": 341,
"ctxt": 0
},
"value": "Fragment",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 348,
"end": 360,
"ctxt": 0
},
"value": "./renderer",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 362,
"end": 378,
"ctxt": 0
},
"expression": {
"type": "JSXFragment",
"span": {
"start": 362,
"end": 378,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 362,
"end": 364,
"ctxt": 0
}
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 364,
"end": 375,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 365,
"end": 368,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 364,
"end": 369,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 369,
"end": 375,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 371,
"end": 374,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 375,
"end": 378,
"ctxt": 0
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 443,
"end": 474,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 451,
"end": 454,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 451,
"end": 454,
"ctxt": 0
},
"value": "jsx",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 461,
"end": 473,
"ctxt": 0
},
"value": "./renderer",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 475,
"end": 493,
"ctxt": 0
},
"expression": {
"type": "JSXFragment",
"span": {
"start": 475,
"end": 493,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 475,
"end": 477,
"ctxt": 0
}
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 477,
"end": 490,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 478,
"end": 482,
"ctxt": 0
},
"value": "span",
"optional": false
},
"span": {
"start": 477,
"end": 483,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 483,
"end": 490,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 485,
"end": 489,
"ctxt": 0
},
"value": "span",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 490,
"end": 493,
"ctxt": 0
}
}
}
}
],
"interpreter": null
}