title: What are the types of react-hook-form methods?
body: <p>I am using <a href="https://react-hook-form.com/ts/" rel="nofollow noreferrer">react-hook-form</a> and I want to have certain parts of the form in an extra component. Therfore I need to pass down some methods. What are the correct <code>typescript types</code> of the methods: <code>register, control, setValue, watch</code> ?</p>
  <p><a href="https://codesandbox.io/s/react-hook-form-resolver-forked-dp8hw" rel="nofollow noreferrer">Example Sandbox</a></p>
  <pre><code>interface INameInput {
    register: any;
    setValue: any;
    watch: any;
    control: any;
  }
  
  const NameInput: React.FC&lt;INameInput&gt; = (props: INameInput) =&gt; {
    const { register, control, setValue, watch } = props;
  
    return (
      &lt;&gt;
          &lt;label&gt;First Name&lt;/label&gt;
          &lt;input name=&quot;firstName&quot; ref={register} /&gt;
  
          &lt;label&gt;Last Name&lt;/label&gt;
          &lt;input name=&quot;lastName&quot; ref={register} /&gt;
      &lt;/&gt;
    );
  };
  
  export default function App() {
    const { register, control, setValue, watch} = useForm&lt;FormValues&gt;();
  
    return (
        &lt;form &gt;
          &lt;NameInput 
             register={register} 
             control={control} 
             setValue={setValue} 
             watch={watch} 
          /&gt;
        &lt;/form&gt;
    );
  }
  </code></pre>