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

455 lines
12 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 292,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 155,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 65,
"end": 88,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 72,
"end": 75,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 75,
"end": 83,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 77,
"end": 83,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 93,
"end": 153,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 93,
"end": 104,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 105,
"end": 123,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 112,
"end": 123,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 115,
"end": 123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 117,
"end": 123,
"ctxt": 0
},
"kind": "string"
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 125,
"end": 143,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 132,
"end": 143,
"ctxt": 0
},
"value": "bar",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 143,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 137,
"end": 143,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 145,
"end": 153,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 163,
"end": 164,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 157,
"end": 292,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 181,
"end": 203,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 188,
"end": 191,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 202,
"end": 203,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 191,
"end": 199,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 199,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 208,
"end": 290,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 208,
"end": 219,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 220,
"end": 238,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 227,
"end": 238,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 230,
"end": 238,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 232,
"end": 238,
"ctxt": 0
},
"kind": "string"
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 240,
"end": 258,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 247,
"end": 258,
"ctxt": 0
},
"value": "baz",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 250,
"end": 258,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 252,
"end": 258,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 260,
"end": 290,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 270,
"end": 284,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 270,
"end": 284,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
2022-02-04 14:17:42 +03:00
"start": 270,
"end": 275,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 276,
"end": 279,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 281,
"end": 283,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 173,
"end": 174,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}