samber / chartjs-plugin-datasource-prometheus

📊 Chart.js plugin for Prometheus
https://www.npmjs.com/package/chartjs-plugin-datasource-prometheus
MIT License
107 stars 20 forks source link

Declaration file not found #30

Open decanTyme opened 1 year ago

decanTyme commented 1 year ago

image

First of all, thanks for this package! I've been thoroughly using it as a guide while I try to figure my way out in publishing my own (I hope you don't mind 😅)

I noticed you have types exported from Rollup, but it is not exactly used when node installed since you haven't specified it in the package.json. The fix should be as simple as adding a "types": "dist/index.d.ts", assuming that's the entry point (I'd be glad to open up a PR for that!). More on that here.

As an aside, rollup-plugin-ts seems to do better than rollup-plugin-typescript2, at least for me since the former has a similar behavior to Parcel's declaration generation (e.g. it tree-shakes things so you end up declaring/emitting only the public API).

samber commented 1 year ago

Thank for the feedback, i made an update 👌