swc/crates/swc_ecma_parser/tests/tsc/asOperator4.json
2022-03-22 07:54:08 +00:00

174 lines
3.5 KiB
JSON

{
"type": "Module",
"span": {
"start": 41,
"end": 174,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 41,
"end": 66,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 57,
"end": 60,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 48,
"end": 66,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 63,
"end": 66,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 88,
"end": 116,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 97,
"end": 100,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 97,
"end": 100,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 108,
"end": 115,
"ctxt": 0
},
"value": "./foo",
"raw": "'./foo'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 151,
"end": 160,
"ctxt": 0
},
"expression": {
"type": "TsTypeAssertion",
"span": {
"start": 151,
"end": 159,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"kind": "any"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 161,
"end": 174,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 161,
"end": 173,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 162,
"end": 172,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 162,
"end": 165,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 169,
"end": 172,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"interpreter": null
}