You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
Setting the "includeExplanation" option to true on codeToHtml works as expected but typescript does not recognize it as a valid property. This only causes an error if you use an object literal in the argument, for example:
// typescript error:// error TS2353: Object literal may only specify known properties, and 'includeExplanation' // does not exist in type 'CodeToHastOptions<BundledLanguage, BundledTheme>'shiki.codeToHtml(code,{lang: 'md',includeExplanation: true});
Current workaround, should anyone see this thread before a fix exists, it to simply typecast:
Validations
Describe the bug
Setting the "includeExplanation" option to true on codeToHtml works as expected but typescript does not recognize it as a valid property. This only causes an error if you use an object literal in the argument, for example:
Current workaround, should anyone see this thread before a fix exists, it to simply typecast:
I'm unable to provide a patch at this time but the fix is straightforward.
Reproduction
See typescript example above
Contributes
The text was updated successfully, but these errors were encountered: