title: Argument of type (key: string, id: string, pagination: number) => Promise<void> is not assignable to parameter of type Boolean
body: <p>Not sure what is the matter here, but I am trying to follow this documentation:</p>
  <p><a href="https://swr.vercel.app/" rel="nofollow noreferrer">https://swr.vercel.app/</a></p>
  <p>with this setup of my own:</p>
  <pre><code>import React, { useEffect } from 'react'
  import PatientsTable from 'components/patients/PatientsTable'
  import useSWR from 'hooks/useSWRWithToken'
  import Feedback from 'components/feedback'
  import fetchWithToken from 'libs/fetchWithToken'
  
  function Patients(props) {
    const {page, rowsPerPage, onPageChange, query, accessToken } = props
  
    const fetcher = async (key: string, id: string, pagination: number)=&gt; {
      fetchWithToken(key, accessToken, [id, page: pagination])
    }
    
      const { data: patientsList, error: patientsListError, isLoading } = useSWR(
        [`patients/${id}`, id, pagination], fetcher)
    
  
    return (
      &lt;&gt;
        &lt;Feedback /&gt;
        &lt;PatientsTable
          patientsList={patientsList}
          patientsListError={patientsListError}
        /&gt;
      &lt;/&gt;
    )
  }
  
  Patients.layout = 'fullScreen'
  Patients.auth = true
  export default Patients
  </code></pre>
  <p>But I get the following error for <code>fetcher</code>:</p>
  <p>Argument of type (key: string, id: string, pagination: number) =&gt; Promise is not assignable to parameter of type Boolean. The types returned by 'valueOf()' are incompatible between these types. Type 'Object' is not assignable to type 'boolean'</p>
  <p>This is the <code>fetchWithToken</code> function:</p>
  <pre><code>import axios from 'axios'
  import AlunaLogger from '../libs/AlunaLogger'
  import env from '@beam-australia/react-env'
  
  const fetchWithToken = (url: string, token: string, params: object = null) =&gt; {
    const logger = AlunaLogger('fetchWithToken')
  
    // let data = new FormData()
  
    return axios({
      baseURL: `${env('PUBLIC_ALUNA_API')}/`,
      method: 'GET',
      url,
      params,
      headers: {
        Authorization: `Bearer ${token}`,
        'Content-Type': 'application/json',
      },
    })
      .then((res) =&gt; res.data)
      .catch((error) =&gt; {
        console.log(error.response.data)
  
        logger.error('fetch !res.ok', error.response.data)
        throw error.response
      })
  }
  
  export default fetchWithToken
  </code></pre>