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

2974 lines
97 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 60,
"end": 1885,
"ctxt": 0
},
"body": [
{
"type": "BlockStatement",
"span": {
"start": 60,
"end": 283,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 66,
"end": 99,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 72,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 72,
"end": 76,
"ctxt": 0
},
"value": "data",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 80,
"end": 98,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 89,
"end": 96,
"ctxt": 0
},
"value": "value",
"raw": "'value'"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 105,
"end": 197,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 111,
"end": 196,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 111,
"end": 189,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 121,
"end": 182,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 121,
"end": 126,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 129,
"end": 182,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 129,
"end": 180,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 130,
"end": 179,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 136,
"end": 179,
"ctxt": 0
},
"stmts": [
{
"type": "ThrowStatement",
"span": {
"start": 138,
"end": 177,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 144,
"end": 177,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "Error",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 154,
"end": 176,
"ctxt": 0
},
"value": "param is not defined",
"raw": "'param is not defined'"
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 192,
"end": 196,
"ctxt": 0
},
"value": "data",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 207,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 207,
"end": 225,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 207,
"end": 218,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 207,
"end": 214,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 215,
"end": 218,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 219,
"end": 224,
"ctxt": 0
},
"value": "param",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 286,
"end": 500,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 292,
"end": 325,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 298,
"end": 324,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 298,
"end": 302,
"ctxt": 0
},
"value": "data",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 306,
"end": 324,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 308,
"end": 313,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 315,
"end": 322,
"ctxt": 0
},
"value": "value",
"raw": "'value'"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 331,
"end": 364,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 335,
"end": 363,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 338,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 340,
"end": 358,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 340,
"end": 346,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "StringLiteral",
"span": {
"start": 361,
"end": 363,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 369,
"end": 461,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 375,
"end": 460,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 375,
"end": 453,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 385,
"end": 446,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 385,
"end": 390,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 393,
"end": 446,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 393,
"end": 444,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 394,
"end": 443,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 400,
"end": 443,
"ctxt": 0
},
"stmts": [
{
"type": "ThrowStatement",
"span": {
"start": 402,
"end": 441,
"ctxt": 0
},
"argument": {
"type": "NewExpression",
"span": {
"start": 408,
"end": 441,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 412,
"end": 417,
"ctxt": 0
},
"value": "Error",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 418,
"end": 440,
"ctxt": 0
},
"value": "param is not defined",
"raw": "'param is not defined'"
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 456,
"end": 460,
"ctxt": 0
},
"value": "data",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 471,
"end": 475,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 471,
"end": 474,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 502,
"end": 702,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 508,
"end": 541,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 514,
"end": 540,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 514,
"end": 518,
"ctxt": 0
},
"value": "data",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 522,
"end": 540,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 524,
"end": 529,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 531,
"end": 538,
"ctxt": 0
},
"value": "value",
"raw": "'value'"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 547,
"end": 580,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 551,
"end": 579,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 551,
"end": 554,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 554,
"end": 574,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 556,
"end": 574,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 556,
"end": 562,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 565,
"end": 574,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "StringLiteral",
"span": {
"start": 577,
"end": 579,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 585,
"end": 653,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 591,
"end": 652,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 591,
"end": 645,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 601,
"end": 638,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 601,
"end": 606,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 609,
"end": 638,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 609,
"end": 636,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 610,
"end": 635,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 616,
"end": 635,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 618,
"end": 633,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 618,
"end": 633,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 618,
"end": 621,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 624,
"end": 633,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 648,
"end": 652,
"ctxt": 0
},
"value": "data",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 663,
"end": 667,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 663,
"end": 666,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 704,
"end": 890,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 710,
"end": 743,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 716,
"end": 742,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 716,
"end": 720,
"ctxt": 0
},
"value": "data",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 724,
"end": 742,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 726,
"end": 731,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 733,
"end": 740,
"ctxt": 0
},
"value": "value",
"raw": "'value'"
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 749,
"end": 782,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 753,
"end": 781,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 753,
"end": 756,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 756,
"end": 776,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 758,
"end": 776,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 758,
"end": 764,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 767,
"end": 776,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "StringLiteral",
"span": {
"start": 779,
"end": 781,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 787,
"end": 853,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 793,
"end": 852,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 793,
"end": 845,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 803,
"end": 838,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 803,
"end": 808,
"ctxt": 0
},
"value": "param",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 811,
"end": 838,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 811,
"end": 836,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 812,
"end": 835,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 818,
"end": 835,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 820,
"end": 833,
"ctxt": 0
},
"argument": {
"type": "BinaryExpression",
"span": {
"start": 827,
"end": 833,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 827,
"end": 829,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 832,
"end": 833,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 848,
"end": 852,
"ctxt": 0
},
"value": "data",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 863,
"end": 867,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 863,
"end": 866,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 892,
"end": 1207,
"ctxt": 0
},
"stmts": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 898,
"end": 946,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 908,
"end": 914,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 915,
"end": 946,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 925,
"end": 940,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 925,
"end": 931,
"ctxt": 0
},
"value": "window",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 931,
"end": 939,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 933,
"end": 939,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 933,
"end": 939,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 952,
"end": 980,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 956,
"end": 979,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 956,
"end": 959,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 959,
"end": 979,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 961,
"end": 979,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 961,
"end": 967,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 970,
"end": 979,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 985,
"end": 1011,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 989,
"end": 1010,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 989,
"end": 995,
"ctxt": 0
},
"value": "window",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 998,
"end": 1010,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 998,
"end": 1000,
"ctxt": 0
},
"properties": []
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1004,
"end": 1010,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1004,
"end": 1010,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1016,
"end": 1039,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1016,
"end": 1038,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1016,
"end": 1029,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1016,
"end": 1022,
"ctxt": 0
},
"value": "window",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1023,
"end": 1029,
"ctxt": 0
},
"value": "window",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1032,
"end": 1038,
"ctxt": 0
},
"value": "window",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1045,
"end": 1174,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1051,
"end": 1173,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1051,
"end": 1164,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1053,
"end": 1103,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1054,
"end": 1102,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1054,
"end": 1100,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1055,
"end": 1099,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1061,
"end": 1099,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1063,
"end": 1072,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1063,
"end": 1071,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1063,
"end": 1066,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 1069,
"end": 1071,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
{
"type": "ReturnStatement",
"span": {
"start": 1073,
"end": 1097,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1080,
"end": 1097,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1080,
"end": 1088,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "ObjectPattern",
"span": {
"start": 1113,
"end": 1162,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1115,
"end": 1155,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1116,
"end": 1154,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1116,
"end": 1152,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1117,
"end": 1151,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1123,
"end": 1151,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1125,
"end": 1149,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1132,
"end": 1149,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1132,
"end": 1140,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "Identifier",
"span": {
"start": 1157,
"end": 1160,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1167,
"end": 1173,
"ctxt": 0
},
"value": "window",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1180,
"end": 1184,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1180,
"end": 1183,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1209,
"end": 1525,
"ctxt": 0
},
"stmts": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1215,
"end": 1263,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1225,
"end": 1231,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1232,
"end": 1263,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1242,
"end": 1257,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1242,
"end": 1248,
"ctxt": 0
},
"value": "window",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1248,
"end": 1256,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1250,
"end": 1256,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1250,
"end": 1256,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1269,
"end": 1297,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1273,
"end": 1296,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1273,
"end": 1276,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1276,
"end": 1296,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1278,
"end": 1296,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1278,
"end": 1284,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1287,
"end": 1296,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1302,
"end": 1328,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1306,
"end": 1327,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1306,
"end": 1312,
"ctxt": 0
},
"value": "window",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 1315,
"end": 1327,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 1315,
"end": 1317,
"ctxt": 0
},
"properties": []
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1321,
"end": 1327,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1321,
"end": 1327,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1333,
"end": 1356,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1333,
"end": 1355,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1333,
"end": 1346,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1333,
"end": 1339,
"ctxt": 0
},
"value": "window",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1340,
"end": 1346,
"ctxt": 0
},
"value": "window",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1349,
"end": 1355,
"ctxt": 0
},
"value": "window",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1362,
"end": 1492,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1368,
"end": 1491,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1368,
"end": 1482,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1370,
"end": 1411,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1371,
"end": 1410,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1371,
"end": 1408,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1372,
"end": 1407,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1378,
"end": 1407,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1381,
"end": 1405,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1388,
"end": 1405,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1388,
"end": 1396,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "ObjectPattern",
"span": {
"start": 1421,
"end": 1480,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1423,
"end": 1473,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1424,
"end": 1472,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1424,
"end": 1470,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1425,
"end": 1469,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1431,
"end": 1469,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1433,
"end": 1442,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1433,
"end": 1441,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1433,
"end": 1436,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 1439,
"end": 1441,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
{
"type": "ReturnStatement",
"span": {
"start": 1443,
"end": 1467,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1450,
"end": 1467,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1450,
"end": 1458,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "Identifier",
"span": {
"start": 1475,
"end": 1478,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1485,
"end": 1491,
"ctxt": 0
},
"value": "window",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1498,
"end": 1502,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1498,
"end": 1501,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1527,
"end": 1885,
"ctxt": 0
},
"stmts": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1533,
"end": 1581,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1543,
"end": 1549,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1550,
"end": 1581,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 1560,
"end": 1575,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1560,
"end": 1566,
"ctxt": 0
},
"value": "window",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1566,
"end": 1574,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1568,
"end": 1574,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1568,
"end": 1574,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1587,
"end": 1615,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1591,
"end": 1614,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1591,
"end": 1594,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1594,
"end": 1614,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1596,
"end": 1614,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1596,
"end": 1602,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1605,
"end": 1614,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1620,
"end": 1646,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1624,
"end": 1645,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1624,
"end": 1630,
"ctxt": 0
},
"value": "window",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 1633,
"end": 1645,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 1633,
"end": 1635,
"ctxt": 0
},
"properties": []
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1639,
"end": 1645,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1639,
"end": 1645,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1651,
"end": 1674,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1651,
"end": 1673,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1651,
"end": 1664,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1651,
"end": 1657,
"ctxt": 0
},
"value": "window",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1658,
"end": 1664,
"ctxt": 0
},
"value": "window",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1667,
"end": 1673,
"ctxt": 0
},
"value": "window",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1680,
"end": 1840,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1686,
"end": 1839,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1686,
"end": 1830,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1688,
"end": 1728,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1689,
"end": 1727,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1689,
"end": 1725,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1690,
"end": 1724,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1696,
"end": 1724,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1698,
"end": 1722,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1705,
"end": 1722,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1705,
"end": 1713,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "ObjectPattern",
"span": {
"start": 1738,
"end": 1828,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 1740,
"end": 1780,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1741,
"end": 1779,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1741,
"end": 1777,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1742,
"end": 1776,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1748,
"end": 1776,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1750,
"end": 1774,
"ctxt": 0
},
"argument": {
"type": "TsConstAssertion",
"span": {
"start": 1757,
"end": 1774,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1757,
"end": 1765,
"ctxt": 0
},
"value": "window",
"raw": "'window'"
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 1782,
"end": 1826,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 1782,
"end": 1785,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 1788,
"end": 1826,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 1788,
"end": 1824,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1789,
"end": 1823,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1795,
"end": 1823,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1797,
"end": 1806,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1797,
"end": 1805,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1797,
"end": 1800,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 1803,
"end": 1805,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
{
"type": "ReturnStatement",
"span": {
"start": 1807,
"end": 1821,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1814,
"end": 1820,
"ctxt": 0
},
"value": "window",
"optional": false
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1833,
"end": 1839,
"ctxt": 0
},
"value": "window",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1846,
"end": 1850,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 1846,
"end": 1849,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
]
}
],
"interpreter": null
}