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

2132 lines
52 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 40,
"end": 970,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 40,
"end": 63,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 49,
"end": 62,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 60,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 52,
"end": 60,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 54,
"end": 60,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 64,
"end": 87,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 69,
"end": 70,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 73,
"end": 86,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 75,
"end": 84,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 76,
"end": 84,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 78,
"end": 84,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 89,
"end": 114,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 94,
"end": 97,
"ctxt": 0
},
"value": "T01",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 100,
"end": 113,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 106,
"end": 113,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 112,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 108,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 111,
"end": 112,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 129,
"end": 157,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 134,
"end": 137,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 137,
"end": 140,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 138,
"end": 139,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 143,
"end": 156,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 149,
"end": 156,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 150,
"end": 155,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 150,
"end": 151,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 154,
"end": 155,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 176,
"end": 204,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 181,
"end": 184,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 184,
"end": 187,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 185,
"end": 186,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 190,
"end": 203,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 196,
"end": 203,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 197,
"end": 202,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 197,
"end": 198,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 197,
"end": 198,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 201,
"end": 202,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 201,
"end": 202,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 223,
"end": 254,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 228,
"end": 231,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 231,
"end": 237,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 232,
"end": 233,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 235,
"end": 236,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 240,
"end": 253,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 246,
"end": 253,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 247,
"end": 252,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 247,
"end": 248,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 251,
"end": 252,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 251,
"end": 252,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 277,
"end": 295,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 282,
"end": 285,
"ctxt": 0
},
"value": "T05",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 288,
"end": 294,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 288,
"end": 291,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 291,
"end": 294,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 292,
"end": 293,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 310,
"end": 328,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "T06",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 321,
"end": 327,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 321,
"end": 324,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 324,
"end": 327,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 325,
"end": 326,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 325,
"end": 326,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 343,
"end": 364,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 348,
"end": 351,
"ctxt": 0
},
"value": "T07",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 363,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 357,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 357,
"end": 363,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 358,
"end": 359,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 358,
"end": 359,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 361,
"end": 362,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 361,
"end": 362,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 403,
"end": 495,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 408,
"end": 416,
"ctxt": 0
},
"value": "Example1",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 416,
"end": 452,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 417,
"end": 433,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 427,
"end": 433,
"ctxt": 0
},
"kind": "string"
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 435,
"end": 451,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 435,
"end": 436,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 445,
"end": 451,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 455,
"end": 494,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 461,
"end": 494,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 462,
"end": 493,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 462,
"end": 476,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 462,
"end": 468,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 468,
"end": 476,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 469,
"end": 470,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 472,
"end": 475,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 479,
"end": 493,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 479,
"end": 485,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 485,
"end": 493,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 486,
"end": 487,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 486,
"end": 487,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 489,
"end": 492,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 496,
"end": 530,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 501,
"end": 508,
"ctxt": 0
},
"value": "Result1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 511,
"end": 529,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 511,
"end": 519,
"ctxt": 0
},
"value": "Example1",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 519,
"end": 529,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 520,
"end": 523,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 520,
"end": 523,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 525,
"end": 528,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 525,
"end": 528,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 546,
"end": 605,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 551,
"end": 558,
"ctxt": 0
},
"value": "Result2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 561,
"end": 604,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 567,
"end": 604,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 568,
"end": 603,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 568,
"end": 584,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 568,
"end": 574,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 574,
"end": 584,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 575,
"end": 578,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 575,
"end": 578,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 580,
"end": 583,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 587,
"end": 603,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 587,
"end": 593,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 593,
"end": 603,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 594,
"end": 597,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 594,
"end": 597,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 599,
"end": 602,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 621,
"end": 678,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 626,
"end": 634,
"ctxt": 0
},
"value": "Example3",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 634,
"end": 652,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 635,
"end": 651,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 635,
"end": 636,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 645,
"end": 651,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 655,
"end": 677,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 661,
"end": 677,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 662,
"end": 676,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 662,
"end": 668,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 668,
"end": 676,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 669,
"end": 670,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 669,
"end": 670,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 672,
"end": 675,
"ctxt": 0
},
"kind": "any"
}
]
}
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 679,
"end": 714,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 684,
"end": 691,
"ctxt": 0
},
"value": "Result3",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 694,
"end": 713,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 694,
"end": 702,
"ctxt": 0
},
"value": "Example3",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 702,
"end": 713,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 703,
"end": 712,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 703,
"end": 706,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 703,
"end": 706,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 709,
"end": 712,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 709,
"end": 712,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 730,
"end": 816,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 735,
"end": 743,
"ctxt": 0
},
"value": "Example4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 743,
"end": 779,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 744,
"end": 760,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 744,
"end": 745,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 754,
"end": 760,
"ctxt": 0
},
"kind": "string"
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 762,
"end": 778,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 762,
"end": 763,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 772,
"end": 778,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 782,
"end": 815,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 783,
"end": 814,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 783,
"end": 797,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 783,
"end": 789,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 789,
"end": 797,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 790,
"end": 791,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 790,
"end": 791,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 793,
"end": 796,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 800,
"end": 814,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 800,
"end": 806,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 806,
"end": 814,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 807,
"end": 808,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 807,
"end": 808,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 810,
"end": 813,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 817,
"end": 857,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 822,
"end": 829,
"ctxt": 0
},
"value": "Result4",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 832,
"end": 856,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 838,
"end": 856,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 838,
"end": 846,
"ctxt": 0
},
"value": "Example4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 846,
"end": 856,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 847,
"end": 850,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 847,
"end": 850,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 852,
"end": 855,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 852,
"end": 855,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 873,
"end": 909,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 878,
"end": 886,
"ctxt": 0
},
"value": "Example5",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 886,
"end": 892,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 887,
"end": 888,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 887,
"end": 888,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 890,
"end": 891,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 890,
"end": 891,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 895,
"end": 908,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsParenthesizedType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 901,
"end": 908,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 902,
"end": 907,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 902,
"end": 903,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 902,
"end": 903,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 906,
"end": 907,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 906,
"end": 907,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 910,
"end": 970,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 915,
"end": 922,
"ctxt": 0
},
"value": "Result5",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 925,
"end": 969,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 925,
"end": 933,
"ctxt": 0
},
"value": "Example5",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 933,
"end": 969,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 934,
"end": 950,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 934,
"end": 940,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 940,
"end": 950,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 941,
"end": 944,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 941,
"end": 944,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 946,
"end": 949,
"ctxt": 0
},
"kind": "any"
}
]
}
},
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 952,
"end": 968,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 952,
"end": 958,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 958,
"end": 968,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 959,
"end": 962,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 959,
"end": 962,
"ctxt": 0
},
"value": "y",
"raw": "'y'"
}
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 964,
"end": 967,
"ctxt": 0
},
"kind": "any"
}
]
}
}
]
}
}
}
],
"interpreter": null
}