config: update verbatimModuleSyntax
in lenient tsconfig.json
#103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is
verbatimModuleSyntax
?Why do we need it?
verbatimModuleSyntax
:We see no errors when an import which can be used only as a
type
. This would lead to increased bundle size, since it would also compile the imports within the module.Also, coming from datavisyn/visyn_core@274fcfb#diff-c767fb22b4d7242d9d2848e5d53d098f77647cf31592ceed92875cbafdce2684, we have run into this problem where the module contained interfaces as well as React imports from a component and the bundler messed up the entire setup which led everything to crash
verbatimModuleSyntax
enabled:We see errors right in the editor which suggests to import
type
instead of the interface name so that it is excluded from bundling.These lint errors are autofixable (unfortunately not from the CLI)