Skip to content

Add TypeScript type checking - #6862

Merged
TheLarkInn merged 32 commits into
webpack:masterfrom
mohsen1:ts
Apr 12, 2018
Merged

TheLarkInn merged 32 commits into
webpack:masterfrom
mohsen1:ts

Conversation

@mohsen1

@mohsen1 mohsen1 commented Mar 25, 2018 •

Copy link
Copy Markdown
Contributor

Summary

Wanted to try using TypeScript with allowJs and checkJs to see if it can improve code correctness.

Webpack is a good case study for using TypeScript compiler on JavaScript projects. This is still a work in progress and I'm not sure if we can use TypeScript to check for errors without any code modifications.

Issues in TypeScript and DefiantlyTyped

Issues found in Webpack by TypeScript

When this is complete?

This is going to be a lot of work to get it to the finish line and I'm not sure if it is inline with the project goals. This is why I'm opening the pull request early. Hoping we can overcome all of those TypeScript issues and make use of TypeScript compiler in Webpack! 🙏

Only comment changes

This pull request on its own should not hav any code changes. TypeScript type checking should be non-invasive and should not make users to change their code. At most, changes should be comments only. If any code change is necessary due to bugs or TS limitations, we are going to propose and merge them in separate pull request.

TypeScript 2.9

The amazing TypeScript team have fixed many issues with the compiler when checking JavaScript code. Those changes are currently (April 11) in the nightly builds of version 2.9. We can merge while depending on nightly version but it would be nicer to depend to beta release in master. We should eventually depend on a stable release.

@TheLarkInn @DanielRosenwasser @mhegazy

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.