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

109 lines
2.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 24,
"end": 74,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 24,
"end": 74,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 38,
"end": 72,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 38,
"end": 49,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 50,
"end": 68,
"ctxt": 0
},
"decorators": [],
"accessibility": null,
"override": false,
"readonly": true,
"param": {
"type": "Identifier",
"span": {
"start": 59,
"end": 68,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 60,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 62,
"end": 68,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 70,
"end": 72,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}