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

264 lines
6.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 34,
"end": 150,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 34,
"end": 149,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 48,
"end": 52,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 55,
"end": 59,
"ctxt": 0
},
"value": true
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 66,
"end": 147,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 66,
"end": 72,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 73,
"end": 83,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 73,
"end": 83,
"ctxt": 0
},
"value": "thing",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 78,
"end": 83,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"decorators": [],
"span": {
"start": 66,
"end": 147,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 85,
"end": 147,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 95,
"end": 106,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 95,
"end": 105,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 95,
"end": 100,
"ctxt": 0
},
"value": "thing",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 101,
"end": 105,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 121,
"end": 132,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 121,
"end": 131,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 121,
"end": 126,
"ctxt": 0
},
"value": "thing",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 127,
"end": 131,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"value": "bar",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
}
}
],
"interpreter": null
}