You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is impossible to perform transformation to the file before type checking.
ts-loader custom transformer are not taken into account. fork-ts-checker-webpack-plugin seem to only check against the original files.
When using ts-import-plugin, a plugin that change the import statements, it can cause issue.
example
I'm using the plugin to avoid having to create "index" files for folders while still being able to use simple import with alias.
In a folder like that:
src/
app.js
modules/
index.ts
moduleA.ts
moduleB.ts
moduleC.ts
With alias @ for src/ and alias modules for src/modules/index.ts
Without the transform, I need to maintain index.ts manually to use the simple import syntax. Mind you, my example is very simple, but this system is used with many more module folders and files.
I also need to create the necessary alias, both in tsconfig and webpack.
With a little config of the transformer, I am able to completely avoid using index.ts as the import are transformed to something like this:
And no need for the alias, since they are transformed on the fly.
Except in fork-ts-checker-webpack-plugin, where I need both to maintain the index files and the alias.
Feature description
Ideally it would take any transform into account before type checking.
More realistically, it should have an option similar to ts-loader custom transformer, assuming I might not need to apply all transform. It would make setup a little more verbose but would allow for more control over what transform I want to apply, for performance reasons (some transform might not impact type checking ability).
It might help with .vue files, allowing to avoid having custom option for it, simply apply a transform to the files, but I'm not sure about that.
Feature implementation
Adding an option getcustomtransformers, that apply a change to a file before type checking phase. I don't know the internal of the plugin so I don't know the feasibility.
Ideally, it should use the same interface as ts-loader, to allow plugin reuse.
I shouldn't hurt multi-threading, since transform are applied on a file by file basis
The text was updated successfully, but these errors were encountered:
Feature motivation
It is impossible to perform transformation to the file before type checking.
ts-loader custom transformer are not taken into account. fork-ts-checker-webpack-plugin seem to only check against the original files.
When using ts-import-plugin, a plugin that change the import statements, it can cause issue.
example
I'm using the plugin to avoid having to create "index" files for folders while still being able to use simple import with alias.
In a folder like that:
With alias
@
forsrc/
and aliasmodules
forsrc/modules/index.ts
Without the transform, I need to maintain index.ts manually to use the simple import syntax. Mind you, my example is very simple, but this system is used with many more module folders and files.
I also need to create the necessary alias, both in tsconfig and webpack.
With a little config of the transformer, I am able to completely avoid using index.ts as the import are transformed to something like this:
And no need for the alias, since they are transformed on the fly.
Except in fork-ts-checker-webpack-plugin, where I need both to maintain the index files and the alias.
Feature description
Ideally it would take any transform into account before type checking.
More realistically, it should have an option similar to ts-loader custom transformer, assuming I might not need to apply all transform. It would make setup a little more verbose but would allow for more control over what transform I want to apply, for performance reasons (some transform might not impact type checking ability).
It might help with
.vue
files, allowing to avoid having custom option for it, simply apply a transform to the files, but I'm not sure about that.Feature implementation
Adding an option
getcustomtransformers
, that apply a change to a file before type checking phase. I don't know the internal of the plugin so I don't know the feasibility.Ideally, it should use the same interface as ts-loader, to allow plugin reuse.
I shouldn't hurt multi-threading, since transform are applied on a file by file basis
The text was updated successfully, but these errors were encountered: