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

109 lines
2.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 23,
"end": 73,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 23,
"end": 73,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 37,
"end": 71,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 37,
"end": 48,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 49,
"end": 67,
"ctxt": 0
},
"decorators": [],
"accessibility": null,
"override": false,
"readonly": true,
"param": {
"type": "Identifier",
"span": {
"start": 58,
"end": 67,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 67,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 61,
"end": 67,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 69,
"end": 71,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}