Skip to content

Commit

Permalink
docs: fix Prop interface type error in example (#2191) (#1141)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jay-es and olfek authored Feb 2, 2023
1 parent 7354986 commit 4e22c4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/guide/typescript/composition-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ type-base declaration と runtime declaration の両方を同時に使用する
props の型をインターフェースとして分離することもできます:

```vue
<script setup lang="ts">
<script lang="ts">
interface Props {
foo: string
bar?: number
}
</script>
<script setup lang="ts">
const props = defineProps<Props>()
</script>
```
Expand Down

1 comment on commit 4e22c4c

@vercel
Copy link

@vercel vercel bot commented on 4e22c4c Feb 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs-ja – ./

docs-ja-vuejs.vercel.app
docs-ja-git-main-vuejs.vercel.app
docs-ja-rose.vercel.app
ja.vuejs.org

Please sign in to comment.