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

277 lines
6.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 172,
"end": 315,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 172,
"end": 278,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 184,
"end": 201,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 185,
"end": 200,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 195,
"end": 200,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 195,
"end": 197,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 266,
"end": 278,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 272,
"end": 276,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 273,
"end": 276,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 280,
"end": 315,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 290,
"end": 292,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 301,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 301,
"end": 303,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeArguments": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 303,
"end": 311,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 304,
"end": 310,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 306,
"end": 310,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 307,
"end": 309,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 307,
"end": 309,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"typeParams": null
}
]
}
}
]
}
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 312,
"end": 315,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}