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

2800 lines
79 KiB
JSON

{
"type": "Script",
"span": {
"start": 138,
"end": 1436,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 144,
"end": 148,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 138,
"end": 165,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 151,
"end": 163,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 154,
"end": 162,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 156,
"end": 162,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 172,
"end": 179,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 166,
"end": 209,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 195,
"end": 207,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 195,
"end": 198,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 198,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 188,
"end": 192,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 216,
"end": 224,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"declare": false,
"span": {
"start": 210,
"end": 257,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 243,
"end": 255,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 243,
"end": 246,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 246,
"end": 254,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 248,
"end": 254,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 233,
"end": 240,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 259,
"end": 824,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 266,
"end": 283,
"ctxt": 0
},
"value": "TargetHasOptional",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 284,
"end": 824,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 305,
"end": 343,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 317,
"end": 343,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 327,
"end": 337,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 331,
"end": 337,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 348,
"end": 357,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 352,
"end": 356,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 363,
"end": 385,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 367,
"end": 385,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 368,
"end": 385,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 370,
"end": 385,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 372,
"end": 383,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 372,
"end": 375,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 376,
"end": 382,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 378,
"end": 382,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 378,
"end": 382,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 390,
"end": 427,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 394,
"end": 427,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 394,
"end": 395,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 395,
"end": 405,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 397,
"end": 405,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": "a",
"optional": false
},
"typeArguments": null
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 408,
"end": 427,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 410,
"end": 413,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"value": {
"type": "NewExpression",
"span": {
"start": 415,
"end": 425,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 419,
"end": 423,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 448,
"end": 488,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 458,
"end": 459,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 460,
"end": 488,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 470,
"end": 482,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 470,
"end": 475,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 475,
"end": 481,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 477,
"end": 481,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 477,
"end": 481,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 493,
"end": 536,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "E",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 505,
"end": 536,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 515,
"end": 530,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 515,
"end": 520,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 520,
"end": 529,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 522,
"end": 529,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 522,
"end": 529,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 541,
"end": 585,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 551,
"end": 552,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 553,
"end": 585,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 563,
"end": 579,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 563,
"end": 568,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 569,
"end": 578,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 571,
"end": 578,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 571,
"end": 578,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 590,
"end": 599,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 594,
"end": 598,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 594,
"end": 595,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 595,
"end": 598,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 597,
"end": 598,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 597,
"end": 598,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 604,
"end": 613,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 608,
"end": 612,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 609,
"end": 612,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 611,
"end": 612,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 611,
"end": 612,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 618,
"end": 627,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 622,
"end": 626,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 622,
"end": 623,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 623,
"end": 626,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 625,
"end": 626,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 625,
"end": 626,
"ctxt": 0
},
"value": "F",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 673,
"end": 679,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 673,
"end": 678,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 673,
"end": 674,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 677,
"end": 678,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 684,
"end": 690,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 684,
"end": 689,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 684,
"end": 685,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 688,
"end": 689,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 695,
"end": 701,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 695,
"end": 700,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 695,
"end": 696,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 699,
"end": 700,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 706,
"end": 712,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 706,
"end": 711,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 706,
"end": 707,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 710,
"end": 711,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 717,
"end": 723,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 717,
"end": 722,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 717,
"end": 718,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 721,
"end": 722,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 728,
"end": 734,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 728,
"end": 733,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 728,
"end": 729,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 732,
"end": 733,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 739,
"end": 745,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 739,
"end": 744,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 739,
"end": 740,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 743,
"end": 744,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 750,
"end": 756,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 750,
"end": 755,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 754,
"end": 755,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 761,
"end": 767,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 761,
"end": 766,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 761,
"end": 762,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 765,
"end": 766,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 783,
"end": 789,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 783,
"end": 788,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 783,
"end": 784,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 787,
"end": 788,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 794,
"end": 800,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 794,
"end": 799,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 794,
"end": 795,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 798,
"end": 799,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 805,
"end": 811,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 805,
"end": 810,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 805,
"end": 806,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 809,
"end": 810,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 816,
"end": 822,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 816,
"end": 821,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 816,
"end": 817,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 820,
"end": 821,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 826,
"end": 1436,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 833,
"end": 850,
"ctxt": 0
},
"value": "SourceHasOptional",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 851,
"end": 1436,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 872,
"end": 909,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 882,
"end": 883,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 884,
"end": 909,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 894,
"end": 903,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 894,
"end": 897,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 897,
"end": 903,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 899,
"end": 903,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 899,
"end": 903,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 914,
"end": 923,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 918,
"end": 922,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 918,
"end": 919,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 919,
"end": 922,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 921,
"end": 922,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 921,
"end": 922,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 929,
"end": 950,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 933,
"end": 950,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 933,
"end": 934,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 934,
"end": 950,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 936,
"end": 950,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 938,
"end": 948,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 938,
"end": 941,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 941,
"end": 947,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 943,
"end": 947,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 943,
"end": 947,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 955,
"end": 982,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 959,
"end": 982,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 959,
"end": 960,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 963,
"end": 982,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 965,
"end": 968,
"ctxt": 0
},
"value": "opt",
"optional": false
},
"value": {
"type": "NewExpression",
"span": {
"start": 970,
"end": 980,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 974,
"end": 978,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1003,
"end": 1044,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1013,
"end": 1014,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1015,
"end": 1044,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1025,
"end": 1038,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1025,
"end": 1030,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1031,
"end": 1037,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1033,
"end": 1037,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1033,
"end": 1037,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1049,
"end": 1093,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1059,
"end": 1060,
"ctxt": 0
},
"value": "E",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1061,
"end": 1093,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1071,
"end": 1087,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1071,
"end": 1076,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1077,
"end": 1086,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1079,
"end": 1086,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1079,
"end": 1086,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1098,
"end": 1141,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1108,
"end": 1109,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1110,
"end": 1141,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1120,
"end": 1135,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1120,
"end": 1125,
"ctxt": 0
},
"value": "other",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1125,
"end": 1134,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1127,
"end": 1134,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1127,
"end": 1134,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1146,
"end": 1155,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1150,
"end": 1154,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1150,
"end": 1151,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1151,
"end": 1154,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1153,
"end": 1154,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1153,
"end": 1154,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1160,
"end": 1169,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1164,
"end": 1168,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1164,
"end": 1165,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1165,
"end": 1168,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1167,
"end": 1168,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1167,
"end": 1168,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1174,
"end": 1183,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1178,
"end": 1182,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1178,
"end": 1179,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1179,
"end": 1182,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1181,
"end": 1182,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1181,
"end": 1182,
"ctxt": 0
},
"value": "F",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1189,
"end": 1195,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1189,
"end": 1194,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1189,
"end": 1190,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1193,
"end": 1194,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1209,
"end": 1215,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1209,
"end": 1214,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1209,
"end": 1210,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1213,
"end": 1214,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1229,
"end": 1235,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1229,
"end": 1234,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1229,
"end": 1230,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1233,
"end": 1234,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1249,
"end": 1255,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1249,
"end": 1254,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1249,
"end": 1250,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1253,
"end": 1254,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1267,
"end": 1273,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1267,
"end": 1272,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1267,
"end": 1268,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1271,
"end": 1272,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1287,
"end": 1293,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1287,
"end": 1292,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1287,
"end": 1288,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1291,
"end": 1292,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1307,
"end": 1313,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1307,
"end": 1312,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1307,
"end": 1308,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1311,
"end": 1312,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1327,
"end": 1333,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1327,
"end": 1332,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1327,
"end": 1328,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1331,
"end": 1332,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1345,
"end": 1351,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1345,
"end": 1350,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1345,
"end": 1346,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1349,
"end": 1350,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1365,
"end": 1371,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1365,
"end": 1370,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1365,
"end": 1366,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1369,
"end": 1370,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1385,
"end": 1391,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1385,
"end": 1390,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1385,
"end": 1386,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1389,
"end": 1390,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1405,
"end": 1411,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1405,
"end": 1410,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1405,
"end": 1406,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1409,
"end": 1410,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1422,
"end": 1428,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1422,
"end": 1427,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1422,
"end": 1423,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1426,
"end": 1427,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
}
]
}
}
],
"interpreter": null
}