lukeed / lukeed/webpack-messages

Adding types for `webpack-messages`

Open
#6 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
247
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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][gu.d.ts], 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](https://github.com/lukeed/webpack-messages/compare/master...guardian:tsdoc-types?expand=1)
2. only bring the type declaration as a one-off into this package. [I’ve already created a fork with it.](https://github.com/lukeed/webpack-messages/compare/master...guardian:type-declaration?expand=1)
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](https://github.com/guardian/webpack-messages/tree/typescript-conversion)
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!~

[gu.d.ts]: https://github.com/guardian/dotcom-rendering/blob/87c5dd86c04d9c02fc4f793343b05cad9afcda0c/dotcom-rendering/scripts/webpack/%40types/webpack-messages/index.d.ts

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the proposed gu.d.ts declaration and the three linked forks: JSDoc types, a standalone declaration, and a TypeScript conversion. First compare those approaches with the package's current JavaScript API, then wait for a decision on the preferred direction. Done means the chosen approach is integrated and TypeScript users can consume declarations for webpack-messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.