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

feat: Support vitepress-twoslash #253

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shinGangan
Copy link
Contributor

πŸ”— Issues

πŸ™‹ Description

Support for using @shikijs/vitepress-twoslash in documents.

πŸ“Έ Usage and Captured image

```ts twoslash
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
  return c.text('Hello Hono!')
})

export default app
```

show ↓

β˜‘οΈ Checklist

  • linked an issue or discussion
  • add example

πŸ“— Note

I believe there is still some debate on such issues as "should it be displayed on all pages?"
Therefore, this PR focuses on "building the environment."

This PR is for use when β€œWe want to use Twoslash on Hono.dev as well".

@shinGangan
Copy link
Contributor Author

Hi @yusukebe .

We consider this PR to be a very low priority for review.
Therefore, we would appreciate a review when you are available. πŸ™‡

@yusukebe
Copy link
Member

Hi @shinGangan

This is a super cool feature!!

In Hono, however, we must consider whether to introduce it. This is because the types in Hono are so complex that users often do not immediately understand them when they see them.

For example, the HandlerInterface has more than 20 overloads.

Screenshot 2024-02-24 at 22 32 37

So, I am not sure if this is for the benefit of the real users. However, it is an awesome cool feature, so let's leave this PR open.

Thanks!

@shinGangan
Copy link
Contributor Author

In Hono, however, we must consider whether to introduce it.

I agree with you on this.
The same reason we have not made any updates to the documentation within this PR.

Whether this feature is really necessary for Hono and Hono users needs to be scrutinized within the team.

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.

None yet

2 participants