title: Why Catch clause variable type annotation must be any?
body: <p>I'm using yup to validate a form, and I encountered this type error while trying to make this catch work:</p>
  <blockquote>
  <p>Catch clause variable type annotation must be any or unknown if
  specified 1196</p>
  </blockquote>
  <p>My Code:</p>
  <pre><code>const handleSubmit = async (): Promise&lt;void&gt; =&gt; {
      try {
        const isValid = await userSchema.validate(values, { abortEarly: false });
        console.log(isValid);
      } catch (err: ValidationError) {
        console.log(err);
        const errors = getValidationErrors(err);
      }
  </code></pre>
  <p>getValidationErrors function:</p>
  <pre><code>export function getValidationErrors(err: yup.ValidationError): Errors {
    console.error(err);
    const validationErrors: Errors = {};
    err.inner.forEach((error) =&gt; {
      if (error.path) validationErrors[error.path] = error.message;
    });
    return validationErrors;
  }
  </code></pre>
  <p>While searching about it, I found out that Typescript doesn't accept types for clause catch arguments... Why is that? This is just so commom in Java or other languages... I mean like... my solution here is attribute err: any... But isn't type any just something to never be used?</p>