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

323 lines
8.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 70,
"end": 292,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 70,
"end": 292,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 86,
"end": 105,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"value": "unused",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 93,
"end": 104,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 95,
"end": 104,
"ctxt": 0
},
"kind": "undefined"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 133,
"end": 151,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 134,
"end": 139,
"ctxt": 0
},
"value": "brand",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 150,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 141,
"end": 150,
"ctxt": 0
},
"kind": "undefined"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 176,
"end": 290,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 176,
"end": 181,
"ctxt": 0
},
"value": "isFoo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 183,
"end": 188,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 185,
"end": 188,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"decorators": [],
"span": {
"start": 176,
"end": 290,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 200,
"end": 290,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 265,
"end": 284,
"ctxt": 0
},
"argument": {
"type": "BinaryExpression",
"span": {
"start": 272,
"end": 283,
"ctxt": 0
},
"operator": "in",
"left": {
"type": "PrivateName",
"span": {
"start": 272,
"end": 278,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 273,
"end": 278,
"ctxt": 0
},
"value": "brand",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 189,
"end": 199,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypePredicate",
"span": {
"start": 191,
"end": 199,
"ctxt": 0
},
"asserts": false,
"paramName": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "v",
"optional": false
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 196,
"end": 199,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 196,
"end": 199,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 196,
"end": 199,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"typeParams": null
}
}
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}