exceljs icon indicating copy to clipboard operation
exceljs copied to clipboard

[BUG] Typescript typings don't work

Open koldoon opened this issue 1 year ago • 1 comments

🐛 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)

koldoon avatar Oct 04 '23 19:10 koldoon

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.

alexandre-embie avatar Nov 29 '23 12:11 alexandre-embie