Skip to content
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

Add TypeScript target and module settings explainer #676

Merged
merged 1 commit into from
Jul 4, 2020

Conversation

tom-sherman
Copy link
Contributor

@tom-sherman tom-sherman commented Jul 4, 2020

This MR adds an explainer to the settings you should set in tsconfig.json lest you run into type errors.

See #675

Copy link
Collaborator

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you so much for your PR 🙌

@marvinhagemeister marvinhagemeister merged commit e0c3681 into developit:master Jul 4, 2020
@katywings
Copy link
Collaborator

@tom-sherman I gotta update my project template then which atm just sets tsconfig target: es5 :).

But if I understand it correctly the tsconfig does not have effects upon the microbundle js output right?

Out of curiosity: which inconsistent type errors did you get without setting target/module to ESNext?

@tom-sherman
Copy link
Contributor Author

@katywings Yeah microbundle handles the output so this setting is there just for typechecking via tsc and also VSCode.

My type errors were caused by differences in the DOM lib types between ES5 and ESNext target versions, specifically the URLSearchParams interface

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.

None yet

3 participants