swc/crates/swc_ecma_parser/tests/tsc/nodeModulesAllowJsCjsFromJs.json
2022-02-04 17:08:38 +09:00

151 lines
3.0 KiB
JSON

{
"type": "Module",
"span": {
"start": 85,
"end": 162,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 85,
"end": 104,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 85,
"end": 104,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 85,
"end": 96,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 85,
"end": 92,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 93,
"end": 96,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 99,
"end": 104,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 126,
"end": 153,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 142,
"end": 153,
"ctxt": 0
},
"value": "./foo.cjs",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 154,
"end": 162,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 161,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 154,
"end": 157,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 158,
"end": 161,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
],
"interpreter": null
}