<h4 dir="auto">Summary</h4>
<p dir="auto">The <code class="notranslate">AxiosRequestConfig</code> type is not broad enough for some use cases. For example, when using <a href="https://github.com/JustinBeckwith/retry-axios"><code class="notranslate">retry-axios</code></a>, a custom key by the name of  <code class="notranslate">raxConfig</code> is set in the <code class="notranslate">AxiosRequestConfig</code> argument. TS will rightfully report that <code class="notranslate">raxConfig</code> doesn't match any type in <code class="notranslate">AxiosRequestConfig</code>.</p>
<h4 dir="auto">Context</h4>
<ul dir="auto">
<li>axios version: latest</li>
<li>Environment: N/A</li>
</ul>
<p dir="auto">I think the most straightforward way to fix this would be to simply add <code class="notranslate">[key: string]: any</code> to the <code class="notranslate">AxiosRequestConfig</code> interface. What are your thoughts <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mzabriskie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mzabriskie">@mzabriskie</a> ?</p>
<h4 dir="auto">Summary</h4>
<p dir="auto">Allow for typesafe extension of AxiosConfiguration</p>
<h4 dir="auto">Context</h4>
<p dir="auto">Allow for the following user case (without the cast)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    interface Config extends AxiosRequestConfig {
      start?: Date
    }
    const requestConfig: Config = {
      ...
    }
    const instance = axios.create(requestConfig)

    instance.interceptors.request.use(axiosConfig =&gt; {
      const config = axiosConfig as Config // Cast is needed as axiosConfig is infered to AxiosConfiguration and not Config
      config.start = new Date()
      return config
    })
"><pre class="notranslate"><code class="notranslate">    interface Config extends AxiosRequestConfig {
      start?: Date
    }
    const requestConfig: Config = {
      ...
    }
    const instance = axios.create(requestConfig)

    instance.interceptors.request.use(axiosConfig =&gt; {
      const config = axiosConfig as Config // Cast is needed as axiosConfig is infered to AxiosConfiguration and not Config
      config.start = new Date()
      return config
    })

</code></pre></div>