Typescript – How to change type of axios response when modified interceptor to return config.data

Here is the code

const fetcher = Axios.create()

fetcher.interceptors.response.use(config=>{
  return config.data
})

Problem is

Type of fetcher.get('...') is AxiosInstance, but it’s actually AxiosInstance.data type

So how could I change the type correctly?

73 thoughts on “Typescript – How to change type of axios response when modified interceptor to return config.data”

  1. Pingback: viagra samples
  2. Pingback: viagra sale
  3. Pingback: online viagra
  4. Pingback: cialis 5 mg
  5. Pingback: cialis online uk
  6. Pingback: sildenafil citrate
  7. Pingback: viagra prices

Leave a Comment