title: Typescript | Argument of type '{ username: string; password: string; }' is not assignable to parameter of type 'string'
body: <p>I have this simple service that takes and endpoint and execute a HTTP_CALL. This is it below:</p>
  
  <pre><code>export const updatePassword = (data: {
    username: string;
    password: string;
  }): HttpResponse&lt;string&gt; =&gt; {
    const { username, password } = data;
    const options = {
      method: httpMethod.POST,
      url: endpoint.UPDATE_PASSWORD({
        username,
        password
      })
    };
    return instance(options);
  };
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>Argument of type '{ username: string; password: string; }' is not assignable to parameter of type 'string'.
  </code></pre>
  
  <p>I am not sure what is his problem since I am doing the exact same thing a few lines above and I do not get an error.</p>
  
  <p>In case you need the endpoint I am hitting, here it is:</p>
  
  <pre><code>  UPDATE_PASSWORD: (username: string) =&gt; `${prefix}/${username}/password`,
  </code></pre>
  
  <p>Also, HttpRespone is an extension on <code>AxiosResponse</code> Generic, and instance is an extension of <code>AxiosRequestConfig</code>, along with some custom generics.</p>
  
  <p>//UPDATE. This is the converted way:</p>
  
  <pre><code>export const updatePassword = (data: { username: string }): HttpResponse&lt;string&gt; =&gt; {
    const { username } = data;
    const options = {
      method: httpMethod.POST,
      url: endpoint.UPDATE_PASSWORD(username)
    };
    return instance(options);
  };
  </code></pre>