swc/crates/swc_ecma_parser/tests/tsc/jsdocReadonlyDeclarations.json
2022-04-05 12:46:35 +00:00

447 lines
11 KiB
JSON

{
"type": "Script",
"span": {
"start": 171,
"end": 542,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 171,
"end": 370,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 206,
"end": 211,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 206,
"end": 207,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": 6.0,
"raw": "6"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 237,
"end": 368,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 237,
"end": 248,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 249,
"end": 250,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 252,
"end": 368,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 262,
"end": 272,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 262,
"end": 272,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 262,
"end": 268,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 262,
"end": 266,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "n",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 352,
"end": 358,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 352,
"end": 356,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 357,
"end": 358,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"value": "n",
"optional": false
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 371,
"end": 380,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 371,
"end": 380,
"ctxt": 0
},
"object": {
"type": "NewExpression",
"span": {
"start": 371,
"end": 378,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 379,
"end": 380,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 391,
"end": 392,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 382,
"end": 434,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 395,
"end": 434,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 422,
"end": 432,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 422,
"end": 432,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 422,
"end": 428,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 422,
"end": 426,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 427,
"end": 428,
"ctxt": 0
},
"value": "z",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 431,
"end": 432,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 498,
"end": 499,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 492,
"end": 542,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 506,
"end": 540,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 506,
"end": 517,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 538,
"end": 540,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}