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

221 lines
5.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 81,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 81,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 15,
"end": 25,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 16,
"end": 24,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 18,
"end": 24,
"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": 30,
"end": 47,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 38,
"end": 46,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 40,
"end": 46,
"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": 53,
"end": 60,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 53,
"end": 60,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 57,
"end": 60,
"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": 65,
"end": 79,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 65,
"end": 79,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 79,
"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
}