mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
959 lines
28 KiB
JSON
959 lines
28 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 388,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 8,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 1,
|
|
"end": 37,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 23,
|
|
"end": 35,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 23,
|
|
"end": 26,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 28,
|
|
"end": 34,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 18,
|
|
"ctxt": 0
|
|
},
|
|
"value": "N",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
}
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 48,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"value": "M",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 77,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 70,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 102,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 90,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 86,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 109,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 116,
|
|
"end": 117,
|
|
"ctxt": 0
|
|
},
|
|
"value": "N",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 118,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 124,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 137,
|
|
"end": 138,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 131,
|
|
"end": 167,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 153,
|
|
"end": 165,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 153,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"value": "baz",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 156,
|
|
"end": 164,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 158,
|
|
"end": 164,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 148,
|
|
"ctxt": 0
|
|
},
|
|
"value": "M",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 149,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D",
|
|
"optional": false
|
|
}
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 171,
|
|
"end": 388,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 178,
|
|
"end": 179,
|
|
"ctxt": 0
|
|
},
|
|
"value": "O",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 388,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 194,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 186,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 219,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 207,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Q",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 208,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E2",
|
|
"optional": false
|
|
}
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 197,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 195,
|
|
"end": 196,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"superTypeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 213,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 211,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 211,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 240,
|
|
"end": 309,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 247,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"value": "P",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 249,
|
|
"end": 309,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 272,
|
|
"end": 274,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 266,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 294,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 294,
|
|
"end": 297,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 297,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 299,
|
|
"end": 300,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 286,
|
|
"end": 288,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C2",
|
|
"optional": false
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 274,
|
|
"end": 277,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 275,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 275,
|
|
"end": 276,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"superTypeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 288,
|
|
"end": 291,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 289,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 289,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
"implements": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 386,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 322,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Q",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 386,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 334,
|
|
"end": 380,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 347,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
},
|
|
"value": "E2",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 341,
|
|
"end": 380,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 378,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 374,
|
|
"ctxt": 0
|
|
},
|
|
"value": "baz",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 374,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 365,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 362,
|
|
"ctxt": 0
|
|
},
|
|
"value": "P",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 363,
|
|
"end": 365,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D2",
|
|
"optional": false
|
|
}
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 349,
|
|
"end": 352,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 350,
|
|
"end": 351,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 350,
|
|
"end": 351,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"superTypeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 365,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 367,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 367,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
"implements": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|