@@ -13,10 +13,10 @@ import type { ReactNode } from 'react';
1313import { forwardRef } from 'react' ;
1414
1515/**
16- * Output formats supported by the component.
17- * Token output is not supported - use the hook directly for that .
16+ * Output formats the component can render .
17+ * 'tokens' returns raw data requiring custom rendering - use the hook directly.
1818 */
19- type ComponentOutputFormat = 'react' | 'html' ;
19+ type ComponentRenderableFormat = 'react' | 'html' ;
2020
2121/**
2222 * Props for the ShikiHighlighter component.
@@ -51,14 +51,13 @@ export interface ShikiHighlighterProps
5151
5252 /**
5353 * Output format for the highlighted code.
54- * - 'react': Returns React nodes (default, safer )
55- * - 'html': Returns HTML string (~15-45% faster, requires dangerouslySetInnerHTML)
54+ * - 'react': React nodes (default)
55+ * - 'html': HTML string (faster, uses dangerouslySetInnerHTML)
5656 *
57- * Note: 'tokens' output is not supported by the component.
58- * Use the useShikiHighlighter hook directly for token access.
57+ * For 'tokens' output, use useShikiHighlighter hook directly.
5958 * @default 'react'
6059 */
61- outputFormat ?: ComponentOutputFormat ;
60+ outputFormat ?: ComponentRenderableFormat ;
6261
6362 /**
6463 * Controls the application of default styles to the generated code blocks
@@ -146,7 +145,7 @@ export const createShikiHighlighterComponent = (
146145 } ,
147146 ref
148147 ) => {
149- const options : HighlighterOptions < ComponentOutputFormat > = {
148+ const options : HighlighterOptions < ComponentRenderableFormat > = {
150149 delay,
151150 transformers,
152151 customLanguages,
0 commit comments