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

165 lines
3.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 217,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 52,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 21,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 12,
"ctxt": 0
},
"value": "declare",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 12,
"end": 21,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 14,
"end": 21,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 23,
"end": 40,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 23,
"end": 32,
"ctxt": 0
},
"value": "interface",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 32,
"end": 40,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 42,
"end": 51,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "I",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 43,
"end": 51,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 45,
"end": 51,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 54,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": true,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 215,
"end": 217,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}