mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
660 lines
17 KiB
JSON
660 lines
17 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 249,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 24,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 24,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 16,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 24,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 18,
|
|
"end": 24,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"value": "nnnu",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTupleType",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 70,
|
|
"ctxt": 0
|
|
},
|
|
"elemTypes": [
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsOptionalType",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 69,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": true,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 85,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 85,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"value": "nntnnnt",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsTupleType",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 110,
|
|
"ctxt": 0
|
|
},
|
|
"elemTypes": [
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 109,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 109,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "TsTupleType",
|
|
"span": {
|
|
"start": 113,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"elemTypes": [
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 114,
|
|
"end": 120,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 114,
|
|
"end": 120,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 128,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 128,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTupleElement",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"label": null,
|
|
"ty": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 155,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fn",
|
|
"optional": false
|
|
},
|
|
"declare": true,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 159,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 161,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bb",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 184,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 192,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 196,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsArrayType",
|
|
"span": {
|
|
"start": 198,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"elemType": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 198,
|
|
"end": 204,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 138,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"body": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 207,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 215,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 217,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 217,
|
|
"end": 231,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 217,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fn",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": {
|
|
"start": 220,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"value": "nnnu",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 229,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 249,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 249,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 234,
|
|
"ctxt": 0
|
|
},
|
|
"value": "fn",
|
|
"optional": false
|
|
},
|
|
"arguments": [
|
|
{
|
|
"spread": {
|
|
"start": 235,
|
|
"end": 238,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 238,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"value": "nntnnnt",
|
|
"optional": false
|
|
}
|
|
},
|
|
{
|
|
"spread": null,
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 247,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"typeArguments": null
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|