Integration of Twoslash's Rspress Plugin for automatically generating rich code blocks with type information.
Use special comments within TypeScript code blocks to enable Twoslash features.
For more detailed usage, please refer to the Twoslash documentation.
The plugin accepts an object with the following type:
explicitTrigger
is used to configure whether to explicitly trigger the Twoslash feature. Default is true
.
false
, all TypeScript code blocks will be processed by default.true
, only code blocks with the twoslash
tag will be processed.