* @param {import('@babel/types').VariableDeclarator | import('@babel/types').TSTypeAliasDeclaration | import('@babel/types').TSInterfaceDeclaration | import('@babel/types').TSDeclareFunction | import('@babel/types').TSInterfaceDeclaration | import('@babel/types').TSEnumDeclaration | import('@babel/t
(node, parentDecl)
| 68 | * @param {import('@babel/types').VariableDeclaration} [parentDecl] |
| 69 | */ |
| 70 | function processDeclaration(node, parentDecl) { |
| 71 | if (!node.id) { |
| 72 | return |
| 73 | } |
| 74 | assert(node.id.type === 'Identifier') |
| 75 | const name = node.id.name |
| 76 | if (name.startsWith('_')) { |
| 77 | return |
| 78 | } |
| 79 | shouldRemoveExport.add(name) |
| 80 | if (isExported.has(name)) { |
| 81 | const start = (parentDecl || node).start |
| 82 | assert(typeof start === 'number') |
| 83 | s.prependLeft(start, `export `) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | const isExported = new Set() |
| 88 | const shouldRemoveExport = new Set() |
no test coverage detected