gridjs icon indicating copy to clipboard operation
gridjs copied to clipboard

Fix: "types" added to export parameters

Open theotheo opened this issue 2 years ago • 0 comments

While importing the library using import { Grid } from "gridjs", I encountered the following error:

error TS7016: Could not find a declaration file for module 'gridjs'. '/home/i/dataview-plus/node_modules/gridjs/dist/gridjs.mjs' implicitly has an 'any' type.

 There are types at '/home/i/dataview-plus/node_modules/gridjs/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'gridjs' library may need to update its package.json or typings.

Adding 'types' to exports resolved this issue. I must admit that I don't fully understand the root cause, perhaps it's related to TypeScript version differences. Nevertheless, I decided to create a pull request since the change is minimal, and more experienced experts may suggest a more suitable solution.

theotheo avatar Jan 25 '24 09:01 theotheo