mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
019cf37199
**Related issue:** - https://github.com/microsoft/TypeScript/pull/51865.
734 lines
18 KiB
JSON
734 lines
18 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 202,
|
|
"end": 520,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 208,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "C",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 202,
|
|
"end": 357,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 222,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 216,
|
|
"end": 217,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 220,
|
|
"end": 221,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 236,
|
|
"end": 248,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 236,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 237,
|
|
"end": 247,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeQuery",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 247,
|
|
"ctxt": 0
|
|
},
|
|
"exprName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 246,
|
|
"end": 247,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
},
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 273,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 262,
|
|
"end": 263,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 272,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 266,
|
|
"end": 270,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 271,
|
|
"end": 272,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
}
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 288,
|
|
"ctxt": 0
|
|
},
|
|
"value": "d",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 288,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeQuery",
|
|
"span": {
|
|
"start": 290,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"exprName": {
|
|
"type": "TsQualifiedName",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 297,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"value": "this",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 303,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
}
|
|
},
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 318,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 318,
|
|
"end": 329,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 330,
|
|
"end": 331,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 330,
|
|
"end": 331,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 333,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 343,
|
|
"end": 349,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 343,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 343,
|
|
"end": 344,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 347,
|
|
"end": 348,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0,
|
|
"raw": "1"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"accessibility": null,
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 365,
|
|
"end": 366,
|
|
"ctxt": 0
|
|
},
|
|
"value": "D",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 359,
|
|
"end": 520,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 382,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 376,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 380,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 396,
|
|
"end": 408,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 396,
|
|
"end": 397,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeQuery",
|
|
"span": {
|
|
"start": 399,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"exprName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 406,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
},
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 422,
|
|
"end": 423,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 426,
|
|
"end": 432,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 426,
|
|
"end": 430,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 431,
|
|
"end": 432,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
}
|
|
},
|
|
"typeAnnotation": null,
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 447,
|
|
"end": 464,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 447,
|
|
"end": 448,
|
|
"ctxt": 0
|
|
},
|
|
"value": "d",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 448,
|
|
"end": 463,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeQuery",
|
|
"span": {
|
|
"start": 450,
|
|
"end": 463,
|
|
"ctxt": 0
|
|
},
|
|
"exprName": {
|
|
"type": "TsQualifiedName",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 457,
|
|
"end": 461,
|
|
"ctxt": 0
|
|
},
|
|
"value": "this",
|
|
"optional": false
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 462,
|
|
"end": 463,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false
|
|
}
|
|
},
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
},
|
|
{
|
|
"type": "Constructor",
|
|
"span": {
|
|
"start": 478,
|
|
"end": 518,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 478,
|
|
"end": 489,
|
|
"ctxt": 0
|
|
},
|
|
"value": "constructor",
|
|
"optional": false
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 494,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"pat": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 490,
|
|
"end": 494,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 491,
|
|
"end": 494,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 493,
|
|
"end": 494,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 493,
|
|
"end": 494,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 496,
|
|
"end": 518,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 506,
|
|
"end": 512,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"span": {
|
|
"start": 506,
|
|
"end": 511,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 506,
|
|
"end": 507,
|
|
"ctxt": 0
|
|
},
|
|
"value": "z",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"right": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 510,
|
|
"end": 511,
|
|
"ctxt": 0
|
|
},
|
|
"value": 1.0,
|
|
"raw": "1"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"accessibility": null,
|
|
"isOptional": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": {
|
|
"type": "TsTypeParameterDeclaration",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 369,
|
|
"ctxt": 0
|
|
},
|
|
"parameters": [
|
|
{
|
|
"type": "TsTypeParameter",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 368,
|
|
"ctxt": 0
|
|
},
|
|
"value": "T",
|
|
"optional": false
|
|
},
|
|
"in": false,
|
|
"out": false,
|
|
"const": false,
|
|
"constraint": null,
|
|
"default": null
|
|
}
|
|
]
|
|
},
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|