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

852 lines
22 KiB
JSON

{
"type": "Module",
"span": {
"start": 50,
"end": 408,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 50,
"end": 122,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 56,
"end": 122,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"value": "Foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 59,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 61,
"end": 68,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 61,
"end": 63,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 61,
"end": 63,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 66,
"end": 68,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 66,
"end": 68,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 75,
"end": 122,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": "m1",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 96,
"end": 99,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 108,
"end": 116,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 108,
"end": 110,
"ctxt": 0
},
"value": "m2",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 108,
"end": 116,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"stmts": []
},
"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": []
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 124,
"end": 156,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 134,
"end": 136,
"ctxt": 0
},
"value": "I1",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 137,
"end": 156,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 143,
"end": 154,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": "m1",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 147,
"end": 153,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 158,
"end": 206,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 168,
"end": 170,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 171,
"end": 206,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 177,
"end": 188,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 177,
"end": 179,
"ctxt": 0
},
"value": "m1",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 181,
"end": 187,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 193,
"end": 204,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 193,
"end": 195,
"ctxt": 0
},
"value": "m2",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 197,
"end": 203,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 199,
"end": 203,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 208,
"end": 253,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 220,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 221,
"end": 253,
"ctxt": 0
},
"body": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 227,
"end": 251,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 231,
"end": 245,
"ctxt": 0
},
"rest": {
"start": 231,
"end": 234,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 234,
"end": 238,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 238,
"end": 245,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 240,
"end": 245,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 240,
"end": 243,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 246,
"end": 250,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"value": "I1",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 255,
"end": 300,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 267,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 268,
"end": 300,
"ctxt": 0
},
"body": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 274,
"end": 298,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 278,
"end": 292,
"ctxt": 0
},
"rest": {
"start": 278,
"end": 281,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 281,
"end": 285,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 285,
"end": 292,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 287,
"end": 292,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 293,
"end": 297,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 302,
"end": 408,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "Bar",
"optional": false
},
"declare": false,
"span": {
"start": 309,
"end": 408,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 337,
"end": 369,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 337,
"end": 339,
"ctxt": 0
},
"value": "m1",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 337,
"end": 369,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 342,
"end": 369,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 352,
"end": 363,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 352,
"end": 360,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 352,
"end": 357,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 358,
"end": 360,
"ctxt": 0
},
"value": "m1",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 374,
"end": 406,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 374,
"end": 376,
"ctxt": 0
},
"value": "m2",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 374,
"end": 406,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 379,
"end": 406,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 389,
"end": 400,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 389,
"end": 399,
"ctxt": 0
},
"callee": {
"type": "SuperPropExpression",
"span": {
"start": 389,
"end": 397,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 389,
"end": 394,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 395,
"end": 397,
"ctxt": 0
},
"value": "m2",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
],
"interpreter": null
}