- Status: accepted
- Deciders: Thomas GERBET, Joris MASSON
- Date: 2022-01-13
Technical Story: request #31907 Have TypeScript typechecking in dedicated task
Typechecking of TypeScript files is currently mixed with the build
and test
tasks.
While this makes things easy for developers contributing to an existing package because they cannot forget about the
type system, it comes with some issues:
- some files are typechecked twice, once during the execution of
build
task and once during the execution oftest
task which costs us some CPU time - it is harder to troubleshoot some typechecking edge cases, some issues only show up under specific
build
ortest
conditions - it is less easy to integrate specific typechecking tools like
vue-tsc
with our build tools
- [option 1] Keep current process as is
- [option 2] Move the typechecking into its own task for each package
The typechecking is moved into its own task for each package.
- It will improve the performance of the CI pipeline since we will not typecheck multiple times the same files
- We are less likely to encounter errors only in specific scenario
- We can easily switch the tool used for typechecking to choose the one the best suited to the situation
- We have to go through each package of the codebase to do the change