title: Assigning Vue/JS element ref to a const with Typescript
body: <p>I have a template with one form element and one button element:</p>
  <pre class="lang-html prettyprint-override"><code>  &lt;button
      type=&quot;submit&quot;
      id=&quot;ms_sign_in_submit&quot;
      ref=&quot;submitButton&quot;
      class=&quot;btn btn-lg btn-primary w-100 mb-5&quot;&gt;
    &lt;/button&gt;
  </code></pre>
  <p>I have <code>const</code> called <code>submitButton</code> in the script.</p>
  <pre><code>const submitButton = ref&lt;HTMLButtonElement | null&gt;(null);
  </code></pre>
  <p>Somehow the <code>submitButton</code> element (<code>id=&quot;ms_sign_in_submit&quot;</code>) gets assigned/inherited(?) to <code>submitButton.value</code>, but I don't understand how. <code>submitButton</code> element is never explicitly assigned to <code>submitButton</code> <code>const</code>.</p>