Skip to content

feat: svelte-check --incremental / --tsgo#2932

Merged
dummdidumm merged 24 commits intomasterfrom
svelte-check-incremental
Feb 13, 2026
Merged

feat: svelte-check --incremental / --tsgo#2932
dummdidumm merged 24 commits intomasterfrom
svelte-check-incremental

Conversation

@dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Feb 6, 2026

Adds two new flags:

  • --incremental: Opts into TypeScript's incremental build cache, which speeds up subsequent runs. Saved within .svelte-kit or 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-preview installed. Subject to the same limitations as --incremental

Part 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

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: dba2c40

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
svelte-check Minor
svelte2tsx Patch
svelte-language-server Patch
typescript-svelte-plugin Patch

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

@pheuter
Copy link

pheuter commented Feb 6, 2026

Love it ❤️

Copy link
Member

@jasonlyu123 jasonlyu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

surroundWithIgnoreComments(`: ReturnType<import('svelte').Snippet>`), // shows up nicely preserved on hover, other alternatives don't

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.

@jasonlyu123
Copy link
Member

The jsdoc changes look good.

There is also a problem with relative imports from svelte files

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.

@dummdidumm
Copy link
Member Author

relative import issue should be fixed

@jasonlyu123
Copy link
Member

Is --tsgo intended to be only used alongside --incremental? Right now, if you only use --tsgo, the flag seems to be ignored.

@dummdidumm
Copy link
Member Author

fixed

@dummdidumm dummdidumm merged commit 0b8af82 into master Feb 13, 2026
3 checks passed
@dummdidumm dummdidumm deleted the svelte-check-incremental branch February 13, 2026 16:29
@github-actions github-actions bot mentioned this pull request Feb 13, 2026
@pheuter
Copy link

pheuter commented Feb 13, 2026

Noticing a lot of implicit any errors when passing --incremental --tsgo, does it currently support Zero-effort type safety? https://svelte.dev/blog/zero-config-type-safety

/cc @dummdidumm

@ceifa
Copy link

ceifa commented Feb 16, 2026

Noticing a lot of implicit any errors when passing --incremental --tsgo, does it currently support Zero-effort type safety? https://svelte.dev/blog/zero-config-type-safety

Yep, same here. And other errors like: Error: Cannot find name '__sveltets_2_any'. (ts)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expecting svelte-check to work with TS --incremental flag

4 participants

Comments