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

195 lines
4.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 105,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 56,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 29,
"end": 54,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 48,
"end": 53,
"ctxt": 0
},
"value": "Foo",
"raw": "\"Foo\""
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 37,
"end": 45,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 58,
"end": 105,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 72,
"end": 82,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 76,
"end": 81,
"ctxt": 0
},
"value": 20000.0,
"raw": "20000"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 87,
"end": 103,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 98,
"end": 102,
"ctxt": 0
},
"value": true
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}