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

116 lines
2.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 32,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 32,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 8,
"end": 28,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 9,
"end": 26,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 9,
"end": 10,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 19,
"end": 26,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 19,
"end": 23,
"ctxt": 0
},
"value": "List",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 23,
"end": 26,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"default": null
}
]
},
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}