Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript types to documentation using TwoSlash #688

Open
jsudelko opened this issue Jun 30, 2024 · 1 comment
Open

Add TypeScript types to documentation using TwoSlash #688

jsudelko opened this issue Jun 30, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jsudelko
Copy link

jsudelko commented Jun 30, 2024

TwoSlash allows you to add types to your code block markup. For a TypeScript-focused library it would be a godsend. Sometimes I have to switch back and forth between VS Code and docs copying over documentation examples in order to understand what something means or the expected type output. It would he handy if I could simply hover to see the actual TypeScript types.

See Rollup as an example of TwoSlash in the wild. Hover over the JavaScript code snippet.

@fabian-hiller
Copy link
Owner

Thank you for sharing. Feel free to create a PR and implement it.

@fabian-hiller fabian-hiller self-assigned this Jun 30, 2024
@fabian-hiller fabian-hiller added the documentation Improvements or additions to documentation label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants