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

496 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 213,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 14,
"ctxt": 0
},
"value": "clodule",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 82,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 24,
"end": 35,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 24,
"end": 26,
"ctxt": 0
},
"value": "id",
"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
},
{
"type": "ClassProperty",
"span": {
"start": 40,
"end": 49,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 47,
"end": 48,
"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
},
{
"type": "ClassMethod",
"span": {
"start": 55,
"end": 80,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 62,
"end": 64,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 65,
"end": 75,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 65,
"end": 75,
"ctxt": 0
},
"value": "id",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 67,
"end": 75,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 55,
"end": 80,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 80,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 14,
"end": 17,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 84,
"end": 213,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 98,
"ctxt": 0
},
"value": "clodule",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 99,
"end": 213,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 149,
"end": 211,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 165,
"end": 167,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 171,
"end": 175,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 171,
"end": 175,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 172,
"end": 175,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 177,
"end": 181,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 177,
"end": 181,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 178,
"end": 181,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 156,
"end": 211,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 186,
"end": 211,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 196,
"end": 205,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 167,
"end": 170,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 182,
"end": 185,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
]
}
}
],
"interpreter": null
}