Skip to content

Commit 5fc655f

Browse files
committed
chore: update @shikijs/vitepress-twoslash
1 parent 95ad0ff commit 5fc655f

File tree

4 files changed

+47
-35
lines changed

4 files changed

+47
-35
lines changed

docs/macros/define-prop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ console.log(count.value)
8181
### With Options
8282

8383
```vue twoslash
84-
<script setup>
84+
<script setup lang="ts">
8585
// @experimentalDefinePropProposal=kevinEdition
8686
// ---cut---
8787
// Declare prop with options
8888
const count = defineProp('count', {
8989
type: Number,
9090
required: true,
9191
default: 0,
92-
validator: (value) => value < 20,
92+
validator: (value: number) => value < 20,
9393
})
9494
</script>
9595
```
@@ -152,13 +152,13 @@ console.log(count.value, disabled.value)
152152
### With Options
153153

154154
```vue twoslash
155-
<script setup>
155+
<script setup lang="ts">
156156
// @experimentalDefinePropProposal=johnsonEdition
157157
// ---cut---
158158
// Declare prop with options
159159
const count = defineProp(0, false, {
160160
type: Number,
161-
validator: (value) => value < 20,
161+
validator: (value: number) => value < 20,
162162
})
163163
</script>
164164
```

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.2.0",
1818
"@nolebase/vitepress-plugin-git-changelog": "^2.2.0",
1919
"@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.2.0",
20-
"@shikijs/vitepress-twoslash": "^1.9.0",
20+
"@shikijs/vitepress-twoslash": "^1.9.1",
2121
"@vitejs/plugin-vue-jsx": "^4.0.0",
2222
"@vue-macros/volar": "workspace:*",
2323
"unplugin-vue-macros": "workspace:*",

docs/zh-CN/macros/define-prop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ console.log(count.value)
5050
### 选项
5151

5252
```vue twoslash
53-
<script setup>
53+
<script setup lang="ts">
5454
// @experimentalDefinePropProposal=kevinEdition
5555
// ---cut---
5656
// 使用选项声明 prop
5757
const count = defineProp('count', {
5858
type: Number,
5959
required: true,
6060
default: 0,
61-
validator: (value) => value < 20,
61+
validator: (value: number) => value < 20,
6262
})
6363
</script>
6464
```
@@ -120,13 +120,13 @@ console.log(count.value, disabled.value)
120120
### 选项
121121

122122
```vue twoslash
123-
<script setup>
123+
<script setup lang="ts">
124124
// @experimentalDefinePropProposal=johnsonEdition
125125
// ---cut---
126126
// 使用选项声明属性
127127
const count = defineProp(0, false, {
128128
type: Number,
129-
validator: (value) => value < 20,
129+
validator: (value: number) => value < 20,
130130
})
131131
</script>
132132
```

pnpm-lock.yaml

Lines changed: 38 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)