title: createUserWithEmailAndPassword and handling catch with firebase.auth.Error give compilation error TS2345
body: <p>When I call the following method and I want to catch the error and check the error code I can't specify the type of error other than Error type so I can't access to the error. Code from the <code>firebase.auth.Error</code>.</p>
  
  <p>Methode description : 
  (method) firebase.auth.Auth.createUserWithEmailAndPassword(email: string, password: string): firebase.Promise</p>
  
  <p>Specifing <code>firebase.auth.Auth</code> in the then work but <code>firebase.auth.Error</code> give me a compilation error.</p>
  
  <pre><code>error TS2345: Argument of type '(error: Error) =&gt; void' is not assignable to parameter of type '(a: Error) =&gt; any'.
  Types of parameters 'error' and 'a' are incompatible.
  Type 'Error' is not assignable to type 'firebase.auth.Error'.
  Property 'code' is missing in type 'Error'.
  </code></pre>
  
  <p>&nbsp;      </p>
  
  <pre><code>this.auth.createUserWithEmailAndPassword(username, password)
                  .then( (auth: firebase.auth.Auth) =&gt; { return auth; } )
                  .catch( (error: firebase.auth.Error) =&gt; {
  
                      let errorCode = error.code;
                      let errorMessage = error.message;
  
                      if (errorMessage === "auth/weak-password") {
                      alert("The password is too weak.");
                      } else {
                      alert(errorMessage);
                      }
                      console.log(error);
  
                  });
  </code></pre>