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

284 lines
7.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 163,
"end": 334,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 163,
"end": 194,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 193,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "$",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 193,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 178,
"end": 193,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 180,
"end": 191,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 180,
"end": 183,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 185,
"end": 191,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 187,
"end": 191,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 238,
"end": 270,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 250,
"end": 269,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 250,
"end": 252,
"ctxt": 0
},
"value": "$2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 252,
"end": 269,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 254,
"end": 269,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 256,
"end": 267,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 256,
"end": 259,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 261,
"end": 267,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 263,
"end": 267,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 303,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 303,
"end": 310,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 303,
"end": 308,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": "$",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 305,
"end": 308,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 325,
"end": 334,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 325,
"end": 333,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 325,
"end": 331,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 325,
"end": 327,
"ctxt": 0
},
"value": "$2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 328,
"end": 331,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}