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

455 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 52,
"end": 293,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 52,
"end": 156,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 66,
"end": 89,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 73,
"end": 76,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 76,
"end": 84,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 78,
"end": 84,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 94,
"end": 154,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 94,
"end": 105,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 106,
"end": 124,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 113,
"end": 124,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 116,
"end": 124,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 118,
"end": 124,
"ctxt": 0
},
"kind": "string"
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
"start": 126,
"end": 144,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 133,
"end": 144,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 136,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 138,
"end": 144,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 146,
"end": 154,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 158,
"end": 293,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 182,
"end": 204,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 189,
"end": 192,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 192,
"end": 200,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 194,
"end": 200,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 209,
"end": 291,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 209,
"end": 220,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 221,
"end": 239,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 228,
"end": 239,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 231,
"end": 239,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"kind": "string"
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
"start": 241,
"end": 259,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 248,
"end": 259,
"ctxt": 0
},
"value": "baz",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 251,
"end": 259,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 253,
"end": 259,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 261,
"end": 291,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 271,
"end": 285,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 271,
"end": 285,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 277,
"end": 280,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 282,
"end": 284,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}