title: How to set default header in axios with Typescript
body: <p>I want to set default header with axios in Typescript.
  Here is my function:</p>
  <pre><code>function setJwt(jwt: string | null) {axios.defaults.headers!.common[&quot;x-auth-token&quot;] = jwt;}
  </code></pre>
  <p>This shows the following issue:
  <a href="https://i.stack.imgur.com/7novp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7novp.png" alt="enter image description here" /></a></p>
  <p>How to solve that in Typescript?</p>