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

221 lines
5.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 80,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 80,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 14,
"end": 24,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 15,
"end": 23,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 17,
"end": 23,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 29,
"end": 46,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 37,
"end": 45,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 64,
"end": 78,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 64,
"end": 78,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 75,
"end": 78,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}