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

4288 lines
112 KiB
JSON

{
"type": "Module",
"span": {
"start": 217,
"end": 1950,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 217,
"end": 240,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 226,
"end": 239,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 228,
"end": 237,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 229,
"end": 237,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 231,
"end": 237,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 241,
"end": 264,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 250,
"end": 263,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 253,
"end": 261,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 265,
"end": 277,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 274,
"end": 276,
"ctxt": 0
},
"members": []
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 279,
"end": 294,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 283,
"end": 293,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 283,
"end": 286,
"ctxt": 0
},
"value": "x01",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 286,
"end": 293,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 288,
"end": 293,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 295,
"end": 310,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 299,
"end": 309,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 299,
"end": 302,
"ctxt": 0
},
"value": "x02",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 304,
"end": 309,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 308,
"end": 309,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 311,
"end": 326,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 315,
"end": 325,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "x03",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 318,
"end": 325,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 320,
"end": 325,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 324,
"end": 325,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 324,
"end": 325,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 346,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 331,
"end": 345,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 331,
"end": 334,
"ctxt": 0
},
"value": "x04",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 334,
"end": 345,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 336,
"end": 345,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 336,
"end": 337,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 336,
"end": 337,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 340,
"end": 341,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 340,
"end": 341,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 344,
"end": 345,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 344,
"end": 345,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 347,
"end": 367,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 351,
"end": 366,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 351,
"end": 354,
"ctxt": 0
},
"value": "x05",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 354,
"end": 366,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 356,
"end": 366,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsTypeReference",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 368,
"end": 388,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 372,
"end": 387,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 372,
"end": 375,
"ctxt": 0
},
"value": "x06",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 375,
"end": 387,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 377,
"end": 387,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 381,
"end": 387,
"ctxt": 0
},
"kind": "string"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 389,
"end": 400,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 393,
"end": 399,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 393,
"end": 396,
"ctxt": 0
},
"value": "x07",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 396,
"end": 399,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 401,
"end": 417,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 405,
"end": 416,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 408,
"ctxt": 0
},
"value": "x08",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 408,
"end": 416,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 410,
"end": 416,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 414,
"end": 416,
"ctxt": 0
},
"members": []
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 418,
"end": 457,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 422,
"end": 456,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 422,
"end": 425,
"ctxt": 0
},
"value": "x09",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 425,
"end": 456,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 427,
"end": 456,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 427,
"end": 429,
"ctxt": 0
},
"members": []
},
{
"type": "TsTypeReference",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 432,
"end": 433,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 436,
"end": 438,
"ctxt": 0
},
"members": []
},
{
"type": "TsTypeReference",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 445,
"end": 447,
"ctxt": 0
},
"members": []
},
{
"type": "TsTypeReference",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 454,
"end": 456,
"ctxt": 0
},
"members": []
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 459,
"end": 473,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 471,
"end": 473,
"ctxt": 0
},
"body": []
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 474,
"end": 488,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 484,
"end": 485,
"ctxt": 0
},
"value": "E",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 486,
"end": 488,
"ctxt": 0
},
"body": []
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 490,
"end": 505,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 494,
"end": 504,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 494,
"end": 497,
"ctxt": 0
},
"value": "x10",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 497,
"end": 504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 499,
"end": 504,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 499,
"end": 500,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 499,
"end": 500,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 506,
"end": 521,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 510,
"end": 520,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 510,
"end": 513,
"ctxt": 0
},
"value": "x11",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 513,
"end": 520,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 515,
"end": 520,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 515,
"end": 516,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 515,
"end": 516,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 519,
"end": 520,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 519,
"end": 520,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 522,
"end": 545,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 526,
"end": 544,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 526,
"end": 529,
"ctxt": 0
},
"value": "x12",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 529,
"end": 544,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 531,
"end": 544,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 531,
"end": 532,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 531,
"end": 532,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 539,
"end": 540,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 539,
"end": 540,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 543,
"end": 544,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 543,
"end": 544,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 546,
"end": 561,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 550,
"end": 560,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 550,
"end": 553,
"ctxt": 0
},
"value": "x13",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 553,
"end": 560,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 555,
"end": 560,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 555,
"end": 556,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 555,
"end": 556,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 559,
"end": 560,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 559,
"end": 560,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 562,
"end": 589,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 566,
"end": 588,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 566,
"end": 569,
"ctxt": 0
},
"value": "x14",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 569,
"end": 588,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 571,
"end": 588,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 571,
"end": 572,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 571,
"end": 572,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 575,
"end": 576,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 575,
"end": 576,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 587,
"end": 588,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 587,
"end": 588,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 613,
"end": 658,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 618,
"end": 628,
"ctxt": 0
},
"value": "Dictionary",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 631,
"end": 657,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 634,
"end": 646,
"ctxt": 0
},
"value": "name",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 638,
"end": 646,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 640,
"end": 646,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 647,
"end": 655,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 649,
"end": 655,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 633,
"end": 655,
"ctxt": 0
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 660,
"end": 798,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 666,
"end": 797,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 666,
"end": 687,
"ctxt": 0
},
"value": "intersectDictionaries",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 690,
"end": 797,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 740,
"end": 746,
"ctxt": 0
},
"value": "d1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 742,
"end": 746,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 744,
"end": 746,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 744,
"end": 746,
"ctxt": 0
},
"value": "F1",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 750,
"end": 756,
"ctxt": 0
},
"value": "d2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 752,
"end": 756,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 754,
"end": 756,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 754,
"end": 756,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "CallExpression",
"span": {
"start": 772,
"end": 797,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 772,
"end": 785,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 772,
"end": 778,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 779,
"end": 785,
"ctxt": 0
},
"value": "assign",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 786,
"end": 788,
"ctxt": 0
},
"properties": []
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 790,
"end": 792,
"ctxt": 0
},
"value": "d1",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"value": "d2",
"optional": false
}
}
],
"typeArguments": null
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 690,
"end": 736,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 691,
"end": 712,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 691,
"end": 693,
"ctxt": 0
},
"value": "F1",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 702,
"end": 712,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 702,
"end": 712,
"ctxt": 0
},
"value": "Dictionary",
"optional": false
},
"typeParams": null
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 714,
"end": 735,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 714,
"end": 716,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 725,
"end": 735,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 725,
"end": 735,
"ctxt": 0
},
"value": "Dictionary",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 759,
"end": 768,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 761,
"end": 768,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 761,
"end": 763,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 761,
"end": 763,
"ctxt": 0
},
"value": "F1",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 766,
"end": 768,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 766,
"end": 768,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"typeParams": null
}
]
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 800,
"end": 864,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 806,
"end": 863,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 806,
"end": 820,
"ctxt": 0
},
"value": "testDictionary",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 823,
"end": 863,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 846,
"end": 855,
"ctxt": 0
},
"value": "_value",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 852,
"end": 855,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 860,
"end": 863,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 823,
"end": 845,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 824,
"end": 844,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 824,
"end": 825,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 834,
"end": 844,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 834,
"end": 844,
"ctxt": 0
},
"value": "Dictionary",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 866,
"end": 880,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 872,
"end": 879,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 872,
"end": 874,
"ctxt": 0
},
"value": "d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 877,
"end": 879,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 881,
"end": 900,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 881,
"end": 899,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 881,
"end": 895,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 896,
"end": 898,
"ctxt": 0
},
"value": "d1",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 901,
"end": 942,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 907,
"end": 941,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 907,
"end": 909,
"ctxt": 0
},
"value": "d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 912,
"end": 941,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 912,
"end": 933,
"ctxt": 0
},
"value": "intersectDictionaries",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 934,
"end": 936,
"ctxt": 0
},
"value": "d1",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 938,
"end": 940,
"ctxt": 0
},
"value": "d1",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 943,
"end": 962,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 943,
"end": 961,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 943,
"end": 957,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 958,
"end": 960,
"ctxt": 0
},
"value": "d2",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 964,
"end": 988,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 970,
"end": 987,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 970,
"end": 972,
"ctxt": 0
},
"value": "d3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 975,
"end": 987,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 979,
"end": 980,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 982,
"end": 984,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 989,
"end": 1008,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 989,
"end": 1007,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 989,
"end": 1003,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1004,
"end": 1006,
"ctxt": 0
},
"value": "d3",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1009,
"end": 1050,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1015,
"end": 1049,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1015,
"end": 1017,
"ctxt": 0
},
"value": "d4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1020,
"end": 1049,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1020,
"end": 1041,
"ctxt": 0
},
"value": "intersectDictionaries",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1042,
"end": 1044,
"ctxt": 0
},
"value": "d1",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1046,
"end": 1048,
"ctxt": 0
},
"value": "d3",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1051,
"end": 1070,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1051,
"end": 1069,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1051,
"end": 1065,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1066,
"end": 1068,
"ctxt": 0
},
"value": "d4",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1071,
"end": 1112,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1077,
"end": 1111,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1077,
"end": 1079,
"ctxt": 0
},
"value": "d5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1082,
"end": 1111,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1082,
"end": 1103,
"ctxt": 0
},
"value": "intersectDictionaries",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1104,
"end": 1106,
"ctxt": 0
},
"value": "d3",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1108,
"end": 1110,
"ctxt": 0
},
"value": "d1",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1113,
"end": 1132,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1113,
"end": 1131,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1113,
"end": 1127,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1128,
"end": 1130,
"ctxt": 0
},
"value": "d5",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1133,
"end": 1174,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1139,
"end": 1173,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1139,
"end": 1141,
"ctxt": 0
},
"value": "d6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1144,
"end": 1173,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1144,
"end": 1165,
"ctxt": 0
},
"value": "intersectDictionaries",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1166,
"end": 1168,
"ctxt": 0
},
"value": "d3",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1170,
"end": 1172,
"ctxt": 0
},
"value": "d3",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1175,
"end": 1194,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1175,
"end": 1193,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1175,
"end": 1189,
"ctxt": 0
},
"value": "testDictionary",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1190,
"end": 1192,
"ctxt": 0
},
"value": "d6",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1218,
"end": 1341,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1223,
"end": 1230,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1230,
"end": 1283,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1231,
"end": 1282,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1231,
"end": 1242,
"ctxt": 0
},
"value": "IChoiceList",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 1251,
"end": 1282,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1258,
"end": 1269,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1261,
"end": 1269,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1263,
"end": 1269,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1270,
"end": 1279,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1272,
"end": 1279,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1257,
"end": 1280,
"ctxt": 0
}
}
]
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 1286,
"end": 1340,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 1286,
"end": 1297,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1297,
"ctxt": 0
},
"value": "IChoiceList",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 1300,
"end": 1340,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1306,
"end": 1320,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1306,
"end": 1311,
"ctxt": 0
},
"value": "shoes",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1311,
"end": 1319,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1312,
"end": 1319,
"ctxt": 0
},
"kind": "boolean"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1325,
"end": 1338,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1325,
"end": 1329,
"ctxt": 0
},
"value": "food",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1329,
"end": 1337,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1330,
"end": 1337,
"ctxt": 0
},
"kind": "boolean"
}
},
"typeParams": null
}
]
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1343,
"end": 1382,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1348,
"end": 1361,
"ctxt": 0
},
"value": "IMyChoiceList",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1364,
"end": 1381,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1370,
"end": 1379,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1370,
"end": 1373,
"ctxt": 0
},
"value": "car",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1373,
"end": 1379,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 1375,
"end": 1379,
"ctxt": 0
},
"literal": {
"type": "BooleanLiteral",
"span": {
"start": 1375,
"end": 1379,
"ctxt": 0
},
"value": true
}
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1384,
"end": 1413,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1389,
"end": 1407,
"ctxt": 0
},
"value": "IUnknownChoiceList",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1410,
"end": 1412,
"ctxt": 0
},
"members": []
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1415,
"end": 1447,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1419,
"end": 1446,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1419,
"end": 1433,
"ctxt": 0
},
"value": "defaultChoices",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1433,
"end": 1446,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1435,
"end": 1446,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1435,
"end": 1442,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1442,
"end": 1446,
"ctxt": 0
},
"params": [
{
"type": "TsTypeLiteral",
"span": {
"start": 1443,
"end": 1445,
"ctxt": 0
},
"members": []
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1448,
"end": 1493,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1452,
"end": 1492,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1452,
"end": 1474,
"ctxt": 0
},
"value": "defaultChoicesAndEmpty",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1474,
"end": 1492,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1476,
"end": 1492,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1476,
"end": 1483,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1483,
"end": 1492,
"ctxt": 0
},
"params": [
{
"type": "TsIntersectionType",
"span": {
"start": 1484,
"end": 1491,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 1484,
"end": 1486,
"ctxt": 0
},
"members": []
},
{
"type": "TsTypeLiteral",
"span": {
"start": 1489,
"end": 1491,
"ctxt": 0
},
"members": []
}
]
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1495,
"end": 1533,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1499,
"end": 1532,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1499,
"end": 1508,
"ctxt": 0
},
"value": "myChoices",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1508,
"end": 1532,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1510,
"end": 1532,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1510,
"end": 1517,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1517,
"end": 1532,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1518,
"end": 1531,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1518,
"end": 1531,
"ctxt": 0
},
"value": "IMyChoiceList",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1534,
"end": 1585,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1538,
"end": 1584,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1538,
"end": 1555,
"ctxt": 0
},
"value": "myChoicesAndEmpty",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1555,
"end": 1584,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1557,
"end": 1584,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1557,
"end": 1564,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1564,
"end": 1584,
"ctxt": 0
},
"params": [
{
"type": "TsIntersectionType",
"span": {
"start": 1565,
"end": 1583,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 1565,
"end": 1578,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1565,
"end": 1578,
"ctxt": 0
},
"value": "IMyChoiceList",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 1581,
"end": 1583,
"ctxt": 0
},
"members": []
}
]
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1587,
"end": 1635,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1591,
"end": 1634,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1591,
"end": 1605,
"ctxt": 0
},
"value": "unknownChoices",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1605,
"end": 1634,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1607,
"end": 1634,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1607,
"end": 1614,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1614,
"end": 1634,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1615,
"end": 1633,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1615,
"end": 1633,
"ctxt": 0
},
"value": "IUnknownChoiceList",
"optional": false
},
"typeParams": null
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1636,
"end": 1697,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1640,
"end": 1696,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1640,
"end": 1662,
"ctxt": 0
},
"value": "unknownChoicesAndEmpty",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1662,
"end": 1696,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1664,
"end": 1696,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1664,
"end": 1671,
"ctxt": 0
},
"value": "choices",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1671,
"end": 1696,
"ctxt": 0
},
"params": [
{
"type": "TsIntersectionType",
"span": {
"start": 1672,
"end": 1695,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 1672,
"end": 1690,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1672,
"end": 1690,
"ctxt": 0
},
"value": "IUnknownChoiceList",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeLiteral",
"span": {
"start": 1693,
"end": 1695,
"ctxt": 0
},
"members": []
}
]
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1721,
"end": 1771,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1726,
"end": 1730,
"ctxt": 0
},
"value": "Foo1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 1733,
"end": 1770,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 1733,
"end": 1746,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1735,
"end": 1744,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1735,
"end": 1736,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1736,
"end": 1744,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1738,
"end": 1744,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 1749,
"end": 1770,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1752,
"end": 1761,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1753,
"end": 1761,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1755,
"end": 1761,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1762,
"end": 1768,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1764,
"end": 1768,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1764,
"end": 1768,
"ctxt": 0
},
"value": "Foo1",
"optional": false
},
"typeParams": null
}
},
"readonly": false,
"static": false,
"span": {
"start": 1751,
"end": 1768,
"ctxt": 0
}
}
]
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1772,
"end": 1824,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1777,
"end": 1781,
"ctxt": 0
},
"value": "Foo2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 1784,
"end": 1823,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 1784,
"end": 1797,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1786,
"end": 1795,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1786,
"end": 1787,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1787,
"end": 1795,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1789,
"end": 1795,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsMappedType",
"span": {
"start": 1800,
"end": 1823,
"ctxt": 0
},
"readonly": null,
"typeParam": {
"type": "TsTypeParameter",
"span": {
"start": 1803,
"end": 1814,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1803,
"end": 1804,
"ctxt": 0
},
"value": "K",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 1808,
"end": 1814,
"ctxt": 0
},
"kind": "number"
},
"default": null
},
"nameType": null,
"optional": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1817,
"end": 1821,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1817,
"end": 1821,
"ctxt": 0
},
"value": "Foo2",
"optional": false
},
"typeParams": null
}
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1865,
"end": 1869,
"ctxt": 0
},
"value": "mock",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 1873,
"end": 1886,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1873,
"end": 1886,
"ctxt": 0
},
"value": "_",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1874,
"end": 1886,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1876,
"end": 1886,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1876,
"end": 1883,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1883,
"end": 1886,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1884,
"end": 1885,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1884,
"end": 1885,
"ctxt": 0
},
"value": "M",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 1848,
"end": 1896,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1869,
"end": 1872,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1870,
"end": 1871,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1870,
"end": 1871,
"ctxt": 0
},
"value": "M",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1887,
"end": 1895,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 1889,
"end": 1895,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 1889,
"end": 1891,
"ctxt": 0
},
"members": []
},
{
"type": "TsTypeReference",
"span": {
"start": 1894,
"end": 1895,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1894,
"end": 1895,
"ctxt": 0
},
"value": "M",
"optional": false
},
"typeParams": null
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1897,
"end": 1917,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1897,
"end": 1917,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 1897,
"end": 1901,
"ctxt": 0
},
"value": "mock",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "CallExpression",
"span": {
"start": 1902,
"end": 1916,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 1902,
"end": 1908,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1909,
"end": 1915,
"ctxt": 0
},
"value": "./ex",
"raw": "'./ex'"
}
}
],
"typeArguments": null
}
}
],
"typeArguments": null
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 1941,
"end": 1950,
"ctxt": 0
},
"specifiers": [],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}