-
Although in retrospect it might have been naive, I was misled by the comment in the quickstart
into thinking that as long as I had a (reasonable) tsconfig.json in my top-level directory, civet would check types whenever it compiled. So I just made my (entire) build script be But what is the best way to achieve both type checking and JavaScript output? I'm no real fan of TypeScript; I am here in fairly large part because CoffeeScript appears relatively "dead." But to the extent that I can and do make type annotations, I would like them to be enforced. Does Civet actually do no typechecking of its own? I.e., is the only way to get typechecking and end up with JavaScript to do a two-step build .civet -> .ts -> .js? (Is it the case that I will necessarily end up with the same .js if I do that as if I just execute Sorry if all these things should be clear from the existing documentation and I am just being too dense. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Don't worry about the questions, Civet is a fairly young project and there are still gaps in the tools and documentation. We're glad you're here! Using the Civet LSP in VSCode (https://marketplace.visualstudio.com/items?itemName=DanielX.civet) adds development time type checking. It works pretty well but also has some known issues. If you are not using VSCode then the two step Thanks for starting this discussion. Civet is improving all the time and I try to focus on what components people need most when prioritizing work. As the community grows the tools and ecosystem will continue to as well. |
Beta Was this translation helpful? Give feedback.
Don't worry about the questions, Civet is a fairly young project and there are still gaps in the tools and documentation. We're glad you're here!
Using the Civet LSP in VSCode (https://marketplace.visualstudio.com/items?itemName=DanielX.civet) adds development time type checking. It works pretty well but also has some known issues.
If you are not using VSCode then the two step
.civet
->.ts
->.js
is probably the only way currently. We plan to add to / upgrade our command line tools to do checking directly at some point (equivalent to svelte-check, vue-tsc, etc.) but I haven't gotten around to it yet. We also have plans for a generic non-vscode LSP at some point.Thanks for starting this …