We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a050dac commit c56fc1aCopy full SHA for c56fc1a
src/guide/typescript-support.md
@@ -102,6 +102,18 @@ const Component = defineComponent({
102
})
103
```
104
105
+If you're using [single-file components](/guide/single-file-component.html) then this would typically be written as:
106
+
107
+```vue
108
+<script lang="ts">
109
+import { defineComponent } from 'vue'
110
111
+export default defineComponent({
112
+ // type inference enabled
113
+})
114
+</script>
115
+```
116
117
## オプション API とともに使用する
118
119
TypeScript は明示的に型を定義することなく、ほとんどの型を推論できるようにあるべきです。例えば、数値である `count` プロパティを持つコンポーネントがある場合、文字列に特有のメソッドを呼び出すとエラーになります:
0 commit comments