exceljs
exceljs copied to clipboard
[BUG] Typescript typings don't work
🐛 Bug Report
Looks like typescript d.ts file is wrong: typings are not suggested at all (using webstorm).
Lib version: 4.3.0
Steps To Reproduce
import { Workbook } from 'exceljs/index';
const workbook = new Workbook();
const worksheet = workbook.addWorksheet(name); // <--- unresolved function method "addWorksheet()"
It looks like .ts file imports js implementation as "" in index.ts file which is tricky and not well supported.
What should be done: Simply rename index.ts -> index.js (since "ts" makes no sense in the way it is used)
I encountered the same issue. To ensure proper development, I added your PR as the package source in my package.json file. While in prod, the actual exceljs package.