swc/crates/swc_ecma_parser/tests/tsc/library-reference-3.json

148 lines
3.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 173,
"end": 278,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 173,
"end": 204,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 185,
"end": 203,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "$",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 186,
"end": 203,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 188,
"end": 203,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 190,
"end": 201,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 190,
"end": 193,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 195,
"end": 201,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 197,
"end": 201,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 270,
"end": 278,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 270,
"end": 277,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "$",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 272,
"end": 275,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}