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

165 lines
3.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 2,
"end": 218,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 2,
"end": 53,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 6,
"end": 22,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 6,
"end": 13,
"ctxt": 0
},
"value": "declare",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 13,
"end": 22,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 15,
"end": 22,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 24,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 24,
"end": 33,
"ctxt": 0
},
"value": "interface",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 33,
"end": 41,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 43,
"end": 52,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "I",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 44,
"end": 52,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 46,
"end": 52,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 55,
"end": 218,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": true,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}