DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.33k stars 28 forks source link

Fix extension for CLI's `--typecheck` #1297

Closed edemaine closed 3 days ago

edemaine commented 3 days ago

In trying to get Civet to typecheck itself, I noticed that importing a .civet file didn't resolve because of the dreaded "import .js to get a .ts file" issue.

Also add a bit of typing to CLI itself.

This PR reduces the number of self-check type errors from 722 to 635, most of which seem "real".

(These numbers are assuming https://github.com/microsoft/TypeScript-Website/pull/3165 gets merged; until then, the numbers are higher because Node isn't successfully imported. Though we work around that issue by adding types: ['node'] to tsconfig.json.)