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

513 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 43,
"end": 427,
"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": 194,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 182,
"end": 185,
"ctxt": 0
},
"value": "dom",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 173,
"end": 194,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"kind": "void"
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 195,
"end": 233,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 211,
"end": 224,
"ctxt": 0
},
"value": "createElement",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 202,
"end": 233,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 226,
"end": 232,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 228,
"end": 232,
"ctxt": 0
},
"kind": "void"
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 291,
"end": 327,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 298,
"end": 308,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 303,
"end": 308,
"ctxt": 0
},
"value": "React",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 314,
"end": 326,
"ctxt": 0
},
"value": "./renderer",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 328,
"end": 340,
"ctxt": 0
},
"expression": {
"type": "JSXFragment",
"span": {
"start": 328,
"end": 340,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 328,
"end": 330,
"ctxt": 0
}
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 330,
"end": 337,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 331,
"end": 332,
"ctxt": 0
},
"value": "h",
"optional": false
},
"span": {
"start": 330,
"end": 333,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 337,
"end": 340,
"ctxt": 0
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 381,
"end": 414,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 390,
"end": 393,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 390,
"end": 393,
"ctxt": 0
},
"value": "dom",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 401,
"end": 413,
"ctxt": 0
},
"value": "./renderer",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 415,
"end": 427,
"ctxt": 0
},
"expression": {
"type": "JSXFragment",
"span": {
"start": 415,
"end": 427,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningFragment",
"span": {
"start": 415,
"end": 417,
"ctxt": 0
}
},
"children": [
{
"type": "JSXElement",
"span": {
"start": 417,
"end": 424,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": "h",
"optional": false
},
"span": {
"start": 417,
"end": 420,
"ctxt": 0
},
"attributes": [],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 420,
"end": 424,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "h",
"optional": false
}
}
}
],
"closing": {
"type": "JSXClosingFragment",
"span": {
"start": 424,
"end": 427,
"ctxt": 0
}
}
}
}
],
"interpreter": null
}