swc/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.2.json
2022-03-22 07:54:08 +00:00

544 lines
17 KiB
JSON

{
"type": "Script",
"span": {
"start": 167,
"end": 339,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 167,
"end": 177,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 178,
"end": 247,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 178,
"end": 246,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 178,
"end": 244,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 179,
"end": 243,
"ctxt": 0
},
"params": [
{
"type": "ObjectPattern",
"span": {
"start": 180,
"end": 228,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 182,
"end": 218,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 183,
"end": 217,
"ctxt": 0
},
"object": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 183,
"end": 215,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 201,
"end": 213,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 197,
"end": 198,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"property": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 220,
"end": 226,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 224,
"end": 226,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 233,
"end": 243,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 235,
"end": 241,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"value": "C",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 249,
"end": 262,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 259,
"end": 261,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 263,
"end": 339,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 263,
"end": 338,
"ctxt": 0
},
"callee": {
"type": "ParenthesisExpression",
"span": {
"start": 263,
"end": 336,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 264,
"end": 335,
"ctxt": 0
},
"params": [
{
"type": "ObjectPattern",
"span": {
"start": 265,
"end": 313,
"ctxt": 0
},
"properties": [
{
"type": "KeyValuePatternProperty",
"key": {
"type": "Computed",
"span": {
"start": 267,
"end": 303,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 268,
"end": 302,
"ctxt": 0
},
"object": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 268,
"end": 300,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 286,
"end": 298,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"property": {
"type": "Identifier",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
"value": {
"type": "AssignmentPattern",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 305,
"end": 306,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 309,
"end": 311,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"typeAnnotation": null
}
}
],
"optional": false,
"typeAnnotation": null
},
{
"type": "AssignmentPattern",
"span": {
"start": 315,
"end": 320,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 319,
"end": 320,
"ctxt": 0
},
"value": "x",
"optional": false
},
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 325,
"end": 335,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 333,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 331,
"end": 332,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 331,
"end": 332,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}