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

1872 lines
53 KiB
JSON

{
"type": "Script",
"span": {
"start": 46,
"end": 702,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 55,
"end": 57,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 79,
"end": 99,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 79,
"end": 99,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 82,
"end": 99,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsMappedType",
"span": {
"start": 84,
"end": 99,
"ctxt": 0
},
"readonly": null,
"typeParam": {
"type": "TsTypeParameter",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": "P",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
},
"default": null
},
"nameType": null,
"optional": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 101,
"end": 105,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 101,
"end": 105,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 46,
"end": 261,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 107,
"end": 261,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 113,
"end": 132,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 131,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 123,
"end": 131,
"ctxt": 0
},
"operator": "in",
"left": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "k",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"value": "obj",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 137,
"end": 147,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 141,
"end": 146,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 141,
"end": 143,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForInStatement",
"span": {
"start": 152,
"end": 201,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 157,
"end": 159,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 163,
"end": 166,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 168,
"end": 201,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 178,
"end": 195,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 182,
"end": 194,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 187,
"end": 194,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 190,
"end": 194,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 191,
"end": 193,
"ctxt": 0
},
"value": "k1",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
},
{
"type": "ForInStatement",
"span": {
"start": 206,
"end": 259,
"ctxt": 0
},
"left": {
"type": "VariableDeclaration",
"span": {
"start": 211,
"end": 217,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 215,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 217,
"ctxt": 0
},
"value": "k2",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 221,
"end": 224,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 226,
"end": 259,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 236,
"end": 253,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 240,
"end": 252,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 240,
"end": 242,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 245,
"end": 252,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 245,
"end": 248,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 248,
"end": 252,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 249,
"end": 251,
"ctxt": 0
},
"value": "k2",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 57,
"end": 78,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 58,
"end": 74,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "K",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 68,
"end": 74,
"ctxt": 0
},
"kind": "string"
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 272,
"end": 274,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 278,
"end": 307,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 278,
"end": 307,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 281,
"end": 307,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsMappedType",
"span": {
"start": 283,
"end": 307,
"ctxt": 0
},
"readonly": null,
"typeParam": {
"type": "TsTypeParameter",
"span": {
"start": 286,
"end": 298,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": "P",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 291,
"end": 298,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"default": null
},
"nameType": null,
"optional": null,
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
"start": 301,
"end": 305,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsTypeReference",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": "P",
"optional": false
},
"typeParams": null
}
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 309,
"end": 319,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 309,
"end": 319,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 310,
"end": 319,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 312,
"end": 319,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 318,
"end": 319,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 318,
"end": 319,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 263,
"end": 481,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 321,
"end": 481,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 346,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 333,
"end": 345,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 333,
"end": 334,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 337,
"end": 345,
"ctxt": 0
},
"operator": "in",
"left": {
"type": "Identifier",
"span": {
"start": 337,
"end": 338,
"ctxt": 0
},
"value": "k",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 342,
"end": 345,
"ctxt": 0
},
"value": "obj",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 351,
"end": 367,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 355,
"end": 366,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 355,
"end": 357,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 357,
"end": 366,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 359,
"end": 366,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForInStatement",
"span": {
"start": 372,
"end": 421,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 377,
"end": 379,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 383,
"end": 386,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 388,
"end": 421,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 398,
"end": 415,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 402,
"end": 414,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 402,
"end": 404,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 407,
"end": 414,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 407,
"end": 410,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 410,
"end": 414,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 411,
"end": 413,
"ctxt": 0
},
"value": "k1",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
},
{
"type": "ForInStatement",
"span": {
"start": 426,
"end": 479,
"ctxt": 0
},
"left": {
"type": "VariableDeclaration",
"span": {
"start": 431,
"end": 437,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 435,
"end": 437,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 435,
"end": 437,
"ctxt": 0
},
"value": "k2",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 441,
"end": 444,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 446,
"end": 479,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 456,
"end": 473,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 460,
"end": 472,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 460,
"end": 462,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 465,
"end": 472,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 465,
"end": 468,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 468,
"end": 472,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 469,
"end": 471,
"ctxt": 0
},
"value": "k2",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 274,
"end": 277,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 492,
"end": 494,
"ctxt": 0
},
"value": "f3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 517,
"end": 540,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 517,
"end": 540,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 520,
"end": 540,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsMappedType",
"span": {
"start": 522,
"end": 540,
"ctxt": 0
},
"readonly": null,
"typeParam": {
"type": "TsTypeParameter",
"span": {
"start": 525,
"end": 531,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 525,
"end": 526,
"ctxt": 0
},
"value": "P",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 530,
"end": 531,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 530,
"end": 531,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
},
"default": null
},
"nameType": null,
"optional": null,
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
"start": 534,
"end": 538,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
"start": 534,
"end": 535,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 534,
"end": 535,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsTypeReference",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"value": "P",
"optional": false
},
"typeParams": null
}
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 542,
"end": 546,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 542,
"end": 546,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 543,
"end": 546,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 483,
"end": 702,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 548,
"end": 702,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 554,
"end": 573,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 560,
"end": 572,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 560,
"end": 561,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 564,
"end": 572,
"ctxt": 0
},
"operator": "in",
"left": {
"type": "Identifier",
"span": {
"start": 564,
"end": 565,
"ctxt": 0
},
"value": "k",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 569,
"end": 572,
"ctxt": 0
},
"value": "obj",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 578,
"end": 588,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 582,
"end": 587,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 582,
"end": 584,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 584,
"end": 587,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 586,
"end": 587,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 586,
"end": 587,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForInStatement",
"span": {
"start": 593,
"end": 642,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 598,
"end": 600,
"ctxt": 0
},
"value": "k1",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 604,
"end": 607,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 609,
"end": 642,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 619,
"end": 636,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 623,
"end": 635,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 623,
"end": 625,
"ctxt": 0
},
"value": "x1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 628,
"end": 635,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 628,
"end": 631,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 631,
"end": 635,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 632,
"end": 634,
"ctxt": 0
},
"value": "k1",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
},
{
"type": "ForInStatement",
"span": {
"start": 647,
"end": 700,
"ctxt": 0
},
"left": {
"type": "VariableDeclaration",
"span": {
"start": 652,
"end": 658,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 656,
"end": 658,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 656,
"end": 658,
"ctxt": 0
},
"value": "k2",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 662,
"end": 665,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 667,
"end": 700,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 677,
"end": 694,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 681,
"end": 693,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 681,
"end": 683,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 686,
"end": 693,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 686,
"end": 689,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 689,
"end": 693,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 690,
"end": 692,
"ctxt": 0
},
"value": "k2",
"optional": false
}
}
},
"definite": false
}
]
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 494,
"end": 516,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 495,
"end": 496,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 495,
"end": 496,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 498,
"end": 515,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 498,
"end": 499,
"ctxt": 0
},
"value": "K",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 508,
"end": 515,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"default": null
}
]
},
"returnType": null
}
],
"interpreter": null
}