Skip to content

Commit ef7986a

Browse files
authored
feat(vitepress-twoslash): add vueCompilerOptions (#684)
1 parent 58409e5 commit ef7986a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/vitepress-twoslash/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable node/prefer-global/process */
22
import type { TransformerTwoslashOptions } from '@shikijs/twoslash/core'
33
import { createTransformerFactory } from '@shikijs/twoslash/core'
4+
import type { VueSpecificOptions } from 'twoslash-vue'
45
import { createTwoslasher } from 'twoslash-vue'
56
import type { ShikiTransformer } from 'shiki'
67
import { removeTwoslashNotations } from 'twoslash'
@@ -9,7 +10,11 @@ import { rendererFloatingVue } from './renderer-floating-vue'
910

1011
export * from './renderer-floating-vue'
1112

12-
export interface VitePressPluginTwoslashOptions extends TransformerTwoslashOptions, TwoslashFloatingVueRendererOptions {
13+
interface TransformerTwoslashVueOptions extends TransformerTwoslashOptions {
14+
twoslashOptions?: TransformerTwoslashOptions['twoslashOptions'] & VueSpecificOptions
15+
}
16+
17+
export interface VitePressPluginTwoslashOptions extends TransformerTwoslashVueOptions, TwoslashFloatingVueRendererOptions {
1318
/**
1419
* Requires adding `twoslash` to the code block explicitly to run twoslash
1520
* @default true

0 commit comments

Comments
 (0)