webpack-watch-files-plugin icon indicating copy to clipboard operation
webpack-watch-files-plugin copied to clipboard

Feature Request: Publish TypeScript Types

Open cinderblock opened this issue 4 years ago • 4 comments

Webpack supports webpack.config.ts these days. It would be very helpful to publish some typings. Ideally, these would be bundled in this package in the published sources.

Alternatively, one could (independently) publish to DefinitelyTyped to provide the types.

What is the appetite here for either:

  1. Converting src to TypeScript
  2. Adding hand created .d.ts files

cinderblock avatar Jan 24 '21 20:01 cinderblock

I've addressed this in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56102.

The library could also be migrated to TypeScript, or include the type definitions within the package, but this is a good first step at least, especially considering there haven't been any commits to this repo for the past ~1 year (although it's still working perfectly fine for me, even with Webpack 5).

bengry avatar Oct 01 '21 20:10 bengry

@bengry Nice!

I, personally, strongly feel that types should be directly included in published repos. Why force developers to download/add a second dependency? (This is rhetorical)

I'm holding out for this package to incorporate the types fully. 🙏

cinderblock avatar Oct 01 '21 21:10 cinderblock

@bengry Nice!

I, personally, strongly feel that types should be directly included in published repos. Why force developers to download/add a second dependency? (This is rhetorical)

I'm holding out for this package to incorporate the types fully. 🙏

@cinderblock I'd love to be wrong here. @Fridus Please let me know if you'd like me to make a PR with the types to this repo - they're already merged over at DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56102), but that can easily be changed to be a direct proxy to the types published from this package (same as what @types/moment and @types/webpack@^5 are doing).

bengry avatar Oct 01 '21 21:10 bengry

@bengry You are not wrong to publish to DT, especially considering the author of this package is not speaking up.

cinderblock avatar Oct 02 '21 23:10 cinderblock