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

279 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 43,
"end": 142,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 43,
"end": 142,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 57,
"end": 70,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 57,
"end": 61,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 58,
"end": 61,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 61,
"end": 69,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 63,
"end": 69,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 75,
"end": 84,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 75,
"end": 79,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 82,
"end": 83,
"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": 89,
"end": 101,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 89,
"end": 92,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 94,
"end": 100,
"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": 106,
"end": 114,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 106,
"end": 109,
"ctxt": 0
},
"value": "qux",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 112,
"end": 113,
"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": 119,
"end": 140,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 119,
"end": 123,
"ctxt": 0
},
"value": "quux",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 119,
"end": 140,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 132,
"end": 140,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 125,
"end": 131,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 127,
"end": 131,
"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
}