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

256 lines
7.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 68,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 64,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 15,
"end": 64,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 16,
"end": 64,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 18,
"end": 64,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 18,
"end": 48,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 20,
"end": 40,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 21,
"end": 30,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 22,
"end": 30,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 24,
"end": 30,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 31,
"end": 39,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 33,
"end": 39,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 41,
"end": 46,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"typeParams": null
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 51,
"end": 64,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 53,
"end": 62,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 54,
"end": 62,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 56,
"end": 62,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": "f",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}