Skip to content

withstudiocms/expressive-code-twoslash

expressive-code-twoslash

!og image

NPM Version Formatted with Biome

A Expressive Code plugin that adds Twoslash support to your Expressive Code TypeScript code blocks.

Documentation

Read the full documentation →

Currently Supported Languages

Language Identifier
TypeScript ts
React TSX tsx
Vue vue

Currently Supported Features

Feature Supported Status
JSDocs and Type Hover boxes
Error Handling/Messages
Type Extraction
Code Completions
Code Highlighting
Code Cutting
Callouts
TS Compiler Overrides
Show Emitted Files ⛔️

TODO

  • Make Annotations accessible
  • Use EC's Markdown processing system once released. (Requires support from EC (Planned))
  • Figure out how to work with TwoslashVFS and setup support for "Showing Emitted Files"

Licensing

MIT Licensed.

Acknowledgements

  • GitHub: @Hippotastic for providing/maintaining Expressive Code as well as being a huge help during the development of this plugin!
  • EffectTS Website for showing the EC Community that Twoslash CAN be used with Expressive-Code. While they did have the first working version, this re-sparked interest in me building out a fully featured EC-Twoslash plugin for the community.
  • shiki-twoslash for being the example of how to implement the elements within codeblocks as well as providing the basic layouts of the elements.