d3-funnel icon indicating copy to clipboard operation
d3-funnel copied to clipboard

TypeScript type is any

Open clickBi opened this issue 3 years ago • 5 comments

Hi, I get this error: Error: src/app/runDashboard/custom-items/funnel.ts:10:26 - error TS7016: Could not find a declaration file for module 'd3-funnel'. '../node_modules/d3-funnel/dist/d3-funnel.js' implicitly has an 'any' type. Try npm i --save-dev @types/d3-funnel if it exists or add a new declaration (.d.ts) file containing declare module 'd3-funnel'; How to fix it?

clickBi avatar Feb 03 '22 11:02 clickBi

I am not very familiar with TypeScript as I do not use it. I merged in a TypeScript index file at the request of another contributor but if anyone else has an idea of what may be causing this issue I am open to merging a fix.

jakezatecky avatar Feb 15 '22 22:02 jakezatecky

Can you release a new version? The file was added in July but the last release was in June

fregante avatar Feb 21 '22 13:02 fregante

I released a new version with the TypeScript index file. Do not know if this will resolve things for TypeScript users.

jakezatecky avatar Feb 25 '22 19:02 jakezatecky

Thank you! That silenced the error but unfortunately that still has no types. It'd be great to see this library typed.

fregante avatar Nov 05 '23 17:11 fregante

I am open to any pull request makes the project more accessible to TypeScript users. As I do not use TypeScript myself, I am not exactly familiar with the process.

jakezatecky avatar Nov 10 '23 15:11 jakezatecky