Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add small excerpt about contributing types to webpack
  • Loading branch information
TheLarkInn committed May 16, 2023
commit 9a26aa097a85469668433adf3d2e41862424cc70
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ greatly appreciate any time spent fixing typos or clarifying sections in the
documentation. [See a list of issues with the documentation tag](https://github.com/webpack/webpack/labels/documentation),
or [check out the issues on the documentation website's repository](https://github.com/webpack/webpack.js.org/issues).

## Types

webpack is statically typed using JSDoc annotation and TypeScript. If you would like to export a new type which doesn't belong to a public API, then you can do so by declaring it in `webpack/lib/index.js`.

`webpack/lib/index.js`
```js
/** @typedef {import("./NormalModuleFactory").ResolveData} ResolveData */
```

Then, automatically generate the type declarations by running `yarn fix` locally, and the changes you have made will be reflected in `types.d.ts`.

## Discussions

Gitter is only for small questions. To discuss a subject in detail, please send a link to your forum or blog in the Gitter chat.
Expand Down