Skip to content

Expose vue-cli's TypeScript typing service as a command #1891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cesalberca opened this issue Jul 18, 2018 · 3 comments
Open

Expose vue-cli's TypeScript typing service as a command #1891

cesalberca opened this issue Jul 18, 2018 · 3 comments

Comments

@cesalberca
Copy link

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.

@essenmitsosse
Copy link

essenmitsosse commented Aug 13, 2019

Just ran into the issue. I always assumed that it would check .vue files and was surprised when my build failed because of type errors, even though the typescript check was clear. This is especially bad, since refactoring .vue files doesn't work with VS Code, so the chance of type errors is much higher, because often they need to be manually updated.

@AlvaroBrey
Copy link

This would be very useful for CI purposes.

@Aysnine
Copy link

Aysnine commented Feb 6, 2021

Is there any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants