Skip to content

Update TypeScript configuration example to TS 2.7 #1926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2018

Conversation

peterblazejewicz
Copy link
Contributor

This PR changes the TypeScript configuration sample slightly trying to simplify the code - and make it on the same level as any ES6/ES2015 module based code.
The TS 2.7 allows - with simple configuration change in tsconfig.json - to unify use of imports in vanilla JavaScript module and TypeScript module source code. This remove needs of using * as in source code.
The text of the note has been extended to add note about these compiler additional configuration properties - which should be helpful for users with some TypeScript background. The unfortunate outcome is that the entire length of the section is slightly increased.

Here is a quick demo project that was setup based on existing (and this one) configuration notes to show that it is working setup:

https://github.com/peterblazejewicz/webpack-guides-typescript

Thanks!

The updated snippet uses the same syntax as in any ES6/ES2015 based
module imports in vanilla JavaScript thanks to new features from
TypeScript 2.7 or newer
The relevant not has been added to the sample to mention these new
configuration compiler properties.

Thanks!
@montogeek montogeek merged commit bc13648 into webpack:master Mar 19, 2018
@montogeek
Copy link
Member

Thanks!

@peterblazejewicz peterblazejewicz deleted the update/typescript-config branch March 19, 2018 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants