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

186 lines
3.9 KiB
JSON

{
"type": "Module",
"span": {
"start": 92,
"end": 246,
"ctxt": 0
},
"body": [
{
"type": "ImportDeclaration",
"span": {
"start": 92,
"end": 123,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 99,
"end": 103,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 99,
"end": 103,
"ctxt": 0
},
"value": "data",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 109,
"end": 122,
"ctxt": 0
},
"value": "./data.json",
"raw": "\"./data.json\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 124,
"end": 145,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 128,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 129,
"end": 137,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 140,
"end": 144,
"ctxt": 0
},
"value": "data",
"optional": false
},
"definite": false
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 170,
"end": 172,
"ctxt": 0
},
"stmts": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 202,
"end": 226,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 214,
"end": 225,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 217,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 217,
"end": 225,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 227,
"end": 246,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "val",
"optional": false
}
}
],
"interpreter": null
}