Skip to content

Commit 4e22c4c

Browse files
jay-esolfek
andauthored
docs: fix Prop interface type error in example (#2191) (#1141)
Existing code snippet gives this error: Default export of the module has or is using private name 'Props'.ts (4082) Error fixed thanks to: vuejs/language-tools#1232 (comment) Co-authored-by: riz <[email protected]>
1 parent 7354986 commit 4e22c4c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/guide/typescript/composition-api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ type-base declaration と runtime declaration の両方を同時に使用する
4040
props の型をインターフェースとして分離することもできます:
4141

4242
```vue
43-
<script setup lang="ts">
43+
<script lang="ts">
4444
interface Props {
4545
foo: string
4646
bar?: number
4747
}
48+
</script>
4849
50+
<script setup lang="ts">
4951
const props = defineProps<Props>()
5052
</script>
5153
```

0 commit comments

Comments
 (0)