title: Formik and yup validation on string type using latest release 0.29.3
body: <p>I have the following phone number validation using <code>yup</code> but I am getting TS error after upgrading</p>
  <p><code>&quot;yup&quot;: ^0.27.0</code> to <code>&quot;yup&quot;: &quot;^0.29.3&quot;</code></p>
  <p>and</p>
  <p><code>&quot;@types/yup&quot;: &quot;^0.26.27&quot;</code> to <code>&quot;@types/yup&quot;: &quot;^0.29.7&quot;</code></p>
  <pre><code>const ValidationSchema = Yup.object().shape&lt;ICreateUserForm&gt;({
    phone: Yup.string()
      .required(&quot;Required&quot;)
      .test(&quot;countryCode&quot;, &quot;Must include country code&quot;, (phone?: string) =&gt; {
        return !!phone &amp;&amp; phone.startsWith(&quot;+&quot;)
      })
      .test(&quot;isValidNumber&quot;, &quot;Must be valid phonenumber&quot;, (phone?: string) =&gt; {
        const parsedNumber = !!phone &amp;&amp; parsePhoneNumberFromString(phone)
        return parsedNumber &amp;&amp; parsedNumber.isValid() ? true : false
      })
  })
  </code></pre>
  <p>Error</p>
  <pre><code>No overload matches this call.
    Overload 1 of 4, '(name: string, message: TestOptionsMessage&lt;{}, any&gt;, test: TestFunction&lt;string | null | undefined, object&gt;): StringSchema&lt;string, object&gt;', gave the following error.
      Argument of type '(phone?: string | undefined) =&gt; boolean' is not assignable to parameter of type 'TestFunction&lt;string | null | undefined, object&gt;'.
        Types of parameters 'phone' and 'value' are incompatible.
          Type 'string | null | undefined' is not assignable to type 'string | undefined'.
            Type 'null' is not assignable to type 'string | undefined'.
    Overload 2 of 4, '(name: string, message: TestOptionsMessage&lt;{}, any&gt;, test: AssertingTestFunction&lt;string, object&gt;): StringSchema&lt;string, object&gt;', gave the following error.
      Argument of type '(phone?: string | undefined) =&gt; boolean' is not assignable to parameter of type 'AssertingTestFunction&lt;string, object&gt;'.
        Signature '(phone?: string | undefined): boolean' must be a type predicate.  TS2769
  </code></pre>
  <p>Following is the Type definition of <code>phone</code></p>
  <pre><code>type AvailableLanguage = &quot;fi&quot; | &quot;en&quot;
  
  export interface CreateUserForm {
    firstName: string
    lastName: string
    email: string
    phone: string
    language: AvailableLanguage
  }
  </code></pre>
  <p>Since there are bo breaking changes in the recent changelog. I am not sure what has happened behind the scenes</p>
  <p><a href="https://github.com/jquense/yup/blob/master/CHANGELOG.md" rel="noreferrer">https://github.com/jquense/yup/blob/master/CHANGELOG.md</a>
  <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yup" rel="noreferrer">https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yup</a></p>