<h2 dir="auto">Feature request</h2>
<p dir="auto">Hi! I'm new to webpack community, but I want to improve my knowledge of how it works "under the hood". I faced with problem when I don't understand where which type is using for and it's look like for new contributors it is very difficult as well + strictly typed code has less likelihood to fall into deoptimization. So my question is - Do you have any ideas/roadmap to migrating source code on TypeScript/<del>Flow</del>? May be create some JSDocs? Looks like migrating <code class="notranslate">tapable</code>, <code class="notranslate">enhanced-resolve</code> don't look as something difficult.</p>





<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">More types!</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<ol dir="auto">
<li>Type systems improve your code by making it easier to read.</li>
<li>Strictly typed code has less likelihood to fall into deoptimization</li>
</ol>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto">Looks like migrating <code class="notranslate">tapable</code>, <code class="notranslate">enhanced-resolve</code> don't look as something difficult. In webpack core repo there are types already in some files. For instance, part of compiler definition has JSDoc, but still it is a large task for webpack core.</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong></p>
<p dir="auto">Yes. Bigger community =&gt; Faster releases <g-emoji class="g-emoji" alias="grin" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f601.png">😁</g-emoji></p>
<p dir="auto">Webpack has been incredibly popular around the JS world. Its design philosophy wins trustment of the community.</p>
<p dir="auto">To further envolvement, it's very important that webpack has solid codebase to embrace the rapidly changing world.</p>
<p dir="auto">However, as code grows, without great test suite and other devtool, code can be gross. For now, webpack's source is written in ES5. And as you know, there isn't much documentation in the source. It's hard for incoming contributors to understand the codebase. Thus, it's harder to make webpack real-better.</p>
<p dir="auto">Typescript is a great tool to help webpack to achieve greater goal.</p>
<h4 dir="auto">SO, you can see <a href="https://github.com/ts-webpack/webpack/tree/feature/tsify">https://github.com/ts-webpack/webpack/tree/feature/tsify</a> is out!</h4>
<hr>
<h3 dir="auto">Current status of ts-webpack</h3>
<h4 dir="auto">done</h4>
<ul dir="auto">
<li>
<p dir="auto">the core dependency tree of webpack have been converted into typescript mostly(<em>except watchpack</em>).</p>
</li>
<li>
<p dir="auto">types of those sorrounding modules have been submitted to DefinintelyTyped. This is for more accurate type checking for webpack eventually.</p>
</li>
<li>
<p dir="auto">the source code of webpack has been converted into typescript catching up with the recent commits(needs further synchronization)</p>
</li>
<li>
<p dir="auto">its fully compatibility with current test suite. (There is one bug of the latest typescript which will causes test error)</p>
</li>
</ul>
<h4 dir="auto">missing</h4>
<ul dir="auto">
<li>
<p dir="auto"><strong>enable <code class="notranslate">strictNullChecks</code> and make the source fully type-checked.</strong></p>
</li>
<li>
<p dir="auto">a new set of build-tool to support and guard the new source code.</p>
</li>
<li>
<p dir="auto">refactoring to make some code more clear to be understood.</p>
</li>
<li>
<p dir="auto">adopt ES6 module system to fix the reference error as some module's structure is incompatitble with  the type system(at least for now there is no easy way to solve that).</p>
</li>
<li>
<p dir="auto">responses from the webpack core-team and the community <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
</li>
</ul>