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

284 lines
7.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 164,
"end": 335,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 164,
"end": 195,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 176,
"end": 194,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "$",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 177,
"end": 194,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 179,
"end": 194,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 181,
"end": 192,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 181,
"end": 184,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 186,
"end": 192,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 188,
"end": 192,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 239,
"end": 271,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 251,
"end": 270,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 251,
"end": 253,
"ctxt": 0
},
"value": "$2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 253,
"end": 270,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 255,
"end": 270,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 257,
"end": 268,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 257,
"end": 260,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 262,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 304,
"end": 312,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 304,
"end": 311,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 304,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"value": "$",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 306,
"end": 309,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 326,
"end": 335,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 326,
"end": 334,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 326,
"end": 332,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 326,
"end": 328,
"ctxt": 0
},
"value": "$2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 329,
"end": 332,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
],
"interpreter": null
}