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

382 lines
7.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 63,
"end": 224,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 63,
"end": 74,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 67,
"end": 73,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "V",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 71,
"end": 73,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"definite": false
}
]
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 76,
"end": 89,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "v",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": "V",
"optional": false
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 91,
"end": 120,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 105,
"end": 118,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 105,
"end": 109,
"ctxt": 0
},
"value": "name",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 109,
"end": 117,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 111,
"end": 117,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 122,
"end": 135,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "c",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 137,
"end": 161,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 163,
"end": 176,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "e",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "E",
"optional": false
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 178,
"end": 209,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 188,
"end": 189,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 190,
"end": 209,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 196,
"end": 207,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 196,
"end": 198,
"ctxt": 0
},
"value": "id",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 198,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 211,
"end": 224,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "i",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "I",
"optional": false
}
}
],
"interpreter": null
}