Fail compilation less aggressively in test watch #681
Labels
kind: support
Asking for support with something or a specific use case
problem: stale
Issue has not been responded to in some time
solution: already possible
This is already possible / this feature already exists
solution: workaround available
There is a workaround available for this issue
Current Behavior
If you're iterating on some code with a tests watch mode, the build will fail if there are issues like unused imports, unused variables, etc.
Desired Behavior
A way to ignore typescript errors in test watching mode
Suggested Solution
Add the
--transpileOnly
flag to test mode, which would disable the type checking and other TS enforced rules to tests in any mode.Who does this impact? Who is this for?
There should be an option to make the test watch command more forgiving. It's a drag on productivity to have to comment out code that works but is just not used.
I can even see value in not failing builds/tests at all even for type errors. I personally at least have gotten used to a workflow of starting with making interfaces work correctly, then make sure the types work correctly internally. The compiler constantly failing slows me down, even though I will eventually will be creating and relying on correct types.
Describe alternatives you've considered
Automatically apply this in all test modes. This might be good too, depending on the team's designs.
Additional context
I'm coming from using Flow, where for the most part type checking was a separate process in the terminal and the types were only stripped from the source in the build process. The build would never fail due to the types, and I got pretty used to workflows based on this.
The text was updated successfully, but these errors were encountered: