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

192 lines
4.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 118,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 21,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 44,
"end": 64,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 48,
"end": 63,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 48,
"end": 51,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 51,
"end": 63,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsConstructorType",
"span": {
"start": 53,
"end": 63,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
},
"isAbstract": false
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 85,
"end": 93,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 85,
"end": 92,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 85,
"end": 88,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 105,
"end": 118,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 105,
"end": 117,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 105,
"end": 108,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 111,
"end": 117,
"ctxt": 0
},
"value": "asdf",
"raw": "\"asdf\""
}
}
}
],
"interpreter": null
}