react-spreadsheet icon indicating copy to clipboard operation
react-spreadsheet copied to clipboard

`hot-formula-parser.d.ts` is not bundled with library

Open michaeloliverx opened this issue 3 years ago • 0 comments

Using this library in a typescript environment results in a type error at build time:

❯ npm run build
> tsc && vite build    

node_modules/react-spreadsheet/dist/index.d.ts:2:35 - error TS7016: Could not find a declaration file for module 'hot-formula-parser'. implicitly has an 'any' type.
  Try `npm i --save-dev @types/hot-formula-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'hot-formula-parser';`

2 import * as hotFormulaParser from 'hot-formula-parser'; 
                                    ~~~~~~~~~~~~~~~~~~~~

node_modules/react-spreadsheet/dist/index.d.ts:3:24 - error TS7016: Could not find a declaration file for module 'hot-formula-parser'. implicitly has an 'any' type.
  Try `npm i --save-dev @types/hot-formula-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'hot-formula-parser';`   

3 import { Parser } from 'hot-formula-parser';
                         ~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/react-spreadsheet/dist/index.d.ts:2

It looks like the hot-formula-parser.d.ts file isn't being bundled:

image

Manually adding this declaration file into my project fixes the build error for me, can this file be bundled?

michaeloliverx avatar Oct 11 '22 12:10 michaeloliverx