fix: get twoslash to work properly with JSDoc#1959
Merged
Rich-Harris merged 8 commits intomainfrom Apr 30, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
Looks like there are some snippet type errors possibly due to the new format |
Member
Author
|
Gradually working through the newly-exposed type errors. They'll need to be backported to the other repos, but it's easier to begin by making the changes here |
Rich-Harris
added a commit
to sveltejs/svelte
that referenced
this pull request
Apr 30, 2026
extracted from sveltejs/svelte.dev#1959
Merged
Member
Author
|
Extracted the necessary upstream changes: sveltejs/kit#15781 Since we can't merge Kit docs just yet (#1955 is blocked), no harm in merging these temporary changes |
Rich-Harris
added a commit
to sveltejs/kit
that referenced
this pull request
May 1, 2026
extracted from sveltejs/svelte.dev#1959 --------- Co-authored-by: Tee Ming <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Various fixes for type hovers in JSDoc snippets — turns this...
...into this, by providing twoslash with the correct context in the form of a filename (so it doesn't mistakenly think it's still dealing with an
ambient.d.tsfile) and by stripping@typetags:It also turns this...
...into this, by using CSS grids properly: