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

397 lines
9.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 104,
"end": 503,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 110,
"end": 113,
"ctxt": 0
},
"value": "LOL",
"optional": false
},
"declare": false,
"span": {
"start": 104,
"end": 475,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 232,
"end": 237,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 263,
"end": 268,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 314,
"end": 326,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 321,
"end": 322,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 367,
"end": 473,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 367,
"end": 378,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 381,
"end": 473,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 409,
"end": 419,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 409,
"end": 419,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 409,
"end": 415,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 409,
"end": 413,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 414,
"end": 415,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 456,
"end": 467,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 456,
"end": 467,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 456,
"end": 463,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 456,
"end": 460,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 461,
"end": 463,
"ctxt": 0
},
"value": "ka",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 466,
"end": 467,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 477,
"end": 494,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 481,
"end": 494,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 481,
"end": 482,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 485,
"end": 494,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 489,
"end": 492,
"ctxt": 0
},
"value": "LOL",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 495,
"end": 503,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 495,
"end": 503,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 495,
"end": 498,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 495,
"end": 496,
"ctxt": 0
},
"value": "l",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 501,
"end": 503,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
}
}
}
],
"interpreter": null
}