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

docs: enable twoslash for some code snippets #25679

Merged
merged 1 commit into from Feb 7, 2024
Merged

docs: enable twoslash for some code snippets #25679

merged 1 commit into from Feb 7, 2024

Conversation

antfu
Copy link
Member

@antfu antfu commented Feb 7, 2024

This enables TwoSlash support for nuxt.com in nuxt/nuxt.com#1486

Here is an example:
Screenshot 2024-02-07 at 16 43 52

I manually checked every code snippet I enabled. Since the docs and nuxt.com are different repos, currently, you have to manually link them to verify the works (TwoSlash also verifies the types and throws when there are type errors, this could be handly to typecheck the docs later on). I am working with Orta to bring twoslash-cli so that later, we can verify the code snippets in CI to guard against type errors.

This PR is pure additional, should not break existing usages and is good to merge.

Copy link

stackblitz bot commented Feb 7, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

nuxt-studio bot commented Feb 7, 2024

Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio ↗︎ View Live Preview ca7346a

@danielroe danielroe merged commit 3c27141 into main Feb 7, 2024
5 checks passed
@danielroe danielroe deleted the docs/twoslash branch February 7, 2024 16:18
@danielroe
Copy link
Member

This makes me very happy.

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

Successfully merging this pull request may close these issues.

None yet

2 participants