Skip to content

[feature] two slash [CSR] #486

@ovflowd

Description

@ovflowd

I believe the docs on the web generator would benefit from our twoslash implementation, although:

  • IMO, it should be a generic CSR snippet that goes through all the existing <pre> elements, gets the raw code, and re-runs Shiki with Twoslash
  • It is an asynchronous non-blocking screep
    • Makes Twoslash a comepletely optional Client-Side feature
    • Ensures the actual HTML sizes/bundle sizes aren't impacted
    • Only runs on Desktop Environments and unrelated (necessarily to React)

This of course, breaks React's walled-garden concept, although we could also have a Hook that runs only client-side responsible for re-hydrating (re-running Shiki on Twoslash), which technically speaking wouldn't break it.

I'm open to suggestions here :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions