14-shiki-tagshover×9 tag×4all
// Ported from @shikijs/twoslash docs: the four custom-tag notations.
import { 
(alias) function createHighlighterCore(options: HighlighterCoreOptions<false>): Promise<HighlighterCore> import createHighlighterCore

Create a Shiki core highlighter instance, with no languages or themes bundled. Wasm and each language and theme must be loaded manually.

@seehttp://shiki.style/guide/bundles#fine-grained-bundle
createHighlighterCore
} from 'shiki/core'
import {
(alias) function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine import createJavaScriptRegexEngine

Use the modern JavaScript RegExp engine to implement the OnigScanner.

As Oniguruma supports some features that can't be emulated using native JavaScript regexes, some patterns are not supported. Errors will be thrown when parsing TextMate grammars with unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax. Set forgiving to true to ignore these errors and skip any unsupported or invalid patterns.

createJavaScriptRegexEngine
} from 'shiki/engine/javascript'
const
const highlighter: HighlighterCore
highlighter
= await
(alias) createHighlighterCore(options: HighlighterCoreOptions<false>): Promise<HighlighterCore> import createHighlighterCore

Create a Shiki core highlighter instance, with no languages or themes bundled. Wasm and each language and theme must be loaded manually.

@seehttp://shiki.style/guide/bundles#fine-grained-bundle
createHighlighterCore
({
(property) HighlighterCoreOptions<false>.engine: Awaitable<RegexEngine>

Custom RegExp engine.

engine
:
(alias) createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine import createJavaScriptRegexEngine

Use the modern JavaScript RegExp engine to implement the OnigScanner.

As Oniguruma supports some features that can't be emulated using native JavaScript regexes, some patterns are not supported. Errors will be thrown when parsing TextMate grammars with unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax. Set forgiving to true to ignore these errors and skip any unsupported or invalid patterns.

createJavaScriptRegexEngine
()
}) const
const a: 1
a
= 1
Custom log message
const
const b: 1
b
= 1
Custom error message
const
const c: 1
c
= 1
Custom warning message
Custom annotation message