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

629 lines
15 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
2022-02-04 14:17:42 +03:00
"end": 229,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 0,
2022-02-04 14:17:42 +03:00
"end": 74,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 10,
"end": 17,
"ctxt": 0
},
"value": "Boolean",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 18,
2022-02-04 14:17:42 +03:00
"end": 74,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 24,
"end": 42,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 24,
"end": 31,
"ctxt": 0
},
"value": "doStuff",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 33,
"end": 41,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 35,
"end": 41,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 47,
"end": 72,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 47,
"end": 59,
"ctxt": 0
},
"value": "doOtherStuff",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 63,
"end": 67,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 64,
"end": 67,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 66,
"end": 67,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 68,
"end": 71,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 70,
"end": 71,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 59,
"end": 62,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 60,
"end": 61,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 76,
"end": 89,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 80,
"end": 88,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BooleanLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 84,
"end": 88,
"ctxt": 0
},
"value": true
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 90,
"end": 118,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 94,
"end": 117,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 95,
"end": 103,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 97,
"end": 103,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 106,
"end": 117,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 106,
"end": 115,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 108,
"end": 115,
"ctxt": 0
},
"value": "doStuff",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 119,
"end": 156,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 123,
"end": 155,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 124,
"end": 132,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 126,
"end": 132,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 155,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 149,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 137,
"end": 149,
"ctxt": 0
},
"value": "doOtherStuff",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 150,
"end": 154,
"ctxt": 0
},
"value": "hm",
"raw": "'hm'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 157,
"end": 188,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 161,
"end": 187,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 161,
"end": 162,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 162,
"end": 170,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 164,
"end": 170,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 173,
"end": 187,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 173,
"end": 185,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 173,
"end": 174,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
2022-02-04 14:17:42 +03:00
"start": 174,
"end": 185,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 175,
"end": 184,
"ctxt": 0
},
"value": "doStuff",
"raw": "'doStuff'"
}
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 189,
"end": 229,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 228,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 194,
"end": 202,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 196,
"end": 202,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 205,
"end": 228,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 205,
"end": 222,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Computed",
"span": {
2022-02-04 14:17:42 +03:00
"start": 206,
"end": 222,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 207,
"end": 221,
"ctxt": 0
},
"value": "doOtherStuff",
"raw": "'doOtherStuff'"
}
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 223,
"end": 227,
"ctxt": 0
},
"value": "hm",
"raw": "'hm'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}