* Fixes the ES module type declarations file. * @param {string} fileName
(fileName)
| 50 | * @param {string} fileName |
| 51 | */ |
| 52 | async function fixEsmTypes(fileName) { |
| 53 | try { |
| 54 | const types = await fs.readFile(fileName, { encoding: 'utf-8' }); |
| 55 | await fs.writeFile(fileName, rewriteInlineTypeExports(types)); |
| 56 | } catch (err) { |
| 57 | console.warn(`Warning: Could not patch ${fileName}. Error: ${err.message}`); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Fixes the CommonJS type declarations file. |
no test coverage detected