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

290 lines
7.8 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 182,
"end": 373,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 191,
"end": 196,
"ctxt": 0
},
"value": "mappy",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"value": "map",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 182,
"end": 204,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 202,
"end": 204,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExportDeclaration",
"span": {
"start": 206,
"end": 373,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 213,
"end": 373,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 227,
"end": 328,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 227,
"end": 238,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 241,
"end": 328,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 305,
"end": 322,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 305,
"end": 321,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 305,
"end": 316,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 305,
"end": 309,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 310,
"end": 316,
"ctxt": 0
},
"value": "assets",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 319,
"end": 321,
"ctxt": 0
},
"properties": []
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 333,
"end": 371,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 333,
"end": 334,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 333,
"end": 371,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 337,
"end": 371,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 347,
"end": 365,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 347,
"end": 365,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 347,
"end": 352,
"ctxt": 0
},
"value": "mappy",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 353,
"end": 364,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 353,
"end": 357,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 358,
"end": 364,
"ctxt": 0
},
"value": "assets",
"optional": false
}
}
}
],
"typeArguments": null
}
}
]
},
"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": []
}
}
],
"interpreter": null
}