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

277 lines
6.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 173,
"end": 316,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 173,
"end": 279,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 183,
"end": 185,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 185,
"end": 202,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 186,
"end": 201,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 196,
"end": 201,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 196,
"end": 198,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 198,
"end": 201,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 267,
"end": 279,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 273,
"end": 277,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 274,
"end": 277,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 281,
"end": 316,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 291,
"end": 293,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 302,
"end": 312,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 302,
"end": 304,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeArguments": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 304,
"end": 312,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 305,
"end": 307,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 307,
"end": 311,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 308,
"end": 310,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 308,
"end": 310,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"typeParams": null
}
]
}
}
]
}
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 313,
"end": 316,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}