Description
What problem does this feature solve?
Sometimes as a developer you want to check the validity of your types without having to launch yarn serve
, which takes more time. And even though you can check the types of the .ts
files with tsc -p tsconfig.json --pretty --noEmit
this does not check .vue
files. I haven't been able to reproduce the same command vue-cli-service executes, which is why I'm issuing this feature request.
Another reason why this would be interesting is to hook this command inside CI to fail the build if the types are not correct, because right now you can't do that, as the typing errors are shown on the command line as messages and do not have an exit code.
What does the proposed API look like?
vue-cli-service type [options]
Note that this should propagate TypeScript's options. For instance, the user should be able to pass the flag --noEmit
in order for TypeScript not to compile, or whatever options.