(ast: Statement[])
| 90 | } |
| 91 | |
| 92 | export function hasDefaultExport(ast: Statement[]): boolean { |
| 93 | for (const stmt of ast) { |
| 94 | if (stmt.type === 'ExportDefaultDeclaration') { |
| 95 | return true |
| 96 | } else if ( |
| 97 | stmt.type === 'ExportNamedDeclaration' && |
| 98 | stmt.specifiers.some( |
| 99 | spec => (spec.exported as Identifier).name === 'default', |
| 100 | ) |
| 101 | ) { |
| 102 | return true |
| 103 | } |
| 104 | } |
| 105 | return false |
| 106 | } |
| 107 | |
| 108 | function specifierEnd(s: MagicString, end: number, nodeEnd: number | null) { |
| 109 | // export { default , foo } ... |
no test coverage detected