title: Vue3 TS get value of input with ref
body: <p>Seems to be so simple problem, however, I don't see any consistent documentation of Vue 3 typescript on how to access an input field and get its value from a function.</p>
  <pre><code>&lt;template&gt;
    &lt;Field
      type=&quot;text&quot;
      name=&quot;test&quot;
      ref=&quot;input&quot;
    /&gt;
  
    &lt;span @click=&quot;testFunc()&quot;&gt;Test&lt;/span&gt;
  &lt;/template&gt;
  
  export default defineComponent({
  ...
  setup() {
    const input = ref&lt;HTMLInputElement | null&gt;(null);
  
    const testFunc = () =&gt; {
      if (input.value) {
         console.log(input.value.value); // always undefined
      }
    };
  
    return {
     input,
     testFunc,
    }
  });
  </code></pre>
  <p>PS. very new with Vue and typescript. go easy on me :)</p>