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

403 lines
9.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 133,
"end": 504,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 133,
"end": 175,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 143,
"end": 151,
"ctxt": 0
},
"value": "Drawable",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 152,
"end": 175,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 158,
"end": 173,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 158,
"end": 162,
"ctxt": 0
},
"value": "draw",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 164,
"end": 172,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 166,
"end": 172,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 176,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 186,
"end": 193,
"ctxt": 0
},
"value": "Sizable",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 194,
"end": 217,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 200,
"end": 215,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 200,
"end": 204,
"ctxt": 0
},
"value": "size",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 206,
"end": 214,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 208,
"end": 214,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"value": "Square",
"optional": false
},
"declare": false,
"span": {
"start": 299,
"end": 389,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 318,
"end": 350,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 318,
"end": 322,
"ctxt": 0
},
"value": "draw",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 318,
"end": 350,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 325,
"end": 350,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 335,
"end": 344,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 342,
"end": 343,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 355,
"end": 387,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 355,
"end": 359,
"ctxt": 0
},
"value": "size",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 355,
"end": 387,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 362,
"end": 387,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 372,
"end": 381,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 379,
"end": 380,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 454,
"end": 463,
"ctxt": 0
},
"value": "BadSquare",
"optional": false
},
"declare": false,
"span": {
"start": 448,
"end": 504,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 470,
"end": 502,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 470,
"end": 474,
"ctxt": 0
},
"value": "size",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 470,
"end": 502,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 477,
"end": 502,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 487,
"end": 496,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 494,
"end": 495,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}