mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
019cf37199
**Related issue:** - https://github.com/microsoft/TypeScript/pull/51865.
2274 lines
63 KiB
JSON
2274 lines
63 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 783,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 38,
|
|
"end": 52,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 45,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 48,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"raw": "'a'"
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f1",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 105,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 107,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 107,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 54,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 110,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 116,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 122,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 125,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r0",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 132,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 141,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 145,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 145,
|
|
"end": 161,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 148,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 152,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 154,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 154,
|
|
"end": 157,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 157,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 164,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 207,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 177,
|
|
"end": 200,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 179,
|
|
"end": 180,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 184,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 187,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 191,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 193,
|
|
"end": 198,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 193,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 196,
|
|
"end": 198,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 212,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 234,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"raw": "'a'"
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 232,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 227,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 232,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r3",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 237,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 277,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 250,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 250,
|
|
"end": 270,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 252,
|
|
"end": 257,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 253,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"raw": "'a'"
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a4",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 263,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 263,
|
|
"end": 266,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 268,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r4",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 273,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 282,
|
|
"end": 311,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 286,
|
|
"end": 310,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 286,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 288,
|
|
"end": 291,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 289,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 293,
|
|
"end": 295,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a5",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 297,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 297,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 300,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r5",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 307,
|
|
"end": 310,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 67,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 79,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 81,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 335,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 321,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 321,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sa",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 326,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 326,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 336,
|
|
"end": 356,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 342,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 342,
|
|
"end": 344,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sb",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 347,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 347,
|
|
"end": 353,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Symbol",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 369,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 412,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 412,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 415,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 417,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 417,
|
|
"end": 418,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 358,
|
|
"end": 468,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 420,
|
|
"end": 468,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 426,
|
|
"end": 466,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 430,
|
|
"end": 465,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 430,
|
|
"end": 459,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 432,
|
|
"end": 436,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 433,
|
|
"end": 435,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sa",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 438,
|
|
"end": 440,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 442,
|
|
"end": 446,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 443,
|
|
"end": 445,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sb",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 448,
|
|
"end": 450,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 452,
|
|
"end": 457,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 452,
|
|
"end": 455,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 457,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 462,
|
|
"end": 465,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 369,
|
|
"end": 411,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 370,
|
|
"end": 410,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 370,
|
|
"end": 371,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 380,
|
|
"end": 410,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 382,
|
|
"end": 395,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 383,
|
|
"end": 385,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sa",
|
|
"optional": false
|
|
},
|
|
"computed": true,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 386,
|
|
"end": 394,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 388,
|
|
"end": 394,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 396,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 399,
|
|
"ctxt": 0
|
|
},
|
|
"value": "sb",
|
|
"optional": false
|
|
},
|
|
"computed": true,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 400,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 402,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 479,
|
|
"end": 481,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f3",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 525,
|
|
"end": 531,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 525,
|
|
"end": 531,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 528,
|
|
"end": 531,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 530,
|
|
"end": 531,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 530,
|
|
"end": 531,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 533,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 533,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 535,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 537,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 537,
|
|
"end": 539,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K1",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 541,
|
|
"end": 547,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 541,
|
|
"end": 547,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 543,
|
|
"end": 547,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 545,
|
|
"end": 547,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 545,
|
|
"end": 547,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K2",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 470,
|
|
"end": 597,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 549,
|
|
"end": 597,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 555,
|
|
"end": 595,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 559,
|
|
"end": 594,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 559,
|
|
"end": 588,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 561,
|
|
"end": 565,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 562,
|
|
"end": 564,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k1",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 567,
|
|
"end": 569,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 571,
|
|
"end": 575,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 572,
|
|
"end": 574,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k2",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 577,
|
|
"end": 579,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 581,
|
|
"end": 586,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 581,
|
|
"end": 584,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 584,
|
|
"end": 586,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 591,
|
|
"end": 594,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 481,
|
|
"end": 524,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 482,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 482,
|
|
"end": 483,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
},
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 485,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 485,
|
|
"end": 487,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K1",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeOperator",
|
|
"span": {
|
|
"start": 496,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"op": "keyof",
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 502,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 502,
|
|
"end": 503,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"default": null
|
|
},
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 505,
|
|
"end": 523,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 505,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K2",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeOperator",
|
|
"span": {
|
|
"start": 516,
|
|
"end": 523,
|
|
"ctxt": 0
|
|
},
|
|
"op": "keyof",
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 522,
|
|
"end": 523,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 522,
|
|
"end": 523,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
},
|
|
{
|
|
"type": "TsTypeAliasDeclaration",
|
|
"span": {
|
|
"start": 599,
|
|
"end": 648,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 604,
|
|
"end": 608,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Item",
|
|
"optional": false
|
|
},
|
|
"typeParams": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 611,
|
|
"end": 647,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 613,
|
|
"end": 623,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 613,
|
|
"end": 614,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 614,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 616,
|
|
"end": 622,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 624,
|
|
"end": 634,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 624,
|
|
"end": 625,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 625,
|
|
"end": 633,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 627,
|
|
"end": 633,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 635,
|
|
"end": 645,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 635,
|
|
"end": 636,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 636,
|
|
"end": 645,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 638,
|
|
"end": 645,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 659,
|
|
"end": 661,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f4",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 708,
|
|
"end": 717,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 708,
|
|
"end": 717,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 711,
|
|
"end": 717,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 713,
|
|
"end": 717,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 713,
|
|
"end": 717,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Item",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 719,
|
|
"end": 725,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 719,
|
|
"end": 725,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 721,
|
|
"end": 725,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 723,
|
|
"end": 725,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 723,
|
|
"end": 725,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K1",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 733,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 727,
|
|
"end": 733,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 729,
|
|
"end": 733,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 731,
|
|
"end": 733,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 731,
|
|
"end": 733,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K2",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 650,
|
|
"end": 783,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 735,
|
|
"end": 783,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 741,
|
|
"end": 781,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 745,
|
|
"end": 780,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "ObjectPattern",
|
|
"span": {
|
|
"start": 745,
|
|
"end": 774,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 747,
|
|
"end": 751,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 748,
|
|
"end": 750,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k1",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 753,
|
|
"end": 755,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValuePatternProperty",
|
|
"key": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 757,
|
|
"end": 761,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 758,
|
|
"end": 760,
|
|
"ctxt": 0
|
|
},
|
|
"value": "k2",
|
|
"optional": false
|
|
}
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 763,
|
|
"end": 765,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
},
|
|
{
|
|
"type": "RestElement",
|
|
"span": {
|
|
"start": 767,
|
|
"end": 772,
|
|
"ctxt": 0
|
|
},
|
|
"rest": {
|
|
"start": 767,
|
|
"end": 770,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 770,
|
|
"end": 772,
|
|
"ctxt": 0
|
|
},
|
|
"value": "r1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"typeAnnotation": null
|
|
}
|
|
],
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 777,
|
|
"end": 780,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 661,
|
|
"end": 707,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 662,
|
|
"end": 683,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 662,
|
|
"end": 664,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K1",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeOperator",
|
|
"span": {
|
|
"start": 673,
|
|
"end": 683,
|
|
"ctxt": 0
|
|
},
|
|
"op": "keyof",
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 679,
|
|
"end": 683,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 679,
|
|
"end": 683,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Item",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"default": null
|
|
},
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 685,
|
|
"end": 706,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 685,
|
|
"end": 687,
|
|
"ctxt": 0
|
|
},
|
|
"value": "K2",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": {
|
|
"type": "TsTypeOperator",
|
|
"span": {
|
|
"start": 696,
|
|
"end": 706,
|
|
"ctxt": 0
|
|
},
|
|
"op": "keyof",
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 702,
|
|
"end": 706,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 702,
|
|
"end": 706,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Item",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"returnType": null
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|