webpack-messages icon indicating copy to clipboard operation
webpack-messages copied to clipboard

Adding types for `webpack-messages`

Open mxdvl opened this issue 2 years ago • 4 comments

Thanks for this library, @lukeed.

When looking at converting Webpack configurations to Typescript, I discovered that they were no type declarations for this package. I’ve taken the time to create a declaration for our internal use, but would love to share these with others. Several ways forward are possible, and I would love to have your thoughts on which works best for you:

  1. use JSDoc type declarations into this package. I’ve already created a fork with them
  2. only bring the type declaration as a one-off into this package. I’ve already created a fork with it.
  3. convert this project to typescript. I’ve created a fork for that, too, but you may have no interest to maintain a TS codebase
  4. ~you don’t want to hear about Typescript, and I’ll raise a DefinitelyTyped package on my own. I’m happy with that option too!~

mxdvl avatar Feb 20 '22 14:02 mxdvl

Sounds great! You can get a PR started with what you have & I'll likely edit the branch directly to conform to my typical definitions style

Thanks~!

lukeed avatar Feb 22 '22 02:02 lukeed

Brilliant, will do.

Shout-out to @sndrs for suggesting we push our definition upstream.

mxdvl avatar Feb 22 '22 08:02 mxdvl

@mxdvl Since it seems the repo is kinda unresponsive, would it be possible to add your work to DefinitelyTyped? I used your workaround from the first post for the time being, but being more programatic is always better, of course.

(Also great job on the code from what I can tell)

Nya-chan avatar Jun 20 '23 05:06 Nya-chan

Actually, I'd rather not have to maintain the DefinitelyTyped packages. I've proposed this because I needed to solve a problem for my team but Webpack plugins are neither my expertise nor passion.

Anyone may reuse these definitions freely without a need for attribution of any kind.

mxdvl avatar Jul 05 '23 20:07 mxdvl