-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the problem
These are the endpoint docs rendered on my screen:
There's a full page of TypeScript throat-clearing before we get to the bit that people actually want to see:
It's useful to have the types documented, but not like this.
Another problem with our docs: the types can get out of date, as seen here. It would be nice if somehow snippets in our docs were typechecked.
Describe the proposed solution
We could potentially solve both problems with @orta's https://shikijs.github.io/twoslash.
Questions to which I don't know the answer:
- Can it be made to work with Svelte components?
- Does it work with JSDoc syntax?
- Do we have any concerns about accessibility, if type information is hidden behind hovers?
Aside: doing this would presumably require cooperation between this repo, sveltejs/sites, and sveltejs/action-deploy-docs. Before leaping into it we might want to consider whether the current setup is to our liking, or whether we might want to move to multi-page docs with search and interactive components (likely powered by mdsvex).
Alternatives considered
No response
Importance
nice to have
Additional Information
No response