Angular 2- Error: Type 'AbstractControl' is not assignable to type 'AbstractControl'
<p>I am using the angular rc4 release to write an application where I have to impose few validation rules to form components like <code>required</code>, <code>minlength</code> along with some custom validator <code>emailValidator</code>.</p>

<p>When I pass one built in and one custom validator to the <code>Validators.compose</code> function, IDEs (both Webstorm &amp; VS Code) display me compile time error messages like the one shown below:</p>

<p><a href="https://i.stack.imgur.com/45TVE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/45TVE.png" alt="enter image description here"></a></p>

<p>However, you can see that in the above screenshot if both validators are built in, there is no error message.</p>

<p>The definition of my custom validator is given below:</p>

<pre><code>static emailValidator(control: AbstractControl): {[key: string]: boolean} {
    if (control.value.match(/[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/)) {
      return null;
    } else {
      return {'invalidEmailAddress': true };
    }
}
</code></pre>