title: Argument of type 'Isms91Options' is not assignable to parameter of type 'string | URL'
body: <p>I am new in typescript and just trying to convert Msg91 NodeJS API code to typescript but got an error while compiling the code. i.e 'Argument of type 'Isms91Options' is not assignable to the parameter of type "string | URL'."</p>
  
  <p>I tried to remove all the possible type of error but I think I missed some.</p>
  
  <pre><code>interface IoptionsType {
      phoneNumber: string;
      message: string;
  }
  
  interface IheadersType {
    authkey: string;
    contentType: string;
  }
  
  interface Isms91Options {
      method: string;
      hostname: string;
      port: string;
      path: string;
      headers: IheadersType;
  }
  
  export const sendSms = (data: IoptionsType) =&gt; {
    const {message, phoneNumber} = data;
    const option: Isms91Options = {
                    headers: {
                      authkey: "XXXXXXXXXXXXX",
                      contentType: "application/json"
                    },
                    hostname: "api.msg91.com",
                    method: "POST",
                    path: `http://api.msg91.com/api/v2/sendsms?message=${message}&amp;authkey=XXXXXXXXXXXXXXX&amp;`
                          + `mobiles=+91${phoneNumber}&amp;route=4&amp;sender=XXXXX&amp;country=91&amp;unicode=1`,
                    port: null,
    };
  
    const req = http.request(option, (res: Response) =&gt; {
      const chunks: any[] = [];
      res.on("data", (chunk) =&gt; {
        chunks.push(chunk);
      });
  
      res.on("end", () =&gt; {
        log.info(Buffer.concat(chunks));
      });
    });
  
    req.write(JSON.stringify({
      country: "91",
      route: "4",
      sender: "XXXXXX",
      sms:
       [ { message: "testing", to: [ "XXXXXXX" ] } ] }));
    req.end();
  };
  </code></pre>
  
  <p>This is the error I am facing while compiling the code
  error TS2345: Argument of type 'Isms91Options' is not assignable to parameter of type 'string | URL'.
    Type 'Isms91Options' is missing the following properties from type 'URL': hash, host, href, origin, and 7 more.</p>