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

157 lines
3.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 47,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 1,
"end": 17,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 19,
"end": 47,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 23,
"end": 47,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 23,
"end": 26,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 26,
"end": 42,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 28,
"end": 42,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 28,
"end": 34,
"ctxt": 0
},
"value": "Record",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 34,
"end": 42,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
},
{
"type": "TsKeywordType",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"kind": "any"
}
]
}
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 45,
"end": 47,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
}
],
"interpreter": null
}