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

196 lines
4.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 117,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 20,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 43,
"end": 63,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 47,
"end": 62,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 47,
"end": 50,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 50,
"end": 62,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsConstructorType",
"span": {
"start": 52,
"end": 62,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 58,
"end": 62,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
},
"isAbstract": false
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 84,
"end": 92,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 84,
"end": 91,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 104,
"end": 117,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 104,
"end": 116,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"value": "AAA",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 110,
"end": 116,
"ctxt": 0
},
"value": "asdf",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
],
"interpreter": null
}