swc/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json
2022-04-05 12:46:35 +00:00

2706 lines
82 KiB
JSON

{
"type": "Script",
"span": {
"start": 28,
"end": 1879,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 44,
"end": 76,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 44,
"end": 76,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 76,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 61,
"end": 76,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 63,
"end": 74,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 63,
"end": 65,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 65,
"end": 74,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 67,
"end": 74,
"ctxt": 0
},
"kind": "boolean"
}
},
"typeParams": null
}
]
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 82,
"end": 112,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 82,
"end": 112,
"ctxt": 0
},
"value": "definiteString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 96,
"end": 112,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 98,
"end": 112,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 100,
"end": 110,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 100,
"end": 102,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 102,
"end": 110,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 104,
"end": 110,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 118,
"end": 149,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 118,
"end": 149,
"ctxt": 0
},
"value": "optionalString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 149,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 134,
"end": 149,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 136,
"end": 147,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 136,
"end": 138,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 155,
"end": 186,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 155,
"end": 186,
"ctxt": 0
},
"value": "optionalNumber",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 169,
"end": 186,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 171,
"end": 186,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 173,
"end": 184,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 173,
"end": 175,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 184,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 192,
"end": 235,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 192,
"end": 235,
"ctxt": 0
},
"value": "undefinedString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 207,
"end": 235,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 209,
"end": 235,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 211,
"end": 233,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 211,
"end": 213,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 213,
"end": 233,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 215,
"end": 233,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 215,
"end": 221,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 224,
"end": 233,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 241,
"end": 284,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 241,
"end": 284,
"ctxt": 0
},
"value": "undefinedNumber",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 256,
"end": 284,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 258,
"end": 284,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 260,
"end": 282,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 260,
"end": 262,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 262,
"end": 282,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 264,
"end": 282,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 273,
"end": 282,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 28,
"end": 1174,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 286,
"end": 1174,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 308,
"end": 419,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 312,
"end": 418,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 312,
"end": 330,
"ctxt": 0
},
"value": "optionalUnionStops",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 330,
"end": 355,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 332,
"end": 355,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 334,
"end": 353,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 334,
"end": 336,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 336,
"end": 353,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 338,
"end": 353,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 338,
"end": 344,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 347,
"end": 353,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 358,
"end": 418,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 360,
"end": 363,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 363,
"end": 378,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 380,
"end": 383,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 383,
"end": 397,
"ctxt": 0
},
"value": "definiteString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 399,
"end": 402,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 402,
"end": 416,
"ctxt": 0
},
"value": "optionalNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 424,
"end": 559,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 428,
"end": 558,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 428,
"end": 451,
"ctxt": 0
},
"value": "optionalUnionDuplicates",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 451,
"end": 476,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 453,
"end": 476,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 455,
"end": 474,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 455,
"end": 457,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 457,
"end": 474,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 459,
"end": 474,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 459,
"end": 465,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 468,
"end": 474,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 479,
"end": 558,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 481,
"end": 484,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 484,
"end": 499,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 501,
"end": 504,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 504,
"end": 518,
"ctxt": 0
},
"value": "definiteString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 520,
"end": 523,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 523,
"end": 537,
"ctxt": 0
},
"value": "optionalString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 539,
"end": 542,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 542,
"end": 556,
"ctxt": 0
},
"value": "optionalNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 564,
"end": 649,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 568,
"end": 648,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 568,
"end": 579,
"ctxt": 0
},
"value": "allOptional",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 579,
"end": 605,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 581,
"end": 605,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 583,
"end": 603,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 583,
"end": 585,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 586,
"end": 603,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 588,
"end": 603,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 588,
"end": 594,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 597,
"end": 603,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 608,
"end": 648,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 610,
"end": 613,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 613,
"end": 627,
"ctxt": 0
},
"value": "optionalString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 629,
"end": 632,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 632,
"end": 646,
"ctxt": 0
},
"value": "optionalNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 672,
"end": 785,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 676,
"end": 784,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 676,
"end": 695,
"ctxt": 0
},
"value": "undefinedUnionStops",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 695,
"end": 720,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 697,
"end": 720,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 699,
"end": 718,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 699,
"end": 701,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 701,
"end": 718,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 703,
"end": 718,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 703,
"end": 709,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 712,
"end": 718,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 723,
"end": 784,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 725,
"end": 728,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 728,
"end": 743,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 745,
"end": 748,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 748,
"end": 762,
"ctxt": 0
},
"value": "definiteString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 764,
"end": 767,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 767,
"end": 782,
"ctxt": 0
},
"value": "undefinedNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 790,
"end": 928,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 794,
"end": 927,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 794,
"end": 818,
"ctxt": 0
},
"value": "undefinedUnionDuplicates",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 818,
"end": 843,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 820,
"end": 843,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 822,
"end": 841,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 822,
"end": 824,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 824,
"end": 841,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 826,
"end": 841,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 826,
"end": 832,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 835,
"end": 841,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 846,
"end": 927,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 848,
"end": 851,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 851,
"end": 866,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 868,
"end": 871,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 871,
"end": 885,
"ctxt": 0
},
"value": "definiteString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 887,
"end": 890,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 890,
"end": 905,
"ctxt": 0
},
"value": "undefinedString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 907,
"end": 910,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 910,
"end": 925,
"ctxt": 0
},
"value": "undefinedNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 933,
"end": 1032,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 937,
"end": 1031,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 937,
"end": 949,
"ctxt": 0
},
"value": "allUndefined",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 949,
"end": 986,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 951,
"end": 986,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 953,
"end": 984,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 953,
"end": 955,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 955,
"end": 984,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 957,
"end": 984,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 957,
"end": 963,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 966,
"end": 972,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 975,
"end": 984,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 989,
"end": 1031,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 991,
"end": 994,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 994,
"end": 1009,
"ctxt": 0
},
"value": "undefinedString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1011,
"end": 1014,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1014,
"end": 1029,
"ctxt": 0
},
"value": "undefinedNumber",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1038,
"end": 1172,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1042,
"end": 1171,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1042,
"end": 1072,
"ctxt": 0
},
"value": "undefinedWithOptionalContinues",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1072,
"end": 1107,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1074,
"end": 1107,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1076,
"end": 1105,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1076,
"end": 1078,
"ctxt": 0
},
"value": "sn",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1078,
"end": 1105,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1080,
"end": 1105,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1080,
"end": 1086,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1089,
"end": 1095,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1098,
"end": 1105,
"ctxt": 0
},
"kind": "boolean"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1110,
"end": 1171,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 1112,
"end": 1115,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1115,
"end": 1130,
"ctxt": 0
},
"value": "definiteBoolean",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1132,
"end": 1135,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1135,
"end": 1150,
"ctxt": 0
},
"value": "undefinedString",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1152,
"end": 1155,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1155,
"end": 1169,
"ctxt": 0
},
"value": "optionalNumber",
"optional": false
}
}
]
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1176,
"end": 1237,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1181,
"end": 1186,
"ctxt": 0
},
"value": "Movie",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1189,
"end": 1237,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 1195,
"end": 1209,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1195,
"end": 1200,
"ctxt": 0
},
"value": "title",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1200,
"end": 1208,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1202,
"end": 1208,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1214,
"end": 1235,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1214,
"end": 1226,
"ctxt": 0
},
"value": "yearReleased",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1226,
"end": 1234,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1228,
"end": 1234,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1239,
"end": 1293,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1245,
"end": 1292,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1245,
"end": 1246,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1249,
"end": 1292,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1251,
"end": 1256,
"ctxt": 0
},
"value": "title",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1258,
"end": 1270,
"ctxt": 0
},
"value": "The Matrix",
"raw": "\"The Matrix\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1272,
"end": 1284,
"ctxt": 0
},
"value": "yearReleased",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1286,
"end": 1290,
"ctxt": 0
},
"value": 1999.0,
"raw": "1999"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1368,
"end": 1412,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1374,
"end": 1411,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1374,
"end": 1375,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1375,
"end": 1382,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1377,
"end": 1382,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1377,
"end": 1382,
"ctxt": 0
},
"value": "Movie",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1385,
"end": 1411,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 1387,
"end": 1390,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1390,
"end": 1391,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1393,
"end": 1398,
"ctxt": 0
},
"value": "title",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 1400,
"end": 1409,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1414,
"end": 1468,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1424,
"end": 1430,
"ctxt": 0
},
"value": "Fields",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1431,
"end": 1468,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1437,
"end": 1449,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1437,
"end": 1440,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1440,
"end": 1448,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1442,
"end": 1448,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1454,
"end": 1466,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1454,
"end": 1457,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1457,
"end": 1465,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1459,
"end": 1465,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1469,
"end": 1560,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1479,
"end": 1498,
"ctxt": 0
},
"value": "NearlyPartialFields",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1499,
"end": 1560,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1505,
"end": 1529,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1505,
"end": 1508,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1508,
"end": 1528,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1510,
"end": 1528,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1510,
"end": 1516,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1519,
"end": 1528,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 1534,
"end": 1558,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1534,
"end": 1537,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1537,
"end": 1557,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1539,
"end": 1557,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1539,
"end": 1545,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1548,
"end": 1557,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1570,
"end": 1571,
"ctxt": 0
},
"value": "g",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1572,
"end": 1586,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1572,
"end": 1586,
"ctxt": 0
},
"value": "fields",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1578,
"end": 1586,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1580,
"end": 1586,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1580,
"end": 1586,
"ctxt": 0
},
"value": "Fields",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 1588,
"end": 1618,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1588,
"end": 1618,
"ctxt": 0
},
"value": "partialFields",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1601,
"end": 1618,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1603,
"end": 1618,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1603,
"end": 1610,
"ctxt": 0
},
"value": "Partial",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1610,
"end": 1618,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 1611,
"end": 1617,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1611,
"end": 1617,
"ctxt": 0
},
"value": "Fields",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 1620,
"end": 1660,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1620,
"end": 1660,
"ctxt": 0
},
"value": "nearlyPartialFields",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1639,
"end": 1660,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1641,
"end": 1660,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1641,
"end": 1660,
"ctxt": 0
},
"value": "NearlyPartialFields",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1561,
"end": 1879,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1662,
"end": 1879,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1738,
"end": 1779,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1738,
"end": 1778,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1738,
"end": 1744,
"ctxt": 0
},
"value": "fields",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1747,
"end": 1778,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 1749,
"end": 1752,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1752,
"end": 1758,
"ctxt": 0
},
"value": "fields",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1760,
"end": 1763,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1763,
"end": 1776,
"ctxt": 0
},
"value": "partialFields",
"optional": false
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1830,
"end": 1877,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1830,
"end": 1876,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1830,
"end": 1836,
"ctxt": 0
},
"value": "fields",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 1839,
"end": 1876,
"ctxt": 0
},
"properties": [
{
"type": "SpreadElement",
"spread": {
"start": 1841,
"end": 1844,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1844,
"end": 1850,
"ctxt": 0
},
"value": "fields",
"optional": false
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1852,
"end": 1855,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1855,
"end": 1874,
"ctxt": 0
},
"value": "nearlyPartialFields",
"optional": false
}
}
]
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}