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

143 lines
3.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 37,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 37,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 7,
"end": 33,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 8,
"end": 31,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 18,
"end": 31,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 18,
"end": 22,
"ctxt": 0
},
"value": "List",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 22,
"end": 31,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 23,
"end": 27,
"ctxt": 0
},
"value": "List",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 27,
"end": 30,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
]
}
},
"default": null
}
]
},
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}