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

279 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 42,
"end": 141,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 42,
"end": 141,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 56,
"end": 69,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 56,
"end": 60,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 57,
"end": 60,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 60,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 62,
"end": 68,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 74,
"end": 83,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 74,
"end": 78,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 75,
"end": 78,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": 6.0,
"raw": "6"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 88,
"end": 100,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 88,
"end": 91,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 105,
"end": 113,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 105,
"end": 108,
"ctxt": 0
},
"value": "qux",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": 6.0,
"raw": "6"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 118,
"end": 139,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 118,
"end": 122,
"ctxt": 0
},
"value": "quux",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 118,
"end": 139,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 131,
"end": 139,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 126,
"end": 130,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}