Skip to content

Commit ead027b

Browse files
authored
add DOM interface info to Typing Template Refs (#2463)
Provide information and a place to find the right dom interface
1 parent dc398f5 commit ead027b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/guide/typescript/composition-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ onMounted(() => {
352352
</template>
353353
```
354354

355+
To get the right DOM interface you can check pages like [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#technical_summary).
356+
355357
Note that for strict type safety, it is necessary to use optional chaining or type guards when accessing `el.value`. This is because the initial ref value is `null` until the component is mounted, and it can also be set to `null` if the referenced element is unmounted by `v-if`.
356358

357359
## Typing Component Template Refs {#typing-component-template-refs}

0 commit comments

Comments
 (0)