-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add a CLI for type checking #145
Comments
If only typechecks are need, you can use TSTyche:
Current documentation speak only about type testing to avoid misunderstanding. Actually TSTyche is more versatile. Any file is first passed through type checker and issues are reported. It is not required to include any type testing assertions. |
@mrazauskas sounds interesting, does this work out of the box with Or if it requires some kind of plugin, is this easy to set up? (maybe even with the |
It would need an option to pick up files with Otherwise all you need is language service plugins. I was trying out Svelte and Vue files. All worked. Did not know MDX has a plugin too. I will give a spin later today (or tomorrow). There is a plan to add plugins to TSTyche with API similar to what Rollup has. Meaning that, a TSTyche plugin could provide configuration, select files for type check, alter TSConfig, if need provide language service plugins as well or even create a virtual file system. If that’s a common task, it should be easy to setup. |
Seems like it works. Hard to say precise, because first of all Not sure I get how type check should work in MDX. TypeScript is mentioned in readme of the extension with broken link: "see the TypeScript section of the MDX language server documentation." Also note that https://mdxjs.com does not have search (would help to find something about type checks). Hm.. No search? Hard to believe. I must be blind ;D |
TSTyche looks cool, and it’s awesome it already supports plugins. However, it looks a bit out of scope. It does more than just type checking. Ideally I want to aim for support in |
This still needs a bit of work before it’s published to npm. |
I agree. TSTyche is a type testing tool. Also installing plugins one by one and adding them to TSConfig is rather clumsy for type checking. There is no need to change this in TSTyche, of course. Don’t get me wrong, I like the idea of having a type checker, but that is not
|
There are
vue-tsc
and@astrojs/check
. I haven’t looked in depth, but these tools both appear to perform type checkign for Vue and Astro respectively.There’s also user demand for a CLI to do type checking in MDX.
Now that projects are moving the TypeScript integrations to a plugin, they can integrate with each other. I don’t think it’s sufficient to have a CLI for each framework. We need to have one CLI that can perform type checking for multiple Volar based languages.
Even better would be if we can convince the TypeScript team to support plugins while running
tsc
out of the box.Related issues
The text was updated successfully, but these errors were encountered: