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

336 lines
7.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 25,
"end": 171,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 25,
"end": 69,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 37,
"end": 68,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 37,
"end": 40,
"ctxt": 0
},
"value": "win",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 40,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 42,
"end": 68,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 42,
"end": 48,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 42,
"end": 48,
"ctxt": 0
},
"value": "Window",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeQuery",
"span": {
"start": 51,
"end": 68,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 58,
"end": 68,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"typeArguments": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 104,
"end": 110,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 104,
"end": 110,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"value": "win",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 108,
"end": 110,
"ctxt": 0
},
"value": "hi",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 111,
"end": 115,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 116,
"end": 118,
"ctxt": 0
},
"value": "hi",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 119,
"end": 132,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 119,
"end": 132,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 119,
"end": 129,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"value": "hi",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 134,
"end": 143,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 134,
"end": 143,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 134,
"end": 137,
"ctxt": 0
},
"value": "win",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 137,
"end": 143,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 138,
"end": 142,
"ctxt": 0
},
"value": "hi",
"raw": "'hi'"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 144,
"end": 154,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 144,
"end": 154,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 144,
"end": 148,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 148,
"end": 154,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"value": "hi",
"raw": "'hi'"
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 155,
"end": 171,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 155,
"end": 171,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 155,
"end": 165,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 166,
"end": 170,
"ctxt": 0
},
"value": "hi",
"raw": "'hi'"
}
}
}
}
],
"interpreter": null
}