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

357 lines
8.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 17,
"end": 165,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 17,
"end": 87,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 31,
"end": 50,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 31,
"end": 42,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 44,
"end": 49,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 46,
"end": 49,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 55,
"end": 85,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 55,
"end": 66,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 67,
"end": 76,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 67,
"end": 76,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 68,
"end": 76,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 78,
"end": 85,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 89,
"end": 165,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 103,
"end": 122,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 103,
"end": 114,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 116,
"end": 121,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 118,
"end": 121,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 127,
"end": 163,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 127,
"end": 138,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 140,
"end": 148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 142,
"end": 148,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 150,
"end": 159,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 150,
"end": 159,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 152,
"end": 159,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
},
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 161,
"end": 163,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}