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

361 lines
8.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 86,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 30,
"end": 49,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 30,
"end": 41,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 42,
"end": 48,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 42,
"end": 48,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 43,
"end": 48,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 54,
"end": 84,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 54,
"end": 65,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 66,
"end": 75,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 66,
"end": 75,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 67,
"end": 75,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 84,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 88,
"end": 164,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 102,
"end": 121,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 102,
"end": 113,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 120,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 126,
"end": 162,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 126,
"end": 137,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 138,
"end": 147,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 138,
"end": 147,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 141,
"end": 147,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 149,
"end": 158,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 149,
"end": 158,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 151,
"end": 158,
"ctxt": 0
},
"value": "hello",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 160,
"end": 162,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}