-
-
Notifications
You must be signed in to change notification settings - Fork 588
Description
Description
While trying to optimize performance of great shiki we encountered confusing typings.
ThemedTokenizer and types both states default of false for includeExplanation options.
But highlighter.codeToThemeTokens is overriding includeExplanation default to true, while being typed with mentioned default false thus being wrongly docummented while accessed in code.
Expected behaviour
Either codeToThemeTokens having includeExplanation: false default (would make sense, its performance save was mindblowing), or fixing types to have correct typing (different defaults) for both ThemedTokenizer and highlighter.codeToThemeTokens (eg. for compatibility reasons I can see).
Guess should be quick change, but does not feel aligned with project enough to pick solution myself and create PR