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

400 lines
9.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 132,
"end": 503,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 132,
"end": 174,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 142,
"end": 150,
"ctxt": 0
},
"value": "Drawable",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 151,
"end": 174,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 157,
"end": 172,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 157,
"end": 161,
"ctxt": 0
},
"value": "draw",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 163,
"end": 171,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 175,
"end": 216,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 185,
"end": 192,
"ctxt": 0
},
"value": "Sizable",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 193,
"end": 216,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 199,
"end": 214,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 199,
"end": 203,
"ctxt": 0
},
"value": "size",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 205,
"end": 213,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 207,
"end": 213,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 304,
"end": 310,
"ctxt": 0
},
"value": "Square",
"optional": false
},
"declare": false,
"span": {
"start": 298,
"end": 388,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 317,
"end": 349,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 317,
"end": 321,
"ctxt": 0
},
"value": "draw",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 317,
"end": 349,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 324,
"end": 349,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 334,
"end": 343,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 341,
"end": 342,
"ctxt": 0
},
"value": 0.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": 354,
"end": 386,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 354,
"end": 358,
"ctxt": 0
},
"value": "size",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 354,
"end": 386,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 361,
"end": 386,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 371,
"end": 380,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 378,
"end": 379,
"ctxt": 0
},
"value": 0.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": 453,
"end": 462,
"ctxt": 0
},
"value": "BadSquare",
"optional": false
},
"declare": false,
"span": {
"start": 447,
"end": 503,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 469,
"end": 501,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 469,
"end": 473,
"ctxt": 0
},
"value": "size",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 469,
"end": 501,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 476,
"end": 501,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 486,
"end": 495,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 493,
"end": 494,
"ctxt": 0
},
"value": 0.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
}