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

2524 lines
75 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 1231,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 0,
"end": 569,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 9,
"end": 569,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 36,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 25,
"end": 34,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "s",
"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": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 47,
"end": 49,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"declare": false,
"span": {
"start": 41,
"end": 61,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 55,
"end": 59,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"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": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 66,
"end": 92,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 78,
"end": 92,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 80,
"end": 90,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 80,
"end": 82,
"ctxt": 0
},
"value": "id",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 82,
"end": 90,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 84,
"end": 90,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 98,
"end": 152,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 140,
"end": 150,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 140,
"end": 142,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 142,
"end": 150,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 144,
"end": 150,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 114,
"end": 116,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 116,
"end": 124,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"kind": "string"
}
]
},
"implements": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeArguments": null
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 163,
"end": 165,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"declare": false,
"span": {
"start": 157,
"end": 206,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 189,
"end": 200,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 189,
"end": 191,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 191,
"end": 199,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 193,
"end": 199,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 165,
"end": 168,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 212,
"end": 263,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
},
"value": "Module",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 226,
"end": 263,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 236,
"end": 257,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 246,
"end": 255,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 247,
"end": 255,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 249,
"end": 255,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
]
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 268,
"end": 292,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 273,
"end": 278,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 281,
"end": 285,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 281,
"end": 285,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 297,
"end": 308,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 301,
"end": 307,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 301,
"end": 302,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 305,
"end": 307,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 322,
"end": 323,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 324,
"end": 333,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 324,
"end": 333,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 325,
"end": 333,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 327,
"end": 333,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 313,
"end": 368,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 343,
"end": 368,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 353,
"end": 362,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 334,
"end": 342,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 336,
"end": 342,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 373,
"end": 395,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 377,
"end": 394,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 377,
"end": 382,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 382,
"end": 387,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 384,
"end": 387,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 384,
"end": 385,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 384,
"end": 385,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 390,
"end": 394,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 400,
"end": 460,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 404,
"end": 460,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 406,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 409,
"end": 460,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 410,
"end": 419,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 411,
"end": 419,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 413,
"end": 419,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 424,
"end": 460,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 434,
"end": 454,
"ctxt": 0
},
"argument": {
"type": "BinaryExpression",
"span": {
"start": 441,
"end": 453,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 441,
"end": 449,
"ctxt": 0
},
"value": "hello ",
"raw": "'hello '"
},
"right": {
"type": "Identifier",
"span": {
"start": 452,
"end": 453,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 465,
"end": 511,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 469,
"end": 510,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 469,
"end": 471,
"ctxt": 0
},
"value": "ol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 474,
"end": 510,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 476,
"end": 477,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 479,
"end": 486,
"ctxt": 0
},
"value": "hello",
"raw": "'hello'"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 488,
"end": 490,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 492,
"end": 493,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 495,
"end": 502,
"ctxt": 0
},
"value": "isvalid",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 504,
"end": 508,
"ctxt": 0
},
"value": true
}
}
]
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 531,
"end": 533,
"ctxt": 0
},
"value": "DC",
"optional": false
},
"declare": true,
"span": {
"start": 517,
"end": 567,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 544,
"end": 561,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 551,
"end": 552,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 552,
"end": 560,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 554,
"end": 560,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 571,
"end": 1231,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 578,
"end": 579,
"ctxt": 0
},
"value": "Y",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 580,
"end": 1231,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 586,
"end": 614,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 599,
"end": 600,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 593,
"end": 614,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 603,
"end": 612,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 603,
"end": 604,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 604,
"end": 612,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 606,
"end": 612,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 619,
"end": 646,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 632,
"end": 634,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"declare": false,
"span": {
"start": 626,
"end": 646,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 640,
"end": 644,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 641,
"end": 644,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 643,
"end": 644,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 643,
"end": 644,
"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": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 634,
"end": 637,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 651,
"end": 684,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 658,
"end": 684,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 668,
"end": 669,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 670,
"end": 684,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 672,
"end": 682,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 672,
"end": 674,
"ctxt": 0
},
"value": "id",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 674,
"end": 682,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 676,
"end": 682,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 690,
"end": 751,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 703,
"end": 704,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 697,
"end": 751,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 739,
"end": 749,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 739,
"end": 741,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 741,
"end": 749,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 743,
"end": 749,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 713,
"end": 715,
"ctxt": 0
},
"value": "AA",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 715,
"end": 723,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 716,
"end": 722,
"ctxt": 0
},
"kind": "string"
}
]
},
"implements": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 735,
"end": 736,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 735,
"end": 736,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeArguments": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 756,
"end": 812,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 769,
"end": 771,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"declare": false,
"span": {
"start": 763,
"end": 812,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 795,
"end": 806,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 795,
"end": 797,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 797,
"end": 805,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 799,
"end": 805,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 783,
"end": 784,
"ctxt": 0
},
"value": "A",
"optional": false
},
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 771,
"end": 774,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 772,
"end": 773,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 772,
"end": 773,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 818,
"end": 876,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 825,
"end": 876,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 832,
"end": 838,
"ctxt": 0
},
"value": "Module",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 839,
"end": 876,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 855,
"end": 856,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 849,
"end": 870,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 859,
"end": 868,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 859,
"end": 860,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 860,
"end": 868,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 862,
"end": 868,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 881,
"end": 912,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 888,
"end": 912,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 893,
"end": 898,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 901,
"end": 905,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 901,
"end": 905,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 907,
"end": 910,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 907,
"end": 910,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 917,
"end": 935,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 924,
"end": 935,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 928,
"end": 934,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 928,
"end": 929,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 932,
"end": 934,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 940,
"end": 1002,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 956,
"end": 957,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 958,
"end": 967,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 958,
"end": 967,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 959,
"end": 967,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 961,
"end": 967,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 947,
"end": 1002,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 977,
"end": 1002,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 987,
"end": 996,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 994,
"end": 995,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 968,
"end": 976,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 970,
"end": 976,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1007,
"end": 1036,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1014,
"end": 1036,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1018,
"end": 1035,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1018,
"end": 1023,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1023,
"end": 1028,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1025,
"end": 1028,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 1025,
"end": 1026,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1025,
"end": 1026,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 1031,
"end": 1035,
"ctxt": 0
}
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1041,
"end": 1108,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1048,
"end": 1108,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1052,
"end": 1108,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1052,
"end": 1054,
"ctxt": 0
},
"value": "fn",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1057,
"end": 1108,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1058,
"end": 1067,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1059,
"end": 1067,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1061,
"end": 1067,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 1072,
"end": 1108,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 1082,
"end": 1102,
"ctxt": 0
},
"argument": {
"type": "BinaryExpression",
"span": {
"start": 1089,
"end": 1101,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "StringLiteral",
"span": {
"start": 1089,
"end": 1097,
"ctxt": 0
},
"value": "hello ",
"raw": "'hello '"
},
"right": {
"type": "Identifier",
"span": {
"start": 1100,
"end": 1101,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1113,
"end": 1166,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 1120,
"end": 1166,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1124,
"end": 1165,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1124,
"end": 1126,
"ctxt": 0
},
"value": "ol",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 1129,
"end": 1165,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1131,
"end": 1132,
"ctxt": 0
},
"value": "s",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1134,
"end": 1141,
"ctxt": 0
},
"value": "hello",
"raw": "'hello'"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1143,
"end": 1145,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1147,
"end": 1148,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1150,
"end": 1157,
"ctxt": 0
},
"value": "isvalid",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 1159,
"end": 1163,
"ctxt": 0
},
"value": true
}
}
]
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 1172,
"end": 1229,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1193,
"end": 1195,
"ctxt": 0
},
"value": "DC",
"optional": false
},
"declare": true,
"span": {
"start": 1179,
"end": 1229,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 1206,
"end": 1223,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1213,
"end": 1214,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1214,
"end": 1222,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1216,
"end": 1222,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
}
],
"interpreter": null
}