Skip to content

Commit dd57dce

Browse files
authored
docs: fix Prop interface type error in example (#2191)
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)
1 parent c36e251 commit dd57dce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/guide/typescript/composition-api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ You can use either type-based declaration OR runtime declaration, but you cannot
4040
We can also move the props types into a separate interface:
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)