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

2143 lines
52 KiB
JSON

{
"type": "Script",
"span": {
"start": 41,
"end": 971,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 41,
"end": 64,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 50,
"end": 63,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 52,
"end": 61,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 53,
"end": 61,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 65,
"end": 88,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 74,
"end": 87,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 76,
"end": 85,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 77,
"end": 85,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 79,
"end": 85,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 90,
"end": 115,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"value": "T01",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 101,
"end": 114,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 107,
"end": 114,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 108,
"end": 113,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 130,
"end": 158,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 138,
"end": 141,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 144,
"end": 157,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 150,
"end": 157,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 151,
"end": 156,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 177,
"end": 205,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 182,
"end": 185,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 185,
"end": 188,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 191,
"end": 204,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 197,
"end": 204,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 198,
"end": 203,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 224,
"end": 255,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 232,
"end": 238,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 241,
"end": 254,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 247,
"end": 254,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 248,
"end": 253,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 278,
"end": 296,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 283,
"end": 286,
"ctxt": 0
},
"value": "T05",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 289,
"end": 295,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 289,
"end": 292,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 292,
"end": 295,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 311,
"end": 329,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 316,
"end": 319,
"ctxt": 0
},
"value": "T06",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 322,
"end": 328,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 322,
"end": 325,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 325,
"end": 328,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 344,
"end": 365,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 349,
"end": 352,
"ctxt": 0
},
"value": "T07",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 355,
"end": 364,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 358,
"end": 364,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 362,
"end": 363,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 362,
"end": 363,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 404,
"end": 496,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 409,
"end": 417,
"ctxt": 0
},
"value": "Example1",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 417,
"end": 453,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 418,
"end": 434,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 428,
"end": 434,
"ctxt": 0
},
"kind": "string"
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 436,
"end": 452,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 436,
"end": 437,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 446,
"end": 452,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 456,
"end": 495,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 462,
"end": 495,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 463,
"end": 494,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 463,
"end": 477,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 463,
"end": 469,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 469,
"end": 477,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 473,
"end": 476,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
"start": 480,
"end": 494,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 480,
"end": 486,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 486,
"end": 494,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 487,
"end": 488,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 487,
"end": 488,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 490,
"end": 493,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 497,
"end": 531,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 502,
"end": 509,
"ctxt": 0
},
"value": "Result1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 512,
"end": 530,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 512,
"end": 520,
"ctxt": 0
},
"value": "Example1",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 520,
"end": 530,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 521,
"end": 524,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 521,
"end": 524,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 526,
"end": 529,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 526,
"end": 529,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 547,
"end": 606,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 552,
"end": 559,
"ctxt": 0
},
"value": "Result2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 562,
"end": 605,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 568,
"end": 605,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 569,
"end": 604,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 569,
"end": 585,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 569,
"end": 575,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 575,
"end": 585,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 576,
"end": 579,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 576,
"end": 579,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsKeywordType",
"span": {
"start": 581,
"end": 584,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
"start": 588,
"end": 604,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 588,
"end": 594,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 594,
"end": 604,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 595,
"end": 598,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 595,
"end": 598,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
},
{
"type": "TsKeywordType",
"span": {
"start": 600,
"end": 603,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 622,
"end": 679,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 627,
"end": 635,
"ctxt": 0
},
"value": "Example3",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 635,
"end": 653,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 636,
"end": 652,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 636,
"end": 637,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 646,
"end": 652,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 656,
"end": 678,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 662,
"end": 678,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 663,
"end": 677,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 663,
"end": 669,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 669,
"end": 677,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 670,
"end": 671,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 670,
"end": 671,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 673,
"end": 676,
"ctxt": 0
},
"kind": "any"
}
]
}
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 680,
"end": 715,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 685,
"end": 692,
"ctxt": 0
},
"value": "Result3",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 695,
"end": 714,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 695,
"end": 703,
"ctxt": 0
},
"value": "Example3",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 703,
"end": 714,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 704,
"end": 713,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 704,
"end": 707,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 704,
"end": 707,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 710,
"end": 713,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 710,
"end": 713,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 731,
"end": 817,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 736,
"end": 744,
"ctxt": 0
},
"value": "Example4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 744,
"end": 780,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 745,
"end": 761,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 745,
"end": 746,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 755,
"end": 761,
"ctxt": 0
},
"kind": "string"
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 763,
"end": 779,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 763,
"end": 764,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 773,
"end": 779,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 783,
"end": 816,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 784,
"end": 815,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 784,
"end": 798,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 784,
"end": 790,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 790,
"end": 798,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 791,
"end": 792,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 791,
"end": 792,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 794,
"end": 797,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
"start": 801,
"end": 815,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 801,
"end": 807,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 807,
"end": 815,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 808,
"end": 809,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 808,
"end": 809,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 811,
"end": 814,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 818,
"end": 858,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 823,
"end": 830,
"ctxt": 0
},
"value": "Result4",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 833,
"end": 857,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 839,
"end": 857,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 839,
"end": 847,
"ctxt": 0
},
"value": "Example4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 847,
"end": 857,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 848,
"end": 851,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 848,
"end": 851,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 853,
"end": 856,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 853,
"end": 856,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 874,
"end": 910,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 879,
"end": 887,
"ctxt": 0
},
"value": "Example5",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 887,
"end": 893,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 888,
"end": 889,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 888,
"end": 889,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 891,
"end": 892,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 891,
"end": 892,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 896,
"end": 909,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
"start": 902,
"end": 909,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 903,
"end": 908,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 903,
"end": 904,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 903,
"end": 904,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 907,
"end": 908,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 907,
"end": 908,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 911,
"end": 971,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 916,
"end": 923,
"ctxt": 0
},
"value": "Result5",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 926,
"end": 970,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 926,
"end": 934,
"ctxt": 0
},
"value": "Example5",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 934,
"end": 970,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 935,
"end": 951,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 935,
"end": 941,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 941,
"end": 951,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 942,
"end": 945,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 942,
"end": 945,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsKeywordType",
"span": {
"start": 947,
"end": 950,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
"start": 953,
"end": 969,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 953,
"end": 959,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 959,
"end": 969,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
"start": 960,
"end": 963,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 960,
"end": 963,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
},
{
"type": "TsKeywordType",
"span": {
"start": 965,
"end": 968,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
],
"interpreter": null
}