(statement, scope)
| 367 | } |
| 368 | |
| 369 | function readCommonJsExport(statement, scope) { |
| 370 | if (statement?.type !== "ExpressionStatement") return undefined; |
| 371 | const expr = statement.expression; |
| 372 | if (expr?.type !== "AssignmentExpression" || expr.operator !== "=") { |
| 373 | return undefined; |
| 374 | } |
| 375 | |
| 376 | if (!isModuleExports(expr.left)) return undefined; |
| 377 | return evaluateNode(expr.right, scope); |
| 378 | } |
| 379 | |
| 380 | function readEsmExport(statement, scope) { |
| 381 | if (statement?.type !== "ExportDefaultDeclaration") return undefined; |
no test coverage detected