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

343 lines
8.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 134,
"end": 382,
"ctxt": 0
},
"body": [
{
"type": "ExportNamedDeclaration",
"span": {
"start": 134,
"end": 144,
"ctxt": 0
},
"specifiers": [],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 145,
"end": 164,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 151,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 155,
"end": 163,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": 1.0
}
},
null,
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": 2.0
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 165,
"end": 188,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 171,
"end": 187,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 175,
"end": 187,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": 3.0
}
},
{
"spread": {
"start": 179,
"end": 182,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "k",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": 4.0
}
}
]
},
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 297,
"end": 382,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 312,
"end": 319,
"ctxt": 0
},
"value": "tslib",
"raw": "\"tslib\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 320,
"end": 382,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 335,
"end": 348,
"ctxt": 0
},
"value": "__spreadArray",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"value": "to",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 353,
"end": 358,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"kind": "any"
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 360,
"end": 371,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 360,
"end": 371,
"ctxt": 0
},
"value": "from",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 364,
"end": 371,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 366,
"end": 371,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 366,
"end": 369,
"ctxt": 0
},
"kind": "any"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 326,
"end": 380,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 372,
"end": 379,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 374,
"end": 379,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 374,
"end": 377,
"ctxt": 0
},
"kind": "any"
}
}
}
}
]
}
}
],
"interpreter": null
}