feat: svelte-check --incremental / --tsgo#2932
Conversation
…sc/tsgo not choke on that, preventing semantic errors from being produced
🦋 Changeset detectedLatest commit: dba2c40 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Love it ❤️ |
jasonlyu123
left a comment
There was a problem hiding this comment.
Found a few problems.
This one also needs to change to JSDoc. Feel like there are still other places like this, but it's indeed kind of hard to check.
There is also a problem with relative imports from svelte files. Maybe we should also add the original project root to the rootDir of the generated tsconfig.json.
|
The jsdoc changes look good.
About this. I meant the relative import from svelte files to js/ts files. js/ts files aren't copied to the .svelte-check directory, so relative import failed. |
|
relative import issue should be fixed |
|
Is --tsgo intended to be only used alongside --incremental? Right now, if you only use --tsgo, the flag seems to be ignored. |
|
fixed |
|
Noticing a lot of /cc @dummdidumm |
Yep, same here. And other errors like: Error: Cannot find name '__sveltets_2_any'. (ts) |
Adds two new flags:
--incremental: Opts into TypeScript's incremental build cache, which speeds up subsequent runs. Saved within.svelte-kitor if not available within.svelte-check. This might result in slightly different type check outcomes, and certain patterns are not supported. Specifically, anything that is not in the root dir of your tsconfig.json and is a Svelte file will not be properly loaded and type-checked.--tsgo: Use TypeScript's Go implementation. Needs to have@typescript/native-previewinstalled. Subject to the same limitations as--incrementalPart of #2733
closes #2131
Huge kudos to @astralhpi for building https://github.com/astralhpi/svelte-fast-check and @pheuter for building https://svelte-check-rs.vercel.app/ , both of which heavily inspired this PR