* Configures and returns transformers based on options * @param {HighlighterOptions} options - Configuration options
({ twoslash = false, twoslashOptions })
| 45 | * @param {HighlighterOptions} options - Configuration options |
| 46 | */ |
| 47 | async function getTransformers({ twoslash = false, twoslashOptions }) { |
| 48 | const transformers = []; |
| 49 | |
| 50 | if (twoslash) { |
| 51 | const { twoslash } = await import('#rs/transformers/twoslash/index.mjs'); |
| 52 | transformers.push(twoslash(twoslashOptions)); |
| 53 | } |
| 54 | |
| 55 | return transformers; |
| 56 | } |
| 57 | |
| 58 | export const LANGS = [ |
| 59 | ...cLanguage, |