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

165 lines
3.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 206,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 12,
"end": 29,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 12,
"end": 29,
"ctxt": 0
},
"value": "interface",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 21,
"end": 29,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"value": "I",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 32,
"end": 40,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 1,
"end": 206,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 42,
"end": 206,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"value": "interface",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"value": "I",
"optional": false
}
},
{
"type": "BlockStatement",
"span": {
"start": 162,
"end": 164,
"ctxt": 0
},
"stmts": []
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}